@remnic/core 1.1.1 → 1.1.3

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 (497) 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 +76 -51
  5. package/dist/access-cli.js.map +1 -1
  6. package/dist/access-http.d.ts +50 -5
  7. package/dist/access-http.js +38 -16
  8. package/dist/access-idempotency.js +1 -0
  9. package/dist/access-mcp.d.ts +10 -5
  10. package/dist/access-mcp.js +37 -14
  11. package/dist/access-schema.d.ts +133 -13
  12. package/dist/access-schema.js +20 -1
  13. package/dist/access-service-_AEUMVyX.d.ts +1981 -0
  14. package/dist/access-service.d.ts +11 -6
  15. package/dist/access-service.js +39 -14
  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 -6
  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-VDX363PS.js → chunk-34F3PLWZ.js} +10 -3
  58. package/dist/chunk-34F3PLWZ.js.map +1 -0
  59. package/dist/chunk-3KIS4VGT.js +228 -0
  60. package/dist/chunk-3KIS4VGT.js.map +1 -0
  61. package/dist/chunk-3LCWFNVS.js +350 -0
  62. package/dist/chunk-3LCWFNVS.js.map +1 -0
  63. package/dist/chunk-43EKP2UK.js +26 -0
  64. package/dist/chunk-43EKP2UK.js.map +1 -0
  65. package/dist/chunk-457A4P3L.js +119 -0
  66. package/dist/chunk-457A4P3L.js.map +1 -0
  67. package/dist/{chunk-KUB6JU6H.js → chunk-47WOM4YW.js} +2 -2
  68. package/dist/{chunk-HK3FGIEW.js → chunk-4PLGJRBV.js} +656 -20
  69. package/dist/chunk-4PLGJRBV.js.map +1 -0
  70. package/dist/{chunk-BGJGXLZ7.js → chunk-55FXRRSJ.js} +11 -8
  71. package/dist/chunk-55FXRRSJ.js.map +1 -0
  72. package/dist/{chunk-ULYOGL6R.js → chunk-5HRY2WRF.js} +7 -3
  73. package/dist/chunk-5HRY2WRF.js.map +1 -0
  74. package/dist/chunk-6TBWYBJ3.js +236 -0
  75. package/dist/chunk-6TBWYBJ3.js.map +1 -0
  76. package/dist/chunk-74EMIVE4.js +329 -0
  77. package/dist/chunk-74EMIVE4.js.map +1 -0
  78. package/dist/chunk-74WWN7ZW.js +82 -0
  79. package/dist/chunk-74WWN7ZW.js.map +1 -0
  80. package/dist/{chunk-B5WXLVDY.js → chunk-7GCMLT7J.js} +245 -25
  81. package/dist/chunk-7GCMLT7J.js.map +1 -0
  82. package/dist/chunk-A6XUJE5D.js +126 -0
  83. package/dist/chunk-A6XUJE5D.js.map +1 -0
  84. package/dist/chunk-AJA46VX5.js +393 -0
  85. package/dist/chunk-AJA46VX5.js.map +1 -0
  86. package/dist/{chunk-DFTTJYSO.js → chunk-AKUCB2OG.js} +525 -24
  87. package/dist/chunk-AKUCB2OG.js.map +1 -0
  88. package/dist/chunk-ASIQZXYO.js +277 -0
  89. package/dist/chunk-ASIQZXYO.js.map +1 -0
  90. package/dist/{chunk-ZEM3OK2K.js → chunk-B2TL6GA2.js} +3 -3
  91. package/dist/chunk-BJMBJZ2Y.js +290 -0
  92. package/dist/chunk-BJMBJZ2Y.js.map +1 -0
  93. package/dist/chunk-BT7NVCML.js +79 -0
  94. package/dist/chunk-BT7NVCML.js.map +1 -0
  95. package/dist/chunk-CK5NTM2S.js +454 -0
  96. package/dist/chunk-CK5NTM2S.js.map +1 -0
  97. package/dist/{chunk-3GXCSUXR.js → chunk-CRU27Q4J.js} +2 -2
  98. package/dist/{chunk-F5VP6YCB.js → chunk-DCE6SQLA.js} +572 -155
  99. package/dist/chunk-DCE6SQLA.js.map +1 -0
  100. package/dist/{chunk-CUPFXL3J.js → chunk-DHRQHX36.js} +4 -4
  101. package/dist/chunk-DHRQHX36.js.map +1 -0
  102. package/dist/{chunk-GKFXUTJ2.js → chunk-DR7MCMPS.js} +981 -61
  103. package/dist/chunk-DR7MCMPS.js.map +1 -0
  104. package/dist/chunk-FP2373TW.js +149 -0
  105. package/dist/chunk-FP2373TW.js.map +1 -0
  106. package/dist/{chunk-RBBWYEFJ.js → chunk-G2WADRQ3.js} +1 -1
  107. package/dist/chunk-G7D6GZ5J.js +48 -0
  108. package/dist/chunk-G7D6GZ5J.js.map +1 -0
  109. package/dist/chunk-H7XKCNR6.js +60 -0
  110. package/dist/chunk-H7XKCNR6.js.map +1 -0
  111. package/dist/{chunk-VYM3VWOF.js → chunk-IM3JSE73.js} +966 -329
  112. package/dist/chunk-IM3JSE73.js.map +1 -0
  113. package/dist/chunk-IXEJRKCZ.js +18 -0
  114. package/dist/chunk-IXEJRKCZ.js.map +1 -0
  115. package/dist/chunk-IYY4MCPG.js +275 -0
  116. package/dist/chunk-IYY4MCPG.js.map +1 -0
  117. package/dist/{chunk-BK2EFTE2.js → chunk-JWSENLQI.js} +508 -28
  118. package/dist/chunk-JWSENLQI.js.map +1 -0
  119. package/dist/chunk-KNKUID7G.js +183 -0
  120. package/dist/chunk-KNKUID7G.js.map +1 -0
  121. package/dist/chunk-L2IO2QPY.js +2036 -0
  122. package/dist/chunk-L2IO2QPY.js.map +1 -0
  123. package/dist/{chunk-SPI27QT6.js → chunk-L5IIGA5V.js} +9 -4
  124. package/dist/chunk-L5IIGA5V.js.map +1 -0
  125. package/dist/{chunk-RGLL5SPU.js → chunk-LVYGDT5V.js} +56 -82
  126. package/dist/chunk-LVYGDT5V.js.map +1 -0
  127. package/dist/{chunk-ZAIM4TUE.js → chunk-LW2NMHDW.js} +46 -1
  128. package/dist/chunk-LW2NMHDW.js.map +1 -0
  129. package/dist/{chunk-3OGMS3PE.js → chunk-LZRYQK6L.js} +3 -2
  130. package/dist/chunk-LZRYQK6L.js.map +1 -0
  131. package/dist/chunk-MDYG7VI7.js +48 -0
  132. package/dist/chunk-MDYG7VI7.js.map +1 -0
  133. package/dist/chunk-MXC3AP5I.js +74 -0
  134. package/dist/chunk-MXC3AP5I.js.map +1 -0
  135. package/dist/{chunk-S3EEFKNY.js → chunk-N7X62G74.js} +26 -11
  136. package/dist/chunk-N7X62G74.js.map +1 -0
  137. package/dist/chunk-NN3TS5BM.js +147 -0
  138. package/dist/chunk-NN3TS5BM.js.map +1 -0
  139. package/dist/chunk-OA3L7BFR.js +183 -0
  140. package/dist/chunk-OA3L7BFR.js.map +1 -0
  141. package/dist/{chunk-LK6SGL53.js → chunk-OR64ZGRZ.js} +3 -2
  142. package/dist/chunk-OR64ZGRZ.js.map +1 -0
  143. package/dist/chunk-OZHRDTDX.js +240 -0
  144. package/dist/chunk-OZHRDTDX.js.map +1 -0
  145. package/dist/chunk-PCUKNJAZ.js +165 -0
  146. package/dist/chunk-PCUKNJAZ.js.map +1 -0
  147. package/dist/{chunk-6PFRXT4K.js → chunk-PFV5C235.js} +11 -6
  148. package/dist/chunk-PFV5C235.js.map +1 -0
  149. package/dist/chunk-PZ5AY32C.js +10 -0
  150. package/dist/chunk-PZ5AY32C.js.map +1 -0
  151. package/dist/{chunk-XZ2TIKGC.js → chunk-Q7FJ5ZHM.js} +30 -10
  152. package/dist/chunk-Q7FJ5ZHM.js.map +1 -0
  153. package/dist/{chunk-7I7FKFZH.js → chunk-R2L7SUX2.js} +6 -6
  154. package/dist/{chunk-JL2PU6AI.js → chunk-R2XRID2N.js} +2 -2
  155. package/dist/{chunk-WCLICCGB.js → chunk-RILIVK4O.js} +91 -4
  156. package/dist/chunk-RILIVK4O.js.map +1 -0
  157. package/dist/{chunk-C2EFFULQ.js → chunk-RK2Y4XOM.js} +163 -20
  158. package/dist/chunk-RK2Y4XOM.js.map +1 -0
  159. package/dist/{chunk-TP4FZJIZ.js → chunk-RULE4VG5.js} +5 -1
  160. package/dist/chunk-RULE4VG5.js.map +1 -0
  161. package/dist/{chunk-PVPWZSSI.js → chunk-SMA4IMHV.js} +19 -3
  162. package/dist/chunk-SMA4IMHV.js.map +1 -0
  163. package/dist/{chunk-WVVA7F5A.js → chunk-SS253RXF.js} +30 -16
  164. package/dist/chunk-SS253RXF.js.map +1 -0
  165. package/dist/chunk-TUFG6VXY.js +875 -0
  166. package/dist/chunk-TUFG6VXY.js.map +1 -0
  167. package/dist/chunk-TYEOAFH3.js +251 -0
  168. package/dist/chunk-TYEOAFH3.js.map +1 -0
  169. package/dist/chunk-UKJAGEXH.js +260 -0
  170. package/dist/chunk-UKJAGEXH.js.map +1 -0
  171. package/dist/{chunk-KVBLZUKV.js → chunk-USFPPRAF.js} +93 -3
  172. package/dist/chunk-USFPPRAF.js.map +1 -0
  173. package/dist/{chunk-EPQJM2GC.js → chunk-VTJVUHRK.js} +22 -36
  174. package/dist/chunk-VTJVUHRK.js.map +1 -0
  175. package/dist/{chunk-O5ETUNBT.js → chunk-VTU2B4VF.js} +7 -3
  176. package/dist/chunk-VTU2B4VF.js.map +1 -0
  177. package/dist/chunk-WIICJPET.js +45 -0
  178. package/dist/chunk-WIICJPET.js.map +1 -0
  179. package/dist/{chunk-VBVG2M5G.js → chunk-WPGJYVUH.js} +6 -2
  180. package/dist/chunk-WPGJYVUH.js.map +1 -0
  181. package/dist/{chunk-YNQKWQT4.js → chunk-WSZIHQBK.js} +31 -11
  182. package/dist/{chunk-YNQKWQT4.js.map → chunk-WSZIHQBK.js.map} +1 -1
  183. package/dist/{chunk-NZLQTHS5.js → chunk-WW3QQF4H.js} +4 -1
  184. package/dist/chunk-WW3QQF4H.js.map +1 -0
  185. package/dist/{chunk-FVA6TGI3.js → chunk-Y3WQ4ZWK.js} +42 -2
  186. package/dist/chunk-Y3WQ4ZWK.js.map +1 -0
  187. package/dist/chunk-YNJHCGDT.js +309 -0
  188. package/dist/chunk-YNJHCGDT.js.map +1 -0
  189. package/dist/{chunk-ALXMCZEU.js → chunk-Z2E7VW55.js} +6 -3
  190. package/dist/chunk-Z2E7VW55.js.map +1 -0
  191. package/dist/{chunk-INXV5JBT.js → chunk-ZGXSCMQN.js} +1992 -410
  192. package/dist/chunk-ZGXSCMQN.js.map +1 -0
  193. package/dist/{chunk-W6SL7OFG.js → chunk-ZTSE2ZJ6.js} +12 -2
  194. package/dist/{chunk-W6SL7OFG.js.map → chunk-ZTSE2ZJ6.js.map} +1 -1
  195. package/dist/chunking.js +1 -0
  196. package/dist/cipher-GVE2GQ5H.js +28 -0
  197. package/dist/cipher-GVE2GQ5H.js.map +1 -0
  198. package/dist/citations.js +1 -0
  199. package/dist/{cli-BkeRaYfk.d.ts → cli-x2APT9a6.d.ts} +26 -7
  200. package/dist/cli.d.ts +11 -6
  201. package/dist/cli.js +68 -34
  202. package/dist/codex-thread-key.js +1 -0
  203. package/dist/commitment-ledger.js +1 -0
  204. package/dist/compression-optimizer.js +1 -0
  205. package/dist/config.d.ts +2 -1
  206. package/dist/config.js +5 -2
  207. package/dist/connectors-cli-DFGtY2DB.d.ts +257 -0
  208. package/dist/connectors-cli.d.ts +2 -0
  209. package/dist/connectors-cli.js +22 -0
  210. package/dist/connectors-cli.js.map +1 -0
  211. package/dist/consolidation-operator.d.ts +65 -5
  212. package/dist/consolidation-operator.js +6 -1
  213. package/dist/consolidation-provenance-check.d.ts +1 -1
  214. package/dist/consolidation-provenance-check.js +3 -2
  215. package/dist/consolidation-undo.d.ts +1 -1
  216. package/dist/consolidation-undo.js +1 -0
  217. package/dist/consolidation-undo.js.map +1 -1
  218. package/dist/{contradiction-review-WIUBAR52.js → contradiction-review-5LTTVDQV.js} +2 -1
  219. package/dist/contradiction-review-5LTTVDQV.js.map +1 -0
  220. package/dist/{contradiction-scan-E3GJTI4F.js → contradiction-scan-3Z6YW7YA.js} +2 -1
  221. package/dist/{contradiction-scan-E3GJTI4F.js.map → contradiction-scan-3Z6YW7YA.js.map} +1 -1
  222. package/dist/cross-namespace-budget.js +1 -0
  223. package/dist/cue-anchors.js +1 -0
  224. package/dist/dashboard-runtime.js +1 -0
  225. package/dist/day-summary.js +1 -0
  226. package/dist/delinearize.js +1 -0
  227. package/dist/direct-answer-wiring.js +1 -0
  228. package/dist/direct-answer.js +1 -0
  229. package/dist/dreams-ledger-LR2NBAZE.js +286 -0
  230. package/dist/dreams-ledger-LR2NBAZE.js.map +1 -0
  231. package/dist/embedding-fallback.js +3 -1
  232. package/dist/{engine-F3GOXGE5.js → engine-ICC2DSQF.js} +10 -7
  233. package/dist/engine-ICC2DSQF.js.map +1 -0
  234. package/dist/entity-retrieval.d.ts +1 -1
  235. package/dist/entity-retrieval.js +9 -6
  236. package/dist/entity-schema.js +1 -0
  237. package/dist/evals.js +1 -0
  238. package/dist/evidence-pack.d.ts +16 -0
  239. package/dist/evidence-pack.js +8 -0
  240. package/dist/evidence-pack.js.map +1 -0
  241. package/dist/explicit-capture.d.ts +6 -4
  242. package/dist/explicit-capture.js +1 -0
  243. package/dist/extraction-judge-telemetry.js +1 -0
  244. package/dist/extraction-judge-training.js +1 -0
  245. package/dist/extraction-judge.js +1 -0
  246. package/dist/extraction.js +9 -8
  247. package/dist/fallback-llm.js +3 -2
  248. package/dist/first-start-migration-4MHQEOSD.js +263 -0
  249. package/dist/first-start-migration-4MHQEOSD.js.map +1 -0
  250. package/dist/forget-PLR6J5DN.js +69 -0
  251. package/dist/forget-PLR6J5DN.js.map +1 -0
  252. package/dist/framework-CyHYDcri.d.ts +153 -0
  253. package/dist/fs-utils-IRVUFB6G.js +30 -0
  254. package/dist/fs-utils-IRVUFB6G.js.map +1 -0
  255. package/dist/graph-dashboard-diff.js +1 -0
  256. package/dist/graph-dashboard-key.js +1 -0
  257. package/dist/graph-dashboard-parser.js +1 -0
  258. package/dist/graph-edge-decay-PWB63GRE.js +207 -0
  259. package/dist/graph-edge-decay-PWB63GRE.js.map +1 -0
  260. package/dist/graph-edge-reinforcement.d.ts +81 -0
  261. package/dist/graph-edge-reinforcement.js +24 -0
  262. package/dist/graph-edge-reinforcement.js.map +1 -0
  263. package/dist/graph-events.d.ts +87 -0
  264. package/dist/graph-events.js +14 -0
  265. package/dist/graph-events.js.map +1 -0
  266. package/dist/graph-recall.js +1 -0
  267. package/dist/graph-retrieval.js +1 -0
  268. package/dist/graph-snapshot.d.ts +112 -0
  269. package/dist/graph-snapshot.js +19 -0
  270. package/dist/graph-snapshot.js.map +1 -0
  271. package/dist/graph.d.ts +105 -7
  272. package/dist/graph.js +20 -3
  273. package/dist/harmonic-retrieval.js +1 -0
  274. package/dist/himem.js +1 -0
  275. package/dist/hygiene.js +1 -0
  276. package/dist/identity-continuity.js +1 -0
  277. package/dist/importance.js +1 -0
  278. package/dist/index.d.ts +562 -13
  279. package/dist/index.js +365 -96
  280. package/dist/index.js.map +1 -1
  281. package/dist/intent.js +1 -0
  282. package/dist/json-extract.js +1 -0
  283. package/dist/json-store.js +1 -0
  284. package/dist/kdf-7S6RWKLZ.js +26 -0
  285. package/dist/kdf-7S6RWKLZ.js.map +1 -0
  286. package/dist/legacy-hook-compat.js +1 -0
  287. package/dist/legacy-hook-compat.js.map +1 -1
  288. package/dist/lifecycle.js +1 -0
  289. package/dist/live-connectors-runner.d.ts +48 -0
  290. package/dist/live-connectors-runner.js +17 -0
  291. package/dist/live-connectors-runner.js.map +1 -0
  292. package/dist/local-llm.js +3 -2
  293. package/dist/logger.js +1 -0
  294. package/dist/memory-action-policy.js +1 -0
  295. package/dist/memory-cache.d.ts +2 -1
  296. package/dist/memory-cache.js +4 -1
  297. package/dist/memory-governance-KG52RITE.js +37 -0
  298. package/dist/memory-governance-KG52RITE.js.map +1 -0
  299. package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
  300. package/dist/memory-lifecycle-ledger-utils.js +4 -1
  301. package/dist/memory-projection-format.js +1 -0
  302. package/dist/{memory-projection-store-DeSXPh1j.d.ts → memory-projection-store-D3vBHS4J.d.ts} +1 -0
  303. package/dist/memory-projection-store.d.ts +1 -1
  304. package/dist/memory-projection-store.js +1 -0
  305. package/dist/memory-worth-bench.js +1 -0
  306. package/dist/memory-worth-bench.js.map +1 -1
  307. package/dist/memory-worth-filter.js +1 -0
  308. package/dist/memory-worth-outcomes.d.ts +1 -1
  309. package/dist/memory-worth-outcomes.js +1 -0
  310. package/dist/memory-worth.js +1 -0
  311. package/dist/metadata-FC3XPDRQ.js +21 -0
  312. package/dist/metadata-FC3XPDRQ.js.map +1 -0
  313. package/dist/migrate-from-identity-anchor-TTEDEJGX.js +8 -0
  314. package/dist/migrate-from-identity-anchor-TTEDEJGX.js.map +1 -0
  315. package/dist/model-registry.js +1 -0
  316. package/dist/models-json.js +1 -0
  317. package/dist/native-knowledge.js +1 -0
  318. package/dist/negative.js +1 -0
  319. package/dist/objective-state-writers.js +1 -0
  320. package/dist/objective-state-writers.js.map +1 -1
  321. package/dist/objective-state.js +1 -0
  322. package/dist/openai-chat-compat.js +1 -0
  323. package/dist/operator-toolkit.d.ts +46 -2
  324. package/dist/operator-toolkit.js +29 -17
  325. package/dist/opik-exporter.js +1 -0
  326. package/dist/opik-exporter.js.map +1 -1
  327. package/dist/{orchestrator-CmJ-NTdJ.d.ts → orchestrator-ChkesB8U.d.ts} +177 -13
  328. package/dist/orchestrator.d.ts +6 -4
  329. package/dist/orchestrator.js +58 -42
  330. package/dist/page-versioning.js +1 -0
  331. package/dist/path-RMTY5Y5A.js +9 -0
  332. package/dist/path-RMTY5Y5A.js.map +1 -0
  333. package/dist/patterns-cli.d.ts +160 -0
  334. package/dist/patterns-cli.js +29 -0
  335. package/dist/patterns-cli.js.map +1 -0
  336. package/dist/peers-6OSQ3NK6.js +44 -0
  337. package/dist/peers-6OSQ3NK6.js.map +1 -0
  338. package/dist/plugin-id.js +1 -0
  339. package/dist/policy-runtime.js +1 -0
  340. package/dist/{port-BADbLZU5.d.ts → port-hqGnoStS.d.ts} +6 -0
  341. package/dist/profiling.js +1 -0
  342. package/dist/purge-6ATBGT77.js +205 -0
  343. package/dist/purge-6ATBGT77.js.map +1 -0
  344. package/dist/qmd-recall-cache.d.ts +1 -1
  345. package/dist/qmd-recall-cache.js +1 -0
  346. package/dist/qmd.d.ts +2 -1
  347. package/dist/qmd.js +4 -3
  348. package/dist/reasoning-trace-recall.js +1 -0
  349. package/dist/reasoning-trace-types.js +1 -0
  350. package/dist/recall-audit-anomaly.js +1 -0
  351. package/dist/recall-audit.js +1 -0
  352. package/dist/recall-disclosure-escalation.d.ts +84 -0
  353. package/dist/recall-disclosure-escalation.js +14 -0
  354. package/dist/recall-disclosure-escalation.js.map +1 -0
  355. package/dist/recall-explain-renderer.js +4 -1
  356. package/dist/recall-mmr.js +1 -0
  357. package/dist/recall-qos.js +1 -0
  358. package/dist/recall-query-policy.js +1 -0
  359. package/dist/recall-state.d.ts +7 -0
  360. package/dist/recall-state.js +2 -1
  361. package/dist/recall-tag-filter.d.ts +56 -0
  362. package/dist/recall-tag-filter.js +14 -0
  363. package/dist/recall-tag-filter.js.map +1 -0
  364. package/dist/recall-tokenization.js +1 -0
  365. package/dist/recall-xray-cli.d.ts +9 -2
  366. package/dist/recall-xray-cli.js +9 -4
  367. package/dist/recall-xray-renderer.js +4 -1
  368. package/dist/recall-xray.d.ts +116 -2
  369. package/dist/recall-xray.js +9 -3
  370. package/dist/reconstruct.js +1 -0
  371. package/dist/release-changelog.js +2 -0
  372. package/dist/release-changelog.js.map +1 -1
  373. package/dist/relevance.js +1 -0
  374. package/dist/rerank.js +1 -0
  375. package/dist/{resolution-QBTDHTG7.js → resolution-YGIBORXI.js} +2 -1
  376. package/dist/{resolution-QBTDHTG7.js.map → resolution-YGIBORXI.js.map} +1 -1
  377. package/dist/resolve-auth-token.d.ts +51 -0
  378. package/dist/resolve-auth-token.js +12 -0
  379. package/dist/resolve-auth-token.js.map +1 -0
  380. package/dist/resolve-provider-secret.d.ts +13 -1
  381. package/dist/resolve-provider-secret.js +6 -1
  382. package/dist/resume-bundles.js +5 -4
  383. package/dist/retrieval-agents.d.ts +1 -1
  384. package/dist/retrieval-agents.js +1 -0
  385. package/dist/retrieval-tiers.js +1 -0
  386. package/dist/retrieval.js +1 -0
  387. package/dist/sanitize.js +1 -0
  388. package/dist/schemas.d.ts +15 -2
  389. package/dist/schemas.js +2 -1
  390. package/dist/sdk-compat.js +1 -0
  391. package/dist/sdk-compat.js.map +1 -1
  392. package/dist/secure-store-4R2GSO7S.js +156 -0
  393. package/dist/secure-store-4R2GSO7S.js.map +1 -0
  394. package/dist/semantic-chunking.js +1 -0
  395. package/dist/{semantic-consolidation-CxJU6MJk.d.ts → semantic-consolidation-ByBXb-sf.d.ts} +3 -3
  396. package/dist/semantic-consolidation.d.ts +2 -2
  397. package/dist/semantic-consolidation.js +12 -6
  398. package/dist/semantic-rule-promotion.d.ts +1 -1
  399. package/dist/semantic-rule-promotion.js +9 -6
  400. package/dist/semantic-rule-verifier.d.ts +1 -1
  401. package/dist/semantic-rule-verifier.js +9 -6
  402. package/dist/session-integrity.js +1 -0
  403. package/dist/session-observer-bands.js +1 -0
  404. package/dist/session-observer-state.js +1 -0
  405. package/dist/session-toggles.js +2 -0
  406. package/dist/session-toggles.js.map +1 -1
  407. package/dist/signal.js +1 -0
  408. package/dist/skills-registry.js +2 -0
  409. package/dist/skills-registry.js.map +1 -1
  410. package/dist/source-attribution.js +1 -0
  411. package/dist/state-NCHQ4TRG.js +8 -0
  412. package/dist/state-NCHQ4TRG.js.map +1 -0
  413. package/dist/state-store-3EH7HYIN.js +16 -0
  414. package/dist/state-store-3EH7HYIN.js.map +1 -0
  415. package/dist/storage.d.ts +76 -2
  416. package/dist/storage.js +8 -5
  417. package/dist/store-contract.js +1 -0
  418. package/dist/summarizer.js +6 -5
  419. package/dist/summary-snapshot.js +1 -0
  420. package/dist/temporal-index.js +1 -0
  421. package/dist/temporal-supersession.d.ts +1 -1
  422. package/dist/temporal-supersession.js +2 -1
  423. package/dist/temporal-validity.d.ts +52 -0
  424. package/dist/temporal-validity.js +14 -0
  425. package/dist/temporal-validity.js.map +1 -0
  426. package/dist/threading.js +1 -0
  427. package/dist/tier-migration.d.ts +2 -2
  428. package/dist/tier-migration.js +1 -0
  429. package/dist/tier-routing.js +1 -0
  430. package/dist/tier-stats-62ZVDFKS.js +152 -0
  431. package/dist/tier-stats-62ZVDFKS.js.map +1 -0
  432. package/dist/tmt.js +1 -0
  433. package/dist/tokens.js +3 -1
  434. package/dist/topics.js +1 -0
  435. package/dist/trace-C5ETWBEF.js +290 -0
  436. package/dist/trace-C5ETWBEF.js.map +1 -0
  437. package/dist/transcript.js +1 -0
  438. package/dist/trust-zones.js +1 -0
  439. package/dist/tui-RI7P6PBS.js +13 -0
  440. package/dist/tui-RI7P6PBS.js.map +1 -0
  441. package/dist/types-V3FJ26TF.js +30 -0
  442. package/dist/types-V3FJ26TF.js.map +1 -0
  443. package/dist/types.d.ts +634 -9
  444. package/dist/types.js +10 -3
  445. package/dist/utility-learner.js +1 -0
  446. package/dist/utility-runtime.js +1 -0
  447. package/dist/utility-telemetry.js +1 -0
  448. package/dist/verified-recall.js +9 -6
  449. package/dist/version-utils.js +1 -0
  450. package/dist/whitespace.js +1 -0
  451. package/dist/work-product-ledger.js +1 -0
  452. package/package.json +2 -1
  453. package/dist/access-service-Br8ZydTK.d.ts +0 -827
  454. package/dist/chunk-3OGMS3PE.js.map +0 -1
  455. package/dist/chunk-6PFRXT4K.js.map +0 -1
  456. package/dist/chunk-ALXMCZEU.js.map +0 -1
  457. package/dist/chunk-B5WXLVDY.js.map +0 -1
  458. package/dist/chunk-BGJGXLZ7.js.map +0 -1
  459. package/dist/chunk-BK2EFTE2.js.map +0 -1
  460. package/dist/chunk-C2EFFULQ.js.map +0 -1
  461. package/dist/chunk-CUPFXL3J.js.map +0 -1
  462. package/dist/chunk-DFTTJYSO.js.map +0 -1
  463. package/dist/chunk-EPQJM2GC.js.map +0 -1
  464. package/dist/chunk-F5VP6YCB.js.map +0 -1
  465. package/dist/chunk-FVA6TGI3.js.map +0 -1
  466. package/dist/chunk-GKFXUTJ2.js.map +0 -1
  467. package/dist/chunk-HK3FGIEW.js.map +0 -1
  468. package/dist/chunk-INXV5JBT.js.map +0 -1
  469. package/dist/chunk-KVBLZUKV.js.map +0 -1
  470. package/dist/chunk-LK6SGL53.js.map +0 -1
  471. package/dist/chunk-LTCGGW2D.js +0 -14
  472. package/dist/chunk-LTCGGW2D.js.map +0 -1
  473. package/dist/chunk-NZLQTHS5.js.map +0 -1
  474. package/dist/chunk-O5ETUNBT.js.map +0 -1
  475. package/dist/chunk-PVPWZSSI.js.map +0 -1
  476. package/dist/chunk-RGLL5SPU.js.map +0 -1
  477. package/dist/chunk-S3EEFKNY.js.map +0 -1
  478. package/dist/chunk-SPI27QT6.js.map +0 -1
  479. package/dist/chunk-TP4FZJIZ.js.map +0 -1
  480. package/dist/chunk-ULYOGL6R.js.map +0 -1
  481. package/dist/chunk-VBVG2M5G.js.map +0 -1
  482. package/dist/chunk-VDX363PS.js.map +0 -1
  483. package/dist/chunk-VYM3VWOF.js.map +0 -1
  484. package/dist/chunk-WCLICCGB.js.map +0 -1
  485. package/dist/chunk-WVVA7F5A.js.map +0 -1
  486. package/dist/chunk-X6GF3FX2.js +0 -26
  487. package/dist/chunk-X6GF3FX2.js.map +0 -1
  488. package/dist/chunk-XZ2TIKGC.js.map +0 -1
  489. package/dist/chunk-ZAIM4TUE.js.map +0 -1
  490. /package/dist/{contradiction-review-WIUBAR52.js.map → capsule-cli.js.map} +0 -0
  491. /package/dist/{engine-F3GOXGE5.js.map → capsule-crypto-5CYAGVC5.js.map} +0 -0
  492. /package/dist/{chunk-KUB6JU6H.js.map → chunk-47WOM4YW.js.map} +0 -0
  493. /package/dist/{chunk-ZEM3OK2K.js.map → chunk-B2TL6GA2.js.map} +0 -0
  494. /package/dist/{chunk-3GXCSUXR.js.map → chunk-CRU27Q4J.js.map} +0 -0
  495. /package/dist/{chunk-RBBWYEFJ.js.map → chunk-G2WADRQ3.js.map} +0 -0
  496. /package/dist/{chunk-7I7FKFZH.js.map → chunk-R2L7SUX2.js.map} +0 -0
  497. /package/dist/{chunk-JL2PU6AI.js.map → chunk-R2XRID2N.js.map} +0 -0
@@ -1,15 +1,21 @@
1
1
  import {
2
2
  buildCitationGuidance
3
3
  } from "./chunk-IQT3XTKW.js";
4
- import {
5
- readEnvVar
6
- } from "./chunk-MARWOCVP.js";
7
4
  import {
8
5
  EngramAccessInputError
9
- } from "./chunk-GKFXUTJ2.js";
6
+ } from "./chunk-DR7MCMPS.js";
7
+ import {
8
+ expandTildePath
9
+ } from "./chunk-IXEJRKCZ.js";
10
10
  import {
11
11
  validateBriefingFormat
12
- } from "./chunk-WVVA7F5A.js";
12
+ } from "./chunk-SS253RXF.js";
13
+ import {
14
+ readEnvVar
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.",
@@ -859,6 +1028,171 @@ var EngramMcpServer = class {
859
1028
  },
860
1029
  additionalProperties: false
861
1030
  }
1031
+ },
1032
+ {
1033
+ name: "engram.graph_edge_decay_run",
1034
+ 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.",
1035
+ inputSchema: {
1036
+ type: "object",
1037
+ properties: {
1038
+ dryRun: { type: "boolean" }
1039
+ },
1040
+ additionalProperties: false
1041
+ }
1042
+ },
1043
+ {
1044
+ name: "engram.live_connectors_run",
1045
+ description: "Run due live connectors once. Used by the live-connector cron and available for operator-triggered sync checks.",
1046
+ inputSchema: {
1047
+ type: "object",
1048
+ properties: {
1049
+ force: {
1050
+ type: "boolean",
1051
+ description: "When true, run enabled connectors even if their poll interval has not elapsed."
1052
+ }
1053
+ },
1054
+ additionalProperties: false
1055
+ }
1056
+ },
1057
+ // ── Peer Registry tools (issue #679 PR 4/5) ─────────────────────────
1058
+ {
1059
+ name: "engram.peer_list",
1060
+ description: "List all registered peers in the peer registry (issue #679). Returns an array of peer identity records sorted alphabetically by id.",
1061
+ inputSchema: {
1062
+ type: "object",
1063
+ properties: {},
1064
+ additionalProperties: false
1065
+ }
1066
+ },
1067
+ {
1068
+ name: "engram.peer_get",
1069
+ description: "Get a single peer by id. Returns the peer's identity record or { found: false } when not found (issue #679).",
1070
+ inputSchema: {
1071
+ type: "object",
1072
+ properties: {
1073
+ id: { type: "string", description: "Peer id to look up." }
1074
+ },
1075
+ required: ["id"],
1076
+ additionalProperties: false
1077
+ }
1078
+ },
1079
+ {
1080
+ name: "engram.peer_set",
1081
+ 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.",
1082
+ inputSchema: {
1083
+ type: "object",
1084
+ properties: {
1085
+ id: { type: "string", description: "Peer id \u2014 must match PEER_ID_PATTERN." },
1086
+ kind: {
1087
+ type: "string",
1088
+ enum: ["self", "human", "agent", "integration"],
1089
+ description: "Kind of peer. Required on first write; ignored on updates."
1090
+ },
1091
+ displayName: { type: "string", description: "Human-readable display name." },
1092
+ notes: { type: "string", description: "Optional free-form markdown notes." }
1093
+ },
1094
+ required: ["id"],
1095
+ additionalProperties: false
1096
+ }
1097
+ },
1098
+ {
1099
+ name: "engram.peer_delete",
1100
+ 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.",
1101
+ inputSchema: {
1102
+ type: "object",
1103
+ properties: {
1104
+ id: { type: "string", description: "Peer id to delete." }
1105
+ },
1106
+ required: ["id"],
1107
+ additionalProperties: false
1108
+ }
1109
+ },
1110
+ {
1111
+ name: "engram.peer_profile_get",
1112
+ 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.",
1113
+ inputSchema: {
1114
+ type: "object",
1115
+ properties: {
1116
+ id: { type: "string", description: "Peer id whose profile to retrieve." }
1117
+ },
1118
+ required: ["id"],
1119
+ additionalProperties: false
1120
+ }
1121
+ },
1122
+ {
1123
+ name: "engram.peer_forget",
1124
+ 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.",
1125
+ inputSchema: {
1126
+ type: "object",
1127
+ properties: {
1128
+ id: { type: "string", description: "Peer id to purge." },
1129
+ confirm: {
1130
+ type: "string",
1131
+ enum: ["yes"],
1132
+ description: "Must be exactly 'yes' to proceed. Guard against accidental invocation."
1133
+ }
1134
+ },
1135
+ required: ["id", "confirm"],
1136
+ additionalProperties: false
1137
+ }
1138
+ },
1139
+ // ── Operator Console state (issue #688 PR 2/3) ─────────────────────────
1140
+ {
1141
+ name: "engram.console_state",
1142
+ 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.",
1143
+ inputSchema: {
1144
+ type: "object",
1145
+ properties: {
1146
+ namespace: {
1147
+ type: "string",
1148
+ description: "Optional namespace to scope the snapshot."
1149
+ }
1150
+ },
1151
+ additionalProperties: false
1152
+ }
1153
+ },
1154
+ // ── Dreams telemetry (issue #678 PR 3+4) ─────────────────────────────
1155
+ {
1156
+ name: "engram.dreams_status",
1157
+ 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.",
1158
+ inputSchema: {
1159
+ type: "object",
1160
+ properties: {
1161
+ windowHours: {
1162
+ type: "number",
1163
+ description: "How many hours to look back (default 24, minimum 1)."
1164
+ },
1165
+ namespace: {
1166
+ type: "string",
1167
+ description: "Optional namespace to read Dreams telemetry from."
1168
+ }
1169
+ },
1170
+ additionalProperties: false
1171
+ }
1172
+ },
1173
+ {
1174
+ name: "engram.dreams_run",
1175
+ 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.",
1176
+ inputSchema: {
1177
+ type: "object",
1178
+ properties: {
1179
+ phase: {
1180
+ type: "string",
1181
+ enum: ["lightSleep", "rem", "deepSleep"],
1182
+ description: "Which phase to run."
1183
+ },
1184
+ dryRun: {
1185
+ type: "boolean",
1186
+ description: "When true, report what would change without committing writes (default false)."
1187
+ },
1188
+ namespace: {
1189
+ type: "string",
1190
+ description: "Optional namespace to run the phase in."
1191
+ }
1192
+ },
1193
+ required: ["phase"],
1194
+ additionalProperties: false
1195
+ }
862
1196
  }
863
1197
  ].flatMap((tool) => withToolAliases(tool));
864
1198
  }
@@ -947,8 +1281,14 @@ var EngramMcpServer = class {
947
1281
  if (method === "tools/call") {
948
1282
  const params = request.params ?? {};
949
1283
  const name = typeof params.name === "string" ? params.name : "";
950
- const argumentsObject = params.arguments && typeof params.arguments === "object" && !Array.isArray(params.arguments) ? params.arguments : {};
951
1284
  try {
1285
+ let argumentsObject = {};
1286
+ if ("arguments" in params && params.arguments !== void 0) {
1287
+ if (params.arguments === null || typeof params.arguments !== "object" || Array.isArray(params.arguments)) {
1288
+ throw new EngramAccessInputError("tools/call arguments must be an object when provided");
1289
+ }
1290
+ argumentsObject = params.arguments;
1291
+ }
952
1292
  const effectivePrincipal = options?.principalOverride ?? this.authenticatedPrincipal;
953
1293
  const result = await this.callTool(name, argumentsObject, effectivePrincipal, options?.sessionId);
954
1294
  return {
@@ -1108,13 +1448,53 @@ ${body}`;
1108
1448
  async callTool(name, args, effectivePrincipal, mcpSessionId) {
1109
1449
  switch (toLegacyToolName(name)) {
1110
1450
  case "engram.recall": {
1451
+ let disclosure;
1452
+ if ("disclosure" in args && args.disclosure !== void 0 && args.disclosure !== null) {
1453
+ if (typeof args.disclosure !== "string") {
1454
+ throw new EngramAccessInputError(
1455
+ "disclosure must be a string (one of: chunk, section, raw)"
1456
+ );
1457
+ }
1458
+ disclosure = args.disclosure;
1459
+ }
1460
+ if ("cwd" in args && args.cwd !== void 0 && args.cwd !== null && typeof args.cwd !== "string") {
1461
+ throw new EngramAccessInputError("cwd must be a string");
1462
+ }
1463
+ if ("projectTag" in args && args.projectTag !== void 0 && args.projectTag !== null && typeof args.projectTag !== "string") {
1464
+ throw new EngramAccessInputError("projectTag must be a string");
1465
+ }
1466
+ if ("asOf" in args && args.asOf !== void 0 && args.asOf !== null && typeof args.asOf !== "string") {
1467
+ throw new EngramAccessInputError("asOf must be a string (ISO 8601 timestamp)");
1468
+ }
1469
+ let tags;
1470
+ if ("tags" in args && args.tags !== void 0 && args.tags !== null) {
1471
+ if (!Array.isArray(args.tags) || !args.tags.every((t) => typeof t === "string")) {
1472
+ throw new EngramAccessInputError("tags must be an array of strings");
1473
+ }
1474
+ tags = args.tags;
1475
+ }
1476
+ let tagMatch;
1477
+ if ("tagMatch" in args && args.tagMatch !== void 0 && args.tagMatch !== null) {
1478
+ if (typeof args.tagMatch !== "string" || args.tagMatch !== "any" && args.tagMatch !== "all") {
1479
+ throw new EngramAccessInputError(
1480
+ `tagMatch must be one of: any, all (got: ${String(args.tagMatch)})`
1481
+ );
1482
+ }
1483
+ tagMatch = args.tagMatch;
1484
+ }
1111
1485
  const response = await this.service.recall({
1112
1486
  query: typeof args.query === "string" ? args.query : "",
1113
1487
  sessionKey: typeof args.sessionKey === "string" ? args.sessionKey : void 0,
1114
1488
  namespace: typeof args.namespace === "string" ? args.namespace : void 0,
1115
1489
  topK: typeof args.topK === "number" && Number.isFinite(args.topK) ? args.topK : void 0,
1116
1490
  mode: typeof args.mode === "string" ? args.mode : void 0,
1117
- includeDebug: args.includeDebug === true
1491
+ includeDebug: args.includeDebug === true,
1492
+ disclosure,
1493
+ cwd: typeof args.cwd === "string" ? args.cwd : void 0,
1494
+ projectTag: typeof args.projectTag === "string" ? args.projectTag : void 0,
1495
+ asOf: typeof args.asOf === "string" ? args.asOf : void 0,
1496
+ ...tags !== void 0 ? { tags } : {},
1497
+ ...tagMatch !== void 0 ? { tagMatch } : {}
1118
1498
  });
1119
1499
  if (this.shouldEmitCitations(mcpSessionId)) {
1120
1500
  const citations = this.buildRecallCitations(response);
@@ -1136,6 +1516,26 @@ ${body}`;
1136
1516
  });
1137
1517
  case "engram.set_coding_context": {
1138
1518
  const sessionKey = typeof args.sessionKey === "string" ? args.sessionKey : "";
1519
+ const hasProjectTag = typeof args.projectTag === "string" && args.projectTag.trim().length > 0;
1520
+ const hasCodingContext = "codingContext" in args;
1521
+ if (!hasCodingContext && hasProjectTag) {
1522
+ const tag = args.projectTag.trim();
1523
+ this.service.setCodingContext({
1524
+ sessionKey,
1525
+ codingContext: {
1526
+ projectId: `tag:${tag}`,
1527
+ branch: null,
1528
+ rootPath: `tag:${tag}`,
1529
+ defaultBranch: null
1530
+ }
1531
+ });
1532
+ return { ok: true };
1533
+ }
1534
+ if (!hasCodingContext && !hasProjectTag) {
1535
+ throw new EngramAccessInputError(
1536
+ "set_coding_context requires either codingContext or projectTag"
1537
+ );
1538
+ }
1139
1539
  const rawCtx = args.codingContext;
1140
1540
  let codingContext = null;
1141
1541
  if (rawCtx !== null) {
@@ -1183,12 +1583,22 @@ ${body}`;
1183
1583
  }
1184
1584
  budget = parsed;
1185
1585
  }
1586
+ let disclosure;
1587
+ if ("disclosure" in args && args.disclosure !== void 0 && args.disclosure !== null && args.disclosure !== "") {
1588
+ if (typeof args.disclosure !== "string") {
1589
+ throw new Error(
1590
+ "engram.recall_xray: disclosure must be a string (one of: chunk, section, raw)"
1591
+ );
1592
+ }
1593
+ disclosure = args.disclosure;
1594
+ }
1186
1595
  return this.service.recallXray({
1187
1596
  query,
1188
1597
  sessionKey,
1189
1598
  namespace,
1190
1599
  budget,
1191
- authenticatedPrincipal: effectivePrincipal
1600
+ authenticatedPrincipal: effectivePrincipal,
1601
+ ...disclosure !== void 0 ? { disclosure } : {}
1192
1602
  });
1193
1603
  }
1194
1604
  case "engram.day_summary":
@@ -1197,6 +1607,35 @@ ${body}`;
1197
1607
  sessionKey: typeof args.sessionKey === "string" ? args.sessionKey : void 0,
1198
1608
  namespace: typeof args.namespace === "string" ? args.namespace : void 0
1199
1609
  });
1610
+ case "engram.capsule_export": {
1611
+ const body = parseMcpRequest("capsuleExport", args);
1612
+ return this.service.capsuleExport({
1613
+ name: body.name,
1614
+ namespace: body.namespace,
1615
+ principal: effectivePrincipal,
1616
+ since: body.since,
1617
+ includeKinds: body.includeKinds,
1618
+ peerIds: body.peerIds,
1619
+ includeTranscripts: body.includeTranscripts,
1620
+ encrypt: body.encrypt
1621
+ });
1622
+ }
1623
+ case "engram.capsule_import": {
1624
+ const body = parseMcpRequest("capsuleImport", args);
1625
+ return this.service.capsuleImport({
1626
+ archivePath: expandTildePath(body.archivePath),
1627
+ namespace: body.namespace,
1628
+ principal: effectivePrincipal,
1629
+ mode: body.mode
1630
+ });
1631
+ }
1632
+ case "engram.capsule_list": {
1633
+ const body = parseMcpRequest("capsuleList", args);
1634
+ return this.service.capsuleList({
1635
+ namespace: body.namespace,
1636
+ principal: effectivePrincipal
1637
+ });
1638
+ }
1200
1639
  case "engram.memory_governance_run":
1201
1640
  return this.service.governanceRun({
1202
1641
  namespace: typeof args.namespace === "string" ? args.namespace : void 0,
@@ -1214,6 +1653,15 @@ ${body}`;
1214
1653
  },
1215
1654
  effectivePrincipal
1216
1655
  );
1656
+ case "engram.pattern_reinforcement_run":
1657
+ return this.service.patternReinforcementRun(
1658
+ {
1659
+ namespace: typeof args.namespace === "string" ? args.namespace : void 0,
1660
+ authenticatedPrincipal: effectivePrincipal,
1661
+ force: args.force === true
1662
+ },
1663
+ effectivePrincipal
1664
+ );
1217
1665
  case "remnic.procedural_stats":
1218
1666
  case "engram.procedural_stats":
1219
1667
  return this.service.procedureStats(
@@ -1280,14 +1728,23 @@ ${body}`;
1280
1728
  typeof args.namespace === "string" ? args.namespace : void 0,
1281
1729
  effectivePrincipal
1282
1730
  );
1283
- case "engram.observe":
1731
+ case "engram.observe": {
1732
+ if ("cwd" in args && args.cwd !== void 0 && args.cwd !== null && typeof args.cwd !== "string") {
1733
+ throw new EngramAccessInputError("cwd must be a string");
1734
+ }
1735
+ if ("projectTag" in args && args.projectTag !== void 0 && args.projectTag !== null && typeof args.projectTag !== "string") {
1736
+ throw new EngramAccessInputError("projectTag must be a string");
1737
+ }
1284
1738
  return this.service.observe({
1285
1739
  sessionKey: typeof args.sessionKey === "string" ? args.sessionKey : "",
1286
1740
  messages: Array.isArray(args.messages) ? args.messages : [],
1287
1741
  namespace: typeof args.namespace === "string" ? args.namespace : void 0,
1288
1742
  authenticatedPrincipal: effectivePrincipal,
1289
- skipExtraction: args.skipExtraction === true
1743
+ skipExtraction: args.skipExtraction === true,
1744
+ cwd: typeof args.cwd === "string" ? args.cwd : void 0,
1745
+ projectTag: typeof args.projectTag === "string" ? args.projectTag : void 0
1290
1746
  });
1747
+ }
1291
1748
  case "engram.lcm_search":
1292
1749
  return this.service.lcmSearch({
1293
1750
  query: typeof args.query === "string" ? args.query : "",
@@ -1497,6 +1954,43 @@ ${body}`;
1497
1954
  return this.service.graphExplainLastRecall(
1498
1955
  typeof args.namespace === "string" ? args.namespace : void 0
1499
1956
  );
1957
+ case "engram.graph_snapshot": {
1958
+ if (args.limit !== void 0 && typeof args.limit !== "number") {
1959
+ throw new Error("engram.graph_snapshot: limit must be a number");
1960
+ }
1961
+ if (args.since !== void 0 && typeof args.since !== "string") {
1962
+ throw new Error("engram.graph_snapshot: since must be a string");
1963
+ }
1964
+ if (args.focusNodeId !== void 0 && typeof args.focusNodeId !== "string") {
1965
+ throw new Error("engram.graph_snapshot: focusNodeId must be a string");
1966
+ }
1967
+ let categories;
1968
+ if (args.categories !== void 0) {
1969
+ if (!Array.isArray(args.categories)) {
1970
+ throw new Error(
1971
+ "engram.graph_snapshot: categories must be an array of strings"
1972
+ );
1973
+ }
1974
+ categories = args.categories.map((value, index) => {
1975
+ if (typeof value !== "string") {
1976
+ throw new Error(
1977
+ `engram.graph_snapshot: categories[${index}] must be a string`
1978
+ );
1979
+ }
1980
+ return value;
1981
+ });
1982
+ }
1983
+ return this.service.graphSnapshot(
1984
+ {
1985
+ namespace: typeof args.namespace === "string" ? args.namespace : void 0,
1986
+ limit: typeof args.limit === "number" ? args.limit : void 0,
1987
+ since: typeof args.since === "string" ? args.since : void 0,
1988
+ focusNodeId: typeof args.focusNodeId === "string" ? args.focusNodeId : void 0,
1989
+ ...categories !== void 0 ? { categories } : {}
1990
+ },
1991
+ effectivePrincipal
1992
+ );
1993
+ }
1500
1994
  case "engram.memory_feedback":
1501
1995
  return this.service.memoryFeedback({
1502
1996
  memoryId: typeof args.memoryId === "string" ? args.memoryId : "",
@@ -1550,7 +2044,7 @@ ${body}`;
1550
2044
  // ── Contradiction Review (issue #520) ──────────────────────────────────
1551
2045
  case "engram.review_list":
1552
2046
  case "remnic.review_list": {
1553
- const { listPairs } = await import("./contradiction-review-WIUBAR52.js");
2047
+ const { listPairs } = await import("./contradiction-review-5LTTVDQV.js");
1554
2048
  const VALID_REVIEW_FILTERS = /* @__PURE__ */ new Set(["all", "unresolved", "contradicts", "independent", "duplicates", "needs-user"]);
1555
2049
  const rawFilter = typeof args.filter === "string" ? args.filter : "unresolved";
1556
2050
  if (!VALID_REVIEW_FILTERS.has(rawFilter)) {
@@ -1567,14 +2061,14 @@ ${body}`;
1567
2061
  const verb = typeof args.verb === "string" ? args.verb : "";
1568
2062
  if (!pairId) throw new Error("pairId is required");
1569
2063
  if (!verb) throw new Error("verb is required");
1570
- const { isValidResolutionVerb } = await import("./resolution-QBTDHTG7.js");
2064
+ const { isValidResolutionVerb } = await import("./resolution-YGIBORXI.js");
1571
2065
  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");
2066
+ const { executeResolution } = await import("./resolution-YGIBORXI.js");
1573
2067
  return executeResolution(this.service.memoryDir, this.service.storageRef, pairId, verb);
1574
2068
  }
1575
2069
  case "engram.contradiction_scan_run":
1576
2070
  case "remnic.contradiction_scan_run": {
1577
- const { runContradictionScan } = await import("./contradiction-scan-E3GJTI4F.js");
2071
+ const { runContradictionScan } = await import("./contradiction-scan-3Z6YW7YA.js");
1578
2072
  return runContradictionScan({
1579
2073
  storage: this.service.storageRef,
1580
2074
  config: this.service.configRef,
@@ -1585,6 +2079,148 @@ ${body}`;
1585
2079
  namespace: typeof args.namespace === "string" ? args.namespace : void 0
1586
2080
  });
1587
2081
  }
2082
+ case "engram.graph_edge_decay_run":
2083
+ case "remnic.graph_edge_decay_run": {
2084
+ const cfg = this.service.configRef;
2085
+ if (!cfg.graphEdgeDecayEnabled) {
2086
+ return {
2087
+ ranAt: (/* @__PURE__ */ new Date()).toISOString(),
2088
+ disabled: true,
2089
+ reason: "graphEdgeDecayEnabled is false"
2090
+ };
2091
+ }
2092
+ const { runGraphEdgeDecayMaintenanceAcrossNamespaces } = await import("./graph-edge-decay-PWB63GRE.js");
2093
+ const dryRun = args.dryRun === true;
2094
+ const results = await runGraphEdgeDecayMaintenanceAcrossNamespaces(
2095
+ this.service.memoryDir,
2096
+ {
2097
+ windowMs: cfg.graphEdgeDecayWindowMs,
2098
+ perWindow: cfg.graphEdgeDecayPerWindow,
2099
+ floor: cfg.graphEdgeDecayFloor,
2100
+ visibilityThreshold: cfg.graphEdgeDecayVisibilityThreshold,
2101
+ dryRun,
2102
+ namespacesEnabled: cfg.namespacesEnabled === true,
2103
+ defaultNamespace: cfg.defaultNamespace
2104
+ }
2105
+ );
2106
+ return { results };
2107
+ }
2108
+ case "engram.live_connectors_run":
2109
+ case "remnic.live_connectors_run":
2110
+ return this.service.liveConnectorsRun(
2111
+ {
2112
+ authenticatedPrincipal: effectivePrincipal,
2113
+ force: args.force === true
2114
+ },
2115
+ effectivePrincipal
2116
+ );
2117
+ // ── Peer Registry dispatchers (issue #679 PR 4/5) ─────────────────
2118
+ case "engram.peer_list":
2119
+ case "remnic.peer_list":
2120
+ return this.service.peerList();
2121
+ case "engram.peer_get":
2122
+ case "remnic.peer_get": {
2123
+ const id = typeof args.id === "string" ? args.id : "";
2124
+ if (!id) throw new Error("engram.peer_get: id is required");
2125
+ return this.service.peerGet(id);
2126
+ }
2127
+ case "engram.peer_set":
2128
+ case "remnic.peer_set": {
2129
+ const id = typeof args.id === "string" ? args.id : "";
2130
+ if (!id) throw new Error("engram.peer_set: id is required");
2131
+ if (args.kind !== void 0 && typeof args.kind !== "string") {
2132
+ throw new Error("engram.peer_set: kind must be a string when provided");
2133
+ }
2134
+ if (args.displayName !== void 0 && typeof args.displayName !== "string") {
2135
+ throw new Error("engram.peer_set: displayName must be a string when provided");
2136
+ }
2137
+ if (args.notes !== void 0 && typeof args.notes !== "string") {
2138
+ throw new Error("engram.peer_set: notes must be a string when provided");
2139
+ }
2140
+ return this.service.peerSet({
2141
+ id,
2142
+ kind: typeof args.kind === "string" ? args.kind : void 0,
2143
+ displayName: typeof args.displayName === "string" ? args.displayName : void 0,
2144
+ notes: typeof args.notes === "string" ? args.notes : void 0
2145
+ });
2146
+ }
2147
+ case "engram.peer_delete":
2148
+ case "remnic.peer_delete": {
2149
+ const id = typeof args.id === "string" ? args.id : "";
2150
+ if (!id) throw new Error("engram.peer_delete: id is required");
2151
+ return this.service.peerDelete(id);
2152
+ }
2153
+ case "engram.peer_profile_get":
2154
+ case "remnic.peer_profile_get": {
2155
+ const id = typeof args.id === "string" ? args.id : "";
2156
+ if (!id) throw new Error("engram.peer_profile_get: id is required");
2157
+ return this.service.peerProfileGet(id);
2158
+ }
2159
+ case "engram.peer_forget":
2160
+ case "remnic.peer_forget": {
2161
+ const id = typeof args.id === "string" ? args.id : "";
2162
+ if (!id) throw new Error("engram.peer_forget: id is required");
2163
+ const confirm = typeof args.confirm === "string" ? args.confirm : "";
2164
+ if (confirm !== "yes") {
2165
+ throw new Error(
2166
+ "engram.peer_forget: confirm must be 'yes' to prevent accidental data loss"
2167
+ );
2168
+ }
2169
+ return this.service.peerForget(id, { confirm: "yes" });
2170
+ }
2171
+ // ── Operator Console state (issue #688 PR 2/3) ──────────────────────────
2172
+ case "engram.console_state":
2173
+ case "remnic.console_state":
2174
+ return this.service.consoleState(
2175
+ typeof args.namespace === "string" ? args.namespace : void 0,
2176
+ effectivePrincipal
2177
+ );
2178
+ // ── Dreams telemetry (issue #678 PR 3+4) ──────────────────────────────
2179
+ case "engram.dreams_status":
2180
+ case "remnic.dreams_status": {
2181
+ const { normalizeDreamsStatusWindowHours } = await import("./dreams-ledger-LR2NBAZE.js");
2182
+ let windowHours = 24;
2183
+ try {
2184
+ windowHours = normalizeDreamsStatusWindowHours(args.windowHours);
2185
+ } catch {
2186
+ throw new Error(
2187
+ `engram.dreams_status: windowHours must be a positive integer (e.g. 24). Got: ${String(args.windowHours)}`
2188
+ );
2189
+ }
2190
+ if ("namespace" in args && args.namespace !== void 0 && typeof args.namespace !== "string") {
2191
+ throw new Error("engram.dreams_status: namespace must be a string when provided");
2192
+ }
2193
+ const namespace = typeof args.namespace === "string" ? args.namespace : void 0;
2194
+ return this.service.dreamsStatus({
2195
+ windowHours,
2196
+ namespace,
2197
+ principal: effectivePrincipal
2198
+ });
2199
+ }
2200
+ case "engram.dreams_run":
2201
+ case "remnic.dreams_run": {
2202
+ const VALID_PHASES = ["lightSleep", "rem", "deepSleep"];
2203
+ const phase = typeof args.phase === "string" ? args.phase : "";
2204
+ if (!phase || !VALID_PHASES.includes(phase)) {
2205
+ throw new Error(
2206
+ `engram.dreams_run: phase is required and must be one of: ${VALID_PHASES.join(", ")}`
2207
+ );
2208
+ }
2209
+ if ("dryRun" in args && args.dryRun !== void 0 && typeof args.dryRun !== "boolean") {
2210
+ throw new Error("engram.dreams_run: dryRun must be a boolean when provided");
2211
+ }
2212
+ if ("namespace" in args && args.namespace !== void 0 && typeof args.namespace !== "string") {
2213
+ throw new Error("engram.dreams_run: namespace must be a string when provided");
2214
+ }
2215
+ const namespace = typeof args.namespace === "string" ? args.namespace : void 0;
2216
+ const dryRun = args.dryRun === true;
2217
+ return this.service.dreamsRun({
2218
+ phase,
2219
+ dryRun,
2220
+ namespace,
2221
+ authenticatedPrincipal: effectivePrincipal
2222
+ });
2223
+ }
1588
2224
  default:
1589
2225
  throw new Error(`unknown tool: ${name}`);
1590
2226
  }
@@ -1594,4 +2230,4 @@ ${body}`;
1594
2230
  export {
1595
2231
  EngramMcpServer
1596
2232
  };
1597
- //# sourceMappingURL=chunk-HK3FGIEW.js.map
2233
+ //# sourceMappingURL=chunk-4PLGJRBV.js.map