@remnic/core 9.69.10 → 9.69.11

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 (578) hide show
  1. package/dist/access-admin-ops-surface.d.ts +15 -13
  2. package/dist/access-admin-ops-surface.js +46 -34
  3. package/dist/access-authorization-probe.d.ts +13 -11
  4. package/dist/access-authorization-probe.js +47 -35
  5. package/dist/access-boundary.d.ts +13 -11
  6. package/dist/access-boundary.js +46 -34
  7. package/dist/access-cli.js +108 -97
  8. package/dist/access-cli.js.map +1 -1
  9. package/dist/access-coding-context-resolution.d.ts +2 -1
  10. package/dist/access-extraction-force-flush.d.ts +13 -11
  11. package/dist/access-extraction-force-flush.js +46 -34
  12. package/dist/access-health-types.d.ts +2 -1
  13. package/dist/access-http-lcm-compaction.d.ts +13 -11
  14. package/dist/access-http-lifecycle-flush.d.ts +13 -11
  15. package/dist/access-http-offline-stream.d.ts +13 -11
  16. package/dist/access-http-query.d.ts +3 -2
  17. package/dist/access-http-query.js +48 -36
  18. package/dist/access-http.d.ts +14 -12
  19. package/dist/access-http.js +67 -53
  20. package/dist/access-identity-continuity-surface.d.ts +10 -9
  21. package/dist/access-identity-continuity-surface.js +46 -34
  22. package/dist/access-lcm-surface.d.ts +13 -11
  23. package/dist/access-lcm-surface.js +46 -34
  24. package/dist/access-mcp-output-schemas.js +1 -1
  25. package/dist/access-mcp.d.ts +13 -11
  26. package/dist/access-mcp.js +58 -45
  27. package/dist/access-memory-search-fanout.d.ts +3 -2
  28. package/dist/{access-namespace-preflight-S8fhQcCo.d.ts → access-namespace-preflight-Cy0yPsaE.d.ts} +1 -1
  29. package/dist/access-namespace-preflight.d.ts +4 -3
  30. package/dist/access-namespace-preflight.js +46 -34
  31. package/dist/access-observe-write-surface.d.ts +15 -13
  32. package/dist/access-observe-write-surface.js +46 -34
  33. package/dist/access-offline-manifest.d.ts +10 -9
  34. package/dist/access-offline-manifest.js +3 -3
  35. package/dist/access-operations-batch.js +49 -37
  36. package/dist/access-operations.d.ts +14 -12
  37. package/dist/access-operations.js +54 -42
  38. package/dist/access-recall-concurrency.d.ts +13 -11
  39. package/dist/access-recall-concurrency.js +46 -34
  40. package/dist/access-recall-response.d.ts +13 -11
  41. package/dist/access-recall-response.js +46 -34
  42. package/dist/access-recall-surface.d.ts +13 -11
  43. package/dist/access-recall-surface.js +46 -34
  44. package/dist/access-schema.d.ts +18 -1
  45. package/dist/access-schema.js +7 -5
  46. package/dist/{access-service-DcfM0Vf0.d.ts → access-service-Cqfk3dD1.d.ts} +25 -8
  47. package/dist/access-service-helpers.d.ts +13 -11
  48. package/dist/access-service.d.ts +13 -11
  49. package/dist/access-service.js +46 -34
  50. package/dist/access-surface-catalog.d.ts +13 -11
  51. package/dist/access-surface-catalog.js +50 -36
  52. package/dist/access-surface-catalog.js.map +1 -1
  53. package/dist/access-wearables-meetings-surface.d.ts +4 -3
  54. package/dist/action-confidence.d.ts +2 -1
  55. package/dist/active-memory-bridge.d.ts +2 -1
  56. package/dist/active-recall.d.ts +2 -1
  57. package/dist/active-recall.js +6 -5
  58. package/dist/active-recall.js.map +1 -1
  59. package/dist/adapters/index.js +4 -4
  60. package/dist/adapters/registry.js +2 -2
  61. package/dist/ambient-provenance.d.ts +2 -1
  62. package/dist/artifact-search.d.ts +2 -1
  63. package/dist/behavior-learner.d.ts +2 -1
  64. package/dist/behavior-signals.d.ts +2 -1
  65. package/dist/bootstrap.d.ts +10 -9
  66. package/dist/briefing-window.d.ts +3 -2
  67. package/dist/briefing.d.ts +3 -2
  68. package/dist/briefing.js +13 -13
  69. package/dist/buffer-surprise-report.d.ts +2 -1
  70. package/dist/buffer-turn-helpers.d.ts +2 -1
  71. package/dist/buffer.d.ts +3 -2
  72. package/dist/bulk-import/index.d.ts +4 -3
  73. package/dist/calibration.d.ts +2 -1
  74. package/dist/capabilities.d.ts +2 -1
  75. package/dist/{catalog-BmBXTtOs.d.ts → catalog-9X8WpZNO.d.ts} +1 -1
  76. package/dist/causal-behavior.d.ts +2 -1
  77. package/dist/causal-behavior.js +2 -2
  78. package/dist/causal-chain.js +2 -2
  79. package/dist/causal-consolidation.d.ts +2 -1
  80. package/dist/causal-consolidation.js +16 -16
  81. package/dist/causal-retrieval.js +2 -2
  82. package/dist/causal-trajectory-graph.d.ts +2 -1
  83. package/dist/causal-trajectory-graph.js +2 -2
  84. package/dist/causal-trajectory.js +1 -1
  85. package/dist/{chunk-D5VPIJN3.js → chunk-227WJVPY.js} +2 -2
  86. package/dist/{chunk-Y3BWCIY2.js → chunk-2EHDPHMD.js} +2 -2
  87. package/dist/{chunk-2LKW6OO7.js → chunk-2XJDAEAM.js} +2 -2
  88. package/dist/{chunk-P23JWI3D.js → chunk-3ITTF7YH.js} +52 -52
  89. package/dist/{chunk-3DT2F5OI.js → chunk-3YKOFCKP.js} +11 -6
  90. package/dist/chunk-3YKOFCKP.js.map +1 -0
  91. package/dist/{chunk-NGP2FPB2.js → chunk-4UVDLNHQ.js} +2 -2
  92. package/dist/{chunk-HXWOVCS6.js → chunk-4WIKMOE3.js} +44 -22
  93. package/dist/chunk-4WIKMOE3.js.map +1 -0
  94. package/dist/{chunk-6RPB2TDG.js → chunk-5HO3QBAD.js} +11 -6
  95. package/dist/chunk-5HO3QBAD.js.map +1 -0
  96. package/dist/{chunk-AYWPIH4M.js → chunk-5P2KNFJZ.js} +149 -25
  97. package/dist/chunk-5P2KNFJZ.js.map +1 -0
  98. package/dist/{chunk-FJMIQTMH.js → chunk-5YQ7RFSO.js} +2 -2
  99. package/dist/{chunk-KQAFEZQX.js → chunk-7LCGFUMB.js} +4 -4
  100. package/dist/{chunk-EESYTBXV.js → chunk-7NCUHD5U.js} +2 -2
  101. package/dist/{chunk-X574KX52.js → chunk-7ZMU4XQT.js} +2 -2
  102. package/dist/{chunk-SG3Z67FB.js → chunk-APZXA4WI.js} +2 -2
  103. package/dist/{chunk-2QSZNTDO.js → chunk-AU7Q3LSC.js} +4 -4
  104. package/dist/{chunk-VGMRI4J6.js → chunk-B75VCEX5.js} +4 -4
  105. package/dist/{chunk-D35XLYQ7.js → chunk-BE4Y6GK6.js} +11 -11
  106. package/dist/{chunk-ELKD5PCD.js → chunk-BEXFNGQ3.js} +3 -3
  107. package/dist/{chunk-U5SRTYFS.js → chunk-BFDOBESV.js} +2 -2
  108. package/dist/{chunk-OLT3YTDH.js → chunk-BIJAWZYW.js} +4 -4
  109. package/dist/{chunk-FU2NYFX6.js → chunk-BO4PWIJY.js} +3 -3
  110. package/dist/{chunk-JMAG7WZ7.js → chunk-BX6GW4KC.js} +2 -2
  111. package/dist/chunk-CC37E3QM.js +198 -0
  112. package/dist/chunk-CC37E3QM.js.map +1 -0
  113. package/dist/{chunk-J2R275FN.js → chunk-CTCGHNWN.js} +4 -4
  114. package/dist/{chunk-X5PIDJ3L.js → chunk-DA4ZMCBU.js} +3 -3
  115. package/dist/{chunk-IVAW3HBF.js → chunk-DH3V7RCQ.js} +21 -13
  116. package/dist/chunk-DH3V7RCQ.js.map +1 -0
  117. package/dist/chunk-DXFG2VGN.js +50 -0
  118. package/dist/chunk-DXFG2VGN.js.map +1 -0
  119. package/dist/{chunk-4OFKZAJG.js → chunk-EAARGPWI.js} +2 -1
  120. package/dist/chunk-EAARGPWI.js.map +1 -0
  121. package/dist/{chunk-H6RSANGQ.js → chunk-ETZ7KKOS.js} +2 -2
  122. package/dist/{chunk-K4E3Y3ZX.js → chunk-G7VEQEMG.js} +2 -1
  123. package/dist/chunk-G7VEQEMG.js.map +1 -0
  124. package/dist/{chunk-XZBXINXZ.js → chunk-GIC6BASP.js} +4 -4
  125. package/dist/{chunk-SXQZMC7R.js → chunk-GR4C3FHT.js} +2 -2
  126. package/dist/{chunk-7DYGPGCT.js → chunk-H5IIBGDM.js} +2 -2
  127. package/dist/{chunk-CNNXMIS6.js → chunk-HFRGCNFY.js} +10 -10
  128. package/dist/chunk-HRATODNO.js +28 -0
  129. package/dist/chunk-HRATODNO.js.map +1 -0
  130. package/dist/{chunk-MAG6M3B6.js → chunk-HTOWFFAI.js} +2 -2
  131. package/dist/chunk-HUSTM6PU.js +27 -0
  132. package/dist/chunk-HUSTM6PU.js.map +1 -0
  133. package/dist/{chunk-FOCMJEHH.js → chunk-I4QAH4SY.js} +3 -3
  134. package/dist/{chunk-FSGCXGK6.js → chunk-I6DUKBUI.js} +2 -2
  135. package/dist/{chunk-VI637ILW.js → chunk-IN673LEP.js} +48 -15
  136. package/dist/chunk-IN673LEP.js.map +1 -0
  137. package/dist/{chunk-6FUMA6AA.js → chunk-JGXMA6HL.js} +2 -2
  138. package/dist/{chunk-TA7UZZMW.js → chunk-JHTF22NQ.js} +2 -2
  139. package/dist/{chunk-DZ3CNJPB.js → chunk-LDOQE34V.js} +2 -2
  140. package/dist/{chunk-MEW53VQJ.js → chunk-LDWIPYJ6.js} +7 -7
  141. package/dist/{chunk-227UFSEQ.js → chunk-LEPOP46W.js} +4 -4
  142. package/dist/{chunk-KJTSWJZN.js → chunk-LF6SHWVV.js} +2 -2
  143. package/dist/{chunk-G6OZZX7P.js → chunk-LJAP4KSW.js} +2 -2
  144. package/dist/{chunk-NV6BTBUI.js → chunk-LJNLLNEM.js} +2 -2
  145. package/dist/{chunk-FFFZEF6B.js → chunk-LUDXSSTW.js} +2 -2
  146. package/dist/{chunk-PCH2CVCS.js → chunk-LWBSEYW3.js} +6 -6
  147. package/dist/chunk-M6RORUO5.js +59 -0
  148. package/dist/chunk-M6RORUO5.js.map +1 -0
  149. package/dist/{chunk-FMUJGGKW.js → chunk-M7DGN6JZ.js} +3 -3
  150. package/dist/{chunk-TZIHB2LP.js → chunk-MNH2GM4O.js} +5 -5
  151. package/dist/{chunk-RACZB5HT.js → chunk-N37X5RU7.js} +4 -4
  152. package/dist/{chunk-LK4TOYPU.js → chunk-NF3NMAG7.js} +2 -2
  153. package/dist/{chunk-QL4U3SJA.js → chunk-NHLEFBE2.js} +11 -3
  154. package/dist/chunk-NHLEFBE2.js.map +1 -0
  155. package/dist/chunk-NN5CQTAJ.js +42 -0
  156. package/dist/chunk-NN5CQTAJ.js.map +1 -0
  157. package/dist/{chunk-AG46P24C.js → chunk-NNBZS3DY.js} +4 -4
  158. package/dist/{chunk-LZ2JTO7N.js → chunk-OASGWNYL.js} +2 -2
  159. package/dist/chunk-OEDW4ER7.js +62 -0
  160. package/dist/chunk-OEDW4ER7.js.map +1 -0
  161. package/dist/{chunk-C2JCVZWX.js → chunk-OLBZ2WGG.js} +2 -2
  162. package/dist/{chunk-Z3SQEEB6.js → chunk-OUKBMQ2O.js} +2 -2
  163. package/dist/{chunk-XXW32OL7.js → chunk-OYV6RKPM.js} +1 -1
  164. package/dist/chunk-OYV6RKPM.js.map +1 -0
  165. package/dist/{chunk-2Z3DG5CQ.js → chunk-P6GKRT2H.js} +1 -1
  166. package/dist/{chunk-UGA6PZTX.js → chunk-P7LVYPIX.js} +3 -3
  167. package/dist/{chunk-26JWBSWD.js → chunk-PGCZLHRB.js} +11 -3
  168. package/dist/chunk-PGCZLHRB.js.map +1 -0
  169. package/dist/{chunk-VE45LRCE.js → chunk-QRDSXR3V.js} +2 -2
  170. package/dist/{chunk-KS67VHXA.js → chunk-QUVWFZOU.js} +2 -2
  171. package/dist/{chunk-AI4QFDPR.js → chunk-R7FXPG4T.js} +2 -2
  172. package/dist/chunk-RF2SMMPP.js +37 -0
  173. package/dist/chunk-RF2SMMPP.js.map +1 -0
  174. package/dist/{chunk-X66BHMAU.js → chunk-RJ57OOCD.js} +2 -2
  175. package/dist/chunk-S5G2LAL7.js +354 -0
  176. package/dist/chunk-S5G2LAL7.js.map +1 -0
  177. package/dist/{chunk-VXMKW7YN.js → chunk-TRLCMLX7.js} +2 -2
  178. package/dist/{chunk-ELCMVOQT.js → chunk-V3HUBF7T.js} +2 -2
  179. package/dist/{chunk-KMIAD7JR.js → chunk-VHAKBUBD.js} +2 -2
  180. package/dist/{chunk-GS5IFIVE.js → chunk-VYD63IFH.js} +3 -3
  181. package/dist/chunk-VZIAVM72.js +49 -0
  182. package/dist/chunk-VZIAVM72.js.map +1 -0
  183. package/dist/chunk-WTWQA7BB.js +28 -0
  184. package/dist/chunk-WTWQA7BB.js.map +1 -0
  185. package/dist/{chunk-TBRG2SYY.js → chunk-X4FIZAVQ.js} +94 -52
  186. package/dist/chunk-X4FIZAVQ.js.map +1 -0
  187. package/dist/{chunk-WSFPNCRA.js → chunk-XFPHV65N.js} +2 -2
  188. package/dist/{chunk-JCUG7AXZ.js → chunk-XJJYSX6F.js} +4 -4
  189. package/dist/{chunk-I6DURYZI.js → chunk-XMIAU4CO.js} +2 -2
  190. package/dist/{chunk-PJIGYPO5.js → chunk-XQGFIAG7.js} +2 -2
  191. package/dist/{chunk-B2URC6LJ.js → chunk-YWN3GYI2.js} +2 -2
  192. package/dist/{chunk-TG6JEJDV.js → chunk-Z33VUMKY.js} +3 -3
  193. package/dist/{cli-CFpMhqz5.d.ts → cli-Dk-lM_tI.d.ts} +5 -5
  194. package/dist/cli.d.ts +15 -13
  195. package/dist/cli.js +88 -77
  196. package/dist/coding/export-okf-codegraph.d.ts +2 -1
  197. package/dist/coding/export-okf-codegraph.js +13 -13
  198. package/dist/coding/pre-action-gate.d.ts +2 -1
  199. package/dist/coding/pre-action-gate.js +2 -2
  200. package/dist/compounding/engine.d.ts +3 -2
  201. package/dist/compounding/engine.js +15 -14
  202. package/dist/compounding/preference-consolidator.d.ts +2 -1
  203. package/dist/compression-optimizer.d.ts +2 -1
  204. package/dist/config.d.ts +2 -1
  205. package/dist/config.js +6 -5
  206. package/dist/connectors/codex-materialize-runner.d.ts +2 -1
  207. package/dist/connectors/codex-materialize-runner.js +13 -13
  208. package/dist/connectors/codex-materialize.d.ts +2 -1
  209. package/dist/connectors/index.d.ts +2 -1
  210. package/dist/connectors/index.js +13 -13
  211. package/dist/consolidation-provenance-check.d.ts +3 -2
  212. package/dist/consolidation-undo.d.ts +3 -2
  213. package/dist/contradiction/index.d.ts +4 -3
  214. package/dist/converge-config.d.ts +2 -1
  215. package/dist/convergence-refresh.d.ts +3 -2
  216. package/dist/convergence-refresh.js +15 -15
  217. package/dist/conversation-index/backend.d.ts +2 -1
  218. package/dist/conversation-index/backend.js +2 -2
  219. package/dist/conversation-index/chunker.d.ts +2 -1
  220. package/dist/conversation-index/faiss-adapter.d.ts +2 -1
  221. package/dist/conversation-index/indexer.d.ts +2 -1
  222. package/dist/conversation-index/search.d.ts +2 -1
  223. package/dist/corpus-watermark.d.ts +2 -1
  224. package/dist/corpus-watermark.js +15 -15
  225. package/dist/cross-lingual-recall.d.ts +2 -1
  226. package/dist/day-summary.d.ts +2 -1
  227. package/dist/deep-recall-config.d.ts +32 -0
  228. package/dist/deep-recall-config.js +12 -0
  229. package/dist/deep-recall-http-glue.d.ts +170 -0
  230. package/dist/deep-recall-http-glue.js +31 -0
  231. package/dist/deep-recall-http-glue.js.map +1 -0
  232. package/dist/deep-recall-mcp-tools.d.ts +144 -0
  233. package/dist/deep-recall-mcp-tools.js +8 -0
  234. package/dist/deep-recall-mcp-tools.js.map +1 -0
  235. package/dist/deep-recall-policy-llm.d.ts +37 -0
  236. package/dist/deep-recall-policy-llm.js +19 -0
  237. package/dist/deep-recall-policy-llm.js.map +1 -0
  238. package/dist/deep-recall-renderer.d.ts +16 -0
  239. package/dist/deep-recall-renderer.js +8 -0
  240. package/dist/deep-recall-renderer.js.map +1 -0
  241. package/dist/deep-recall-seeds.d.ts +83 -0
  242. package/dist/deep-recall-seeds.js +8 -0
  243. package/dist/deep-recall-seeds.js.map +1 -0
  244. package/dist/deep-recall.d.ts +97 -0
  245. package/dist/deep-recall.js +13 -0
  246. package/dist/deep-recall.js.map +1 -0
  247. package/dist/delinearize.d.ts +2 -1
  248. package/dist/dependency-propagation-config.d.ts +2 -1
  249. package/dist/{dependency-propagation-delivery-BC3bCEet.d.ts → dependency-propagation-delivery-BZGUecZf.d.ts} +1 -1
  250. package/dist/direct-answer-wiring.d.ts +2 -1
  251. package/dist/direct-answer.d.ts +2 -1
  252. package/dist/embedding-fallback.d.ts +2 -1
  253. package/dist/enrichment/index.d.ts +2 -1
  254. package/dist/entity-origin-fields.d.ts +2 -1
  255. package/dist/entity-retrieval.d.ts +3 -2
  256. package/dist/entity-retrieval.js +13 -13
  257. package/dist/entity-schema.d.ts +2 -1
  258. package/dist/episodic-context.d.ts +2 -1
  259. package/dist/eval-trajectory-contracts.d.ts +2 -1
  260. package/dist/eval-trajectory-store.d.ts +2 -1
  261. package/dist/eval-trajectory.d.ts +2 -1
  262. package/dist/explicit-capture.d.ts +10 -9
  263. package/dist/external-wiki-access.d.ts +13 -11
  264. package/dist/external-wiki-access.js +47 -35
  265. package/dist/external-wiki-collection-registration.d.ts +2 -1
  266. package/dist/external-wiki-collection.d.ts +2 -1
  267. package/dist/external-wiki-mcp-tools.d.ts +13 -11
  268. package/dist/extraction-error-classification.d.ts +2 -1
  269. package/dist/extraction-faithfulness.d.ts +2 -1
  270. package/dist/extraction-judge-telemetry.d.ts +2 -1
  271. package/dist/extraction-judge-training.d.ts +2 -1
  272. package/dist/extraction-judge.d.ts +2 -1
  273. package/dist/extraction-liveness.d.ts +2 -1
  274. package/dist/extraction-normalization.d.ts +2 -1
  275. package/dist/extraction-prompt.d.ts +2 -1
  276. package/dist/extraction-source-grounding-rules.d.ts +2 -1
  277. package/dist/extraction-source-grounding.d.ts +2 -1
  278. package/dist/extraction.d.ts +2 -1
  279. package/dist/extraction.js +15 -15
  280. package/dist/fallback-llm.d.ts +2 -1
  281. package/dist/graph-dashboard-diff.d.ts +2 -1
  282. package/dist/graph-dashboard-key.d.ts +2 -1
  283. package/dist/graph-dashboard-parser.d.ts +2 -1
  284. package/dist/{graph-edge-decay-DGTBFALQ.js → graph-edge-decay-FXGELBFA.js} +4 -4
  285. package/dist/graph-edge-decay-FXGELBFA.js.map +1 -0
  286. package/dist/graph-edge-reinforcement.d.ts +2 -1
  287. package/dist/graph-path-reconstruction.d.ts +2 -1
  288. package/dist/graph-path-scoring.d.ts +2 -1
  289. package/dist/graph-snapshot.d.ts +2 -1
  290. package/dist/graph-snapshot.js +3 -3
  291. package/dist/graph.d.ts +2 -1
  292. package/dist/graph.js +2 -2
  293. package/dist/harmonic-construction.js +3 -3
  294. package/dist/harmonic-retrieval.d.ts +38 -2
  295. package/dist/harmonic-retrieval.js +12 -3
  296. package/dist/importance.d.ts +2 -1
  297. package/dist/importers/index.d.ts +2 -1
  298. package/dist/in-flight-reads.d.ts +2 -1
  299. package/dist/{index-D4hS9uxK.d.ts → index-B4iTvT-w.d.ts} +2 -2
  300. package/dist/index.d.ts +25 -23
  301. package/dist/index.js +126 -115
  302. package/dist/intent.d.ts +2 -1
  303. package/dist/lcm/engine.d.ts +2 -1
  304. package/dist/lcm/index.d.ts +2 -1
  305. package/dist/lcm/tools.d.ts +2 -1
  306. package/dist/lifecycle.d.ts +2 -1
  307. package/dist/live-connectors-runner.d.ts +2 -1
  308. package/dist/local-llm.d.ts +2 -1
  309. package/dist/local-model-endpoint.d.ts +2 -1
  310. package/dist/location/index.d.ts +4 -3
  311. package/dist/location/index.js +15 -15
  312. package/dist/maintenance/memory-governance.d.ts +2 -1
  313. package/dist/maintenance/memory-governance.js +13 -13
  314. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
  315. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +13 -13
  316. package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
  317. package/dist/maintenance/rebuild-memory-projection.js +14 -14
  318. package/dist/{maintenance-BRcc3Hx8.d.ts → maintenance-BBpNqEeJ.d.ts} +3 -3
  319. package/dist/mcp-memory-inspector-app.d.ts +13 -11
  320. package/dist/mcp-read-only-tools.js +1 -1
  321. package/dist/memory-action-policy.d.ts +2 -1
  322. package/dist/memory-cache.d.ts +2 -1
  323. package/dist/memory-controller.d.ts +2 -1
  324. package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
  325. package/dist/memory-projection-store.d.ts +2 -1
  326. package/dist/memory-provenance.d.ts +2 -1
  327. package/dist/memory-snapshot.d.ts +2 -1
  328. package/dist/memory-subject-cli.d.ts +13 -11
  329. package/dist/memory-subject.d.ts +13 -11
  330. package/dist/memory-worth-outcomes.d.ts +3 -2
  331. package/dist/models-json.d.ts +2 -1
  332. package/dist/namespaces/migrate.d.ts +4 -3
  333. package/dist/namespaces/migrate.js +14 -14
  334. package/dist/namespaces/principal.d.ts +2 -1
  335. package/dist/namespaces/search.d.ts +2 -1
  336. package/dist/namespaces/search.js +9 -9
  337. package/dist/namespaces/storage.d.ts +4 -3
  338. package/dist/namespaces/storage.js +13 -13
  339. package/dist/native-knowledge.d.ts +2 -1
  340. package/dist/offline-sync-impression-drain.d.ts +2 -1
  341. package/dist/offline-sync.js +2 -2
  342. package/dist/operator-doctor-corpus.d.ts +2 -1
  343. package/dist/operator-doctor-corpus.js +16 -16
  344. package/dist/operator-doctor-replica.d.ts +2 -1
  345. package/dist/operator-toolkit.d.ts +4 -3
  346. package/dist/operator-toolkit.js +29 -28
  347. package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
  348. package/dist/orchestration/maintenance.d.ts +5 -4
  349. package/dist/orchestration/maintenance.js +21 -21
  350. package/dist/{orchestrator-Btq9lzAN.d.ts → orchestrator-DglY1H0w.d.ts} +8 -8
  351. package/dist/orchestrator.d.ts +10 -9
  352. package/dist/orchestrator.js +108 -97
  353. package/dist/patterns-cli.d.ts +2 -1
  354. package/dist/{pipeline-CZoNdFb5.d.ts → pipeline-C7qRsy6g.d.ts} +1 -1
  355. package/dist/policy-runtime.d.ts +2 -1
  356. package/dist/proactive-contention.d.ts +2 -1
  357. package/dist/provenance.d.ts +2 -1
  358. package/dist/{public-http-C9-CHc40.d.ts → public-http-CPpCsi35.d.ts} +1 -1
  359. package/dist/{qmd-VIjSCKIE.d.ts → qmd-YRLTa3AE.d.ts} +1 -1
  360. package/dist/qmd-preflight.d.ts +3 -2
  361. package/dist/qmd-recall-cache.d.ts +2 -1
  362. package/dist/qmd.d.ts +3 -2
  363. package/dist/recall-concurrency-config.d.ts +2 -1
  364. package/dist/recall-deep-expand-select.js +4 -44
  365. package/dist/recall-deep-expand-select.js.map +1 -1
  366. package/dist/recall-deep-frontier.js +4 -23
  367. package/dist/recall-deep-frontier.js.map +1 -1
  368. package/dist/recall-deep-rewrite.js +4 -23
  369. package/dist/recall-deep-rewrite.js.map +1 -1
  370. package/dist/recall-disclosure-escalation.d.ts +2 -1
  371. package/dist/recall-explain-renderer.d.ts +2 -1
  372. package/dist/recall-explain-renderer.js +3 -3
  373. package/dist/recall-memory-map.d.ts +2 -1
  374. package/dist/recall-navigate-access.d.ts +2 -1
  375. package/dist/recall-navigate-access.js +2 -2
  376. package/dist/recall-navigate-disclosure.d.ts +2 -1
  377. package/dist/recall-navigate-disclosure.js +1 -1
  378. package/dist/recall-navigate.d.ts +2 -1
  379. package/dist/recall-navigate.js +2 -2
  380. package/dist/recall-planner-llm.d.ts +2 -1
  381. package/dist/recall-state.d.ts +2 -1
  382. package/dist/recall-tag-filter.d.ts +2 -1
  383. package/dist/recall-timings.d.ts +2 -1
  384. package/dist/recall-xray-cli.d.ts +2 -1
  385. package/dist/recall-xray-cli.js +4 -4
  386. package/dist/recall-xray-renderer.d.ts +2 -1
  387. package/dist/recall-xray-renderer.js +3 -3
  388. package/dist/recall-xray.d.ts +2 -1
  389. package/dist/recall-xray.js +2 -2
  390. package/dist/reconcile/cursor.d.ts +2 -1
  391. package/dist/reconcile/manifest.d.ts +2 -1
  392. package/dist/reconcile/plan.d.ts +2 -1
  393. package/dist/replay/normalizers/chatgpt.d.ts +2 -1
  394. package/dist/replay/normalizers/claude.d.ts +2 -1
  395. package/dist/replay/normalizers/openclaw.d.ts +2 -1
  396. package/dist/replay/normalizers/shared.d.ts +2 -1
  397. package/dist/replay/runner.d.ts +2 -1
  398. package/dist/replay/types.d.ts +2 -1
  399. package/dist/replica-divergence.d.ts +2 -1
  400. package/dist/replica-peers-config.d.ts +2 -1
  401. package/dist/resolve-auth-token.d.ts +2 -1
  402. package/dist/resume-bundles.js +7 -6
  403. package/dist/retrieval-agents.d.ts +3 -2
  404. package/dist/retrieval-tiers.d.ts +2 -1
  405. package/dist/routing/engine.d.ts +2 -1
  406. package/dist/routing/store.d.ts +2 -1
  407. package/dist/salvage-envelope.d.ts +2 -1
  408. package/dist/{scope-profiles-DqbxQXIS.d.ts → scope-profiles-BVvqVzJX.d.ts} +1 -1
  409. package/dist/search/embed-helper.d.ts +2 -1
  410. package/dist/search/factory.d.ts +2 -1
  411. package/dist/search/factory.js +8 -8
  412. package/dist/search/index.d.ts +2 -1
  413. package/dist/search/index.js +13 -13
  414. package/dist/search/lancedb-backend.d.ts +2 -1
  415. package/dist/search/lancedb-backend.js +2 -2
  416. package/dist/search/meilisearch-backend.d.ts +2 -1
  417. package/dist/search/meilisearch-backend.js +2 -2
  418. package/dist/search/noop-backend.d.ts +2 -1
  419. package/dist/search/orama-backend.d.ts +2 -1
  420. package/dist/search/orama-backend.js +2 -2
  421. package/dist/search/port.d.ts +2 -1
  422. package/dist/search/remote-backend.d.ts +2 -1
  423. package/dist/{semantic-consolidation-DW3rEUoW.d.ts → semantic-consolidation-BzCI6Kuu.d.ts} +1 -1
  424. package/dist/semantic-consolidation.d.ts +3 -2
  425. package/dist/semantic-consolidation.js +14 -14
  426. package/dist/semantic-rule-promotion.js +13 -13
  427. package/dist/semantic-rule-verifier.d.ts +2 -1
  428. package/dist/semantic-rule-verifier.js +13 -13
  429. package/dist/{service-B2vJU_Bx.d.ts → service-DQ3Gscy5.d.ts} +2 -2
  430. package/dist/session-observer-bands.d.ts +2 -1
  431. package/dist/session-observer-state.d.ts +2 -1
  432. package/dist/shared-context/manager.d.ts +37 -1
  433. package/dist/shared-context/manager.js +2 -1
  434. package/dist/signal.d.ts +2 -1
  435. package/dist/source-agent-qualifier.d.ts +2 -1
  436. package/dist/source-agent-qualifier.js +13 -13
  437. package/dist/standup/build.js +13 -13
  438. package/dist/{storage-6fn7BPmb.d.ts → storage-DmTbQdD0.d.ts} +1 -1
  439. package/dist/storage.d.ts +3 -2
  440. package/dist/storage.js +12 -12
  441. package/dist/subject-config.d.ts +2 -1
  442. package/dist/summarizer.d.ts +2 -1
  443. package/dist/summary-snapshot.d.ts +2 -1
  444. package/dist/support-passport/index.d.ts +16 -14
  445. package/dist/support-passport/index.js +49 -37
  446. package/dist/temporal-supersession.d.ts +3 -2
  447. package/dist/temporal-timeline-recall.d.ts +2 -1
  448. package/dist/temporal-validity.d.ts +2 -1
  449. package/dist/threading.d.ts +2 -1
  450. package/dist/tier-migration.d.ts +3 -2
  451. package/dist/tier-routing.d.ts +2 -1
  452. package/dist/topics.d.ts +2 -1
  453. package/dist/transcript.d.ts +2 -1
  454. package/dist/transfer/capsule-export.js +2 -2
  455. package/dist/transfer/capsule-import.js +2 -2
  456. package/dist/transfer/export-okf.d.ts +2 -1
  457. package/dist/transfer/export-okf.js +14 -14
  458. package/dist/trust-score-stage.d.ts +2 -1
  459. package/dist/trust-score.d.ts +2 -1
  460. package/dist/{types-eM7QIcX2.d.ts → types-CLRTESSD.d.ts} +3 -1
  461. package/dist/types.d.ts +2 -1
  462. package/dist/types.js +1 -1
  463. package/dist/utility-runtime.d.ts +2 -1
  464. package/dist/verified-recall.js +13 -13
  465. package/dist/who-knows-cli.d.ts +13 -11
  466. package/dist/who-knows-cli.js +14 -14
  467. package/dist/who-knows.d.ts +13 -11
  468. package/dist/who-knows.js +13 -13
  469. package/dist/write-envelope.d.ts +2 -1
  470. package/package.json +2 -2
  471. package/src/access-boundary.ts +1 -0
  472. package/src/access-http.ts +5 -5
  473. package/src/access-mcp-output-schemas.ts +1 -0
  474. package/src/access-mcp.ts +3 -3
  475. package/src/access-operations-batch.ts +3 -1
  476. package/src/access-schema.ts +12 -0
  477. package/src/access-service.ts +162 -5
  478. package/src/access-surface-catalog.ts +2 -0
  479. package/src/cli/deep-recall-commands.ts +60 -0
  480. package/src/cli.ts +2 -2
  481. package/src/config.test.ts +19 -0
  482. package/src/config.ts +7 -0
  483. package/src/deep-recall-config.ts +83 -0
  484. package/src/deep-recall-http-glue.ts +75 -0
  485. package/src/deep-recall-mcp-tools.ts +33 -0
  486. package/src/deep-recall-policy-llm.ts +65 -0
  487. package/src/deep-recall-renderer.ts +41 -0
  488. package/src/deep-recall-seeds.ts +134 -0
  489. package/src/deep-recall-surface.test.ts +902 -0
  490. package/src/deep-recall.test.ts +348 -0
  491. package/src/deep-recall.ts +572 -0
  492. package/src/harmonic-retrieval.ts +78 -25
  493. package/src/mcp-read-only-tools.ts +1 -0
  494. package/src/shared-context/envelope-at.test.ts +23 -0
  495. package/src/shared-context/envelope-at.ts +12 -6
  496. package/src/shared-context/envelope-io.ts +184 -0
  497. package/src/shared-context/envelope-wiring.test.ts +193 -0
  498. package/src/shared-context/governance.ts +28 -9
  499. package/src/shared-context/iso-instant.ts +43 -0
  500. package/src/shared-context/manager.ts +74 -15
  501. package/src/shared-context/provenance.ts +3 -26
  502. package/src/shared-context/write-origin.test.ts +145 -0
  503. package/src/types.ts +3 -1
  504. package/dist/chunk-26JWBSWD.js.map +0 -1
  505. package/dist/chunk-3DT2F5OI.js.map +0 -1
  506. package/dist/chunk-4OFKZAJG.js.map +0 -1
  507. package/dist/chunk-6RPB2TDG.js.map +0 -1
  508. package/dist/chunk-AYWPIH4M.js.map +0 -1
  509. package/dist/chunk-HXWOVCS6.js.map +0 -1
  510. package/dist/chunk-IVAW3HBF.js.map +0 -1
  511. package/dist/chunk-K4E3Y3ZX.js.map +0 -1
  512. package/dist/chunk-QL4U3SJA.js.map +0 -1
  513. package/dist/chunk-TBRG2SYY.js.map +0 -1
  514. package/dist/chunk-VI637ILW.js.map +0 -1
  515. package/dist/chunk-XXW32OL7.js.map +0 -1
  516. /package/dist/{chunk-D5VPIJN3.js.map → chunk-227WJVPY.js.map} +0 -0
  517. /package/dist/{chunk-Y3BWCIY2.js.map → chunk-2EHDPHMD.js.map} +0 -0
  518. /package/dist/{chunk-2LKW6OO7.js.map → chunk-2XJDAEAM.js.map} +0 -0
  519. /package/dist/{chunk-P23JWI3D.js.map → chunk-3ITTF7YH.js.map} +0 -0
  520. /package/dist/{chunk-NGP2FPB2.js.map → chunk-4UVDLNHQ.js.map} +0 -0
  521. /package/dist/{chunk-FJMIQTMH.js.map → chunk-5YQ7RFSO.js.map} +0 -0
  522. /package/dist/{chunk-KQAFEZQX.js.map → chunk-7LCGFUMB.js.map} +0 -0
  523. /package/dist/{chunk-EESYTBXV.js.map → chunk-7NCUHD5U.js.map} +0 -0
  524. /package/dist/{chunk-X574KX52.js.map → chunk-7ZMU4XQT.js.map} +0 -0
  525. /package/dist/{chunk-SG3Z67FB.js.map → chunk-APZXA4WI.js.map} +0 -0
  526. /package/dist/{chunk-2QSZNTDO.js.map → chunk-AU7Q3LSC.js.map} +0 -0
  527. /package/dist/{chunk-VGMRI4J6.js.map → chunk-B75VCEX5.js.map} +0 -0
  528. /package/dist/{chunk-D35XLYQ7.js.map → chunk-BE4Y6GK6.js.map} +0 -0
  529. /package/dist/{chunk-ELKD5PCD.js.map → chunk-BEXFNGQ3.js.map} +0 -0
  530. /package/dist/{chunk-U5SRTYFS.js.map → chunk-BFDOBESV.js.map} +0 -0
  531. /package/dist/{chunk-OLT3YTDH.js.map → chunk-BIJAWZYW.js.map} +0 -0
  532. /package/dist/{chunk-FU2NYFX6.js.map → chunk-BO4PWIJY.js.map} +0 -0
  533. /package/dist/{chunk-JMAG7WZ7.js.map → chunk-BX6GW4KC.js.map} +0 -0
  534. /package/dist/{chunk-J2R275FN.js.map → chunk-CTCGHNWN.js.map} +0 -0
  535. /package/dist/{chunk-X5PIDJ3L.js.map → chunk-DA4ZMCBU.js.map} +0 -0
  536. /package/dist/{chunk-H6RSANGQ.js.map → chunk-ETZ7KKOS.js.map} +0 -0
  537. /package/dist/{chunk-XZBXINXZ.js.map → chunk-GIC6BASP.js.map} +0 -0
  538. /package/dist/{chunk-SXQZMC7R.js.map → chunk-GR4C3FHT.js.map} +0 -0
  539. /package/dist/{chunk-7DYGPGCT.js.map → chunk-H5IIBGDM.js.map} +0 -0
  540. /package/dist/{chunk-CNNXMIS6.js.map → chunk-HFRGCNFY.js.map} +0 -0
  541. /package/dist/{chunk-MAG6M3B6.js.map → chunk-HTOWFFAI.js.map} +0 -0
  542. /package/dist/{chunk-FOCMJEHH.js.map → chunk-I4QAH4SY.js.map} +0 -0
  543. /package/dist/{chunk-FSGCXGK6.js.map → chunk-I6DUKBUI.js.map} +0 -0
  544. /package/dist/{chunk-6FUMA6AA.js.map → chunk-JGXMA6HL.js.map} +0 -0
  545. /package/dist/{chunk-TA7UZZMW.js.map → chunk-JHTF22NQ.js.map} +0 -0
  546. /package/dist/{chunk-DZ3CNJPB.js.map → chunk-LDOQE34V.js.map} +0 -0
  547. /package/dist/{chunk-MEW53VQJ.js.map → chunk-LDWIPYJ6.js.map} +0 -0
  548. /package/dist/{chunk-227UFSEQ.js.map → chunk-LEPOP46W.js.map} +0 -0
  549. /package/dist/{chunk-KJTSWJZN.js.map → chunk-LF6SHWVV.js.map} +0 -0
  550. /package/dist/{chunk-G6OZZX7P.js.map → chunk-LJAP4KSW.js.map} +0 -0
  551. /package/dist/{chunk-NV6BTBUI.js.map → chunk-LJNLLNEM.js.map} +0 -0
  552. /package/dist/{chunk-FFFZEF6B.js.map → chunk-LUDXSSTW.js.map} +0 -0
  553. /package/dist/{chunk-PCH2CVCS.js.map → chunk-LWBSEYW3.js.map} +0 -0
  554. /package/dist/{chunk-FMUJGGKW.js.map → chunk-M7DGN6JZ.js.map} +0 -0
  555. /package/dist/{chunk-TZIHB2LP.js.map → chunk-MNH2GM4O.js.map} +0 -0
  556. /package/dist/{chunk-RACZB5HT.js.map → chunk-N37X5RU7.js.map} +0 -0
  557. /package/dist/{chunk-LK4TOYPU.js.map → chunk-NF3NMAG7.js.map} +0 -0
  558. /package/dist/{chunk-AG46P24C.js.map → chunk-NNBZS3DY.js.map} +0 -0
  559. /package/dist/{chunk-LZ2JTO7N.js.map → chunk-OASGWNYL.js.map} +0 -0
  560. /package/dist/{chunk-C2JCVZWX.js.map → chunk-OLBZ2WGG.js.map} +0 -0
  561. /package/dist/{chunk-Z3SQEEB6.js.map → chunk-OUKBMQ2O.js.map} +0 -0
  562. /package/dist/{chunk-2Z3DG5CQ.js.map → chunk-P6GKRT2H.js.map} +0 -0
  563. /package/dist/{chunk-UGA6PZTX.js.map → chunk-P7LVYPIX.js.map} +0 -0
  564. /package/dist/{chunk-VE45LRCE.js.map → chunk-QRDSXR3V.js.map} +0 -0
  565. /package/dist/{chunk-KS67VHXA.js.map → chunk-QUVWFZOU.js.map} +0 -0
  566. /package/dist/{chunk-AI4QFDPR.js.map → chunk-R7FXPG4T.js.map} +0 -0
  567. /package/dist/{chunk-X66BHMAU.js.map → chunk-RJ57OOCD.js.map} +0 -0
  568. /package/dist/{chunk-VXMKW7YN.js.map → chunk-TRLCMLX7.js.map} +0 -0
  569. /package/dist/{chunk-ELCMVOQT.js.map → chunk-V3HUBF7T.js.map} +0 -0
  570. /package/dist/{chunk-KMIAD7JR.js.map → chunk-VHAKBUBD.js.map} +0 -0
  571. /package/dist/{chunk-GS5IFIVE.js.map → chunk-VYD63IFH.js.map} +0 -0
  572. /package/dist/{chunk-WSFPNCRA.js.map → chunk-XFPHV65N.js.map} +0 -0
  573. /package/dist/{chunk-JCUG7AXZ.js.map → chunk-XJJYSX6F.js.map} +0 -0
  574. /package/dist/{chunk-I6DURYZI.js.map → chunk-XMIAU4CO.js.map} +0 -0
  575. /package/dist/{chunk-PJIGYPO5.js.map → chunk-XQGFIAG7.js.map} +0 -0
  576. /package/dist/{chunk-B2URC6LJ.js.map → chunk-YWN3GYI2.js.map} +0 -0
  577. /package/dist/{chunk-TG6JEJDV.js.map → chunk-Z33VUMKY.js.map} +0 -0
  578. /package/dist/{graph-edge-decay-DGTBFALQ.js.map → deep-recall-config.js.map} +0 -0
@@ -1,10 +1,11 @@
1
- import { y as MemoryCategory, N as MemorySubject } from './types-eM7QIcX2.js';
1
+ import { y as MemoryCategory, N as MemorySubject } from './types-CLRTESSD.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './operator-doctor-types.js';
5
5
  import './external-wiki-config.js';
6
6
  import './contradiction-config.js';
7
7
  import './graph-path-scoring-config.js';
8
+ import './deep-recall-config.js';
8
9
  import './causal-trajectory.js';
9
10
  import './objective-state.js';
10
11
  import './active-context-config.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.69.10",
3
+ "version": "9.69.11",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3227,7 +3227,7 @@
3227
3227
  "core"
3228
3228
  ],
3229
3229
  "peerDependencies": {
3230
- "@remnic/coding-graph": "^9.69.10"
3230
+ "@remnic/coding-graph": "^9.69.11"
3231
3231
  },
3232
3232
  "peerDependenciesMeta": {
3233
3233
  "@remnic/coding-graph": {
@@ -83,6 +83,7 @@ export const OPERATION_NAMES = [
83
83
  "meetings_list",
84
84
  "meetings_get",
85
85
  "meetings_build",
86
+ "deep_recall",
86
87
  "standup",
87
88
  "action_confidence",
88
89
  "chatgpt_memory_inspector",
@@ -25,7 +25,7 @@ import {
25
25
  } from "./access-http-offline-stream.js";
26
26
  import { nonEmptyQueryParam, optionalNamespaceKindQueryParam, optionalQueryString, positiveIntQueryParam } from "./access-http-query.js";
27
27
  import { CorrectionContractError } from "./correction/correction-contract.js";
28
- import { respondWearablesErrorGlue } from "./wearables/http-glue.js"; import { respondMeetingsList, respondMeetingsGet, respondMeetingsBuild } from "./meetings/http-glue.js"; import { respondLocationStatus, respondLocationCheck, respondLocationSync, respondLocationBackfill, respondLocationDay } from "./location/http-glue.js"; import { respondStandup } from "./standup/http-glue.js";
28
+ import { respondWearablesErrorGlue } from "./wearables/http-glue.js"; import { respondMeetingsList, respondMeetingsGet, respondMeetingsBuild } from "./meetings/http-glue.js"; import { respondLocationStatus, respondLocationCheck, respondLocationSync, respondLocationBackfill, respondLocationDay } from "./location/http-glue.js"; import { respondStandup } from "./standup/http-glue.js"; import { respondDeepRecall } from "./deep-recall-http-glue.js";
29
29
  import { EngramMcpServer, MCP_SUPPORTED_PROTOCOL_VERSIONS } from "./access-mcp.js";
30
30
  import { handleMcpGetSse } from "./access-mcp-sse.js";
31
31
  import { validateRequest, type SchemaName, type SchemaTypeFor } from "./access-schema.js";
@@ -1752,10 +1752,10 @@ export class EngramAccessHttpServer extends ReviewDeckAccessHttpBase {
1752
1752
  this.enforceTokenOp("meetings_build"); await respondMeetingsBuild(req, res, this.respondJson.bind(this), this.readJsonBody.bind(this), this.service, { enforceQuota: () => this.ensureWriteRateLimitAvailable(req), recordHit: () => this.recordWriteRateLimitHit(req) }, (ns, sk) => this.wearablesScope(req, ns, sk)); return; }
1753
1753
  const meetingGetEngram = /^\/engram\/v1\/meetings\/([^/]+)$/.exec(pathname);
1754
1754
  if (req.method === "GET" && meetingGetEngram) { this.enforceTokenOp("meetings_get"); await respondMeetingsGet(res, this.respondJson.bind(this), this.service, meetingGetEngram[1] ?? "", this.wearablesScope(req, parsed.searchParams.get("namespace") ?? undefined, parsed.searchParams.get("sessionKey") ?? undefined)); return; }
1755
- const meetingGetRemnic = /^\/remnic\/v1\/meetings\/([^/]+)$/.exec(pathname);
1756
- if (req.method === "GET" && meetingGetRemnic) { this.enforceTokenOp("meetings_get"); await respondMeetingsGet(res, this.respondJson.bind(this), this.service, meetingGetRemnic[1] ?? "", this.wearablesScope(req, parsed.searchParams.get("namespace") ?? undefined, parsed.searchParams.get("sessionKey") ?? undefined)); return; }
1757
- // Location sync surfaces (issue #2047): thin branches; bodies + boundary
1758
- // dispatch live in location/http-glue.ts.
1755
+ const meetingGetRemnic = /^\/remnic\/v1\/meetings\/([^/]+)$/.exec(pathname); if (req.method === "GET" && meetingGetRemnic) { this.enforceTokenOp("meetings_get"); await respondMeetingsGet(res, this.respondJson.bind(this), this.service, meetingGetRemnic[1] ?? "", this.wearablesScope(req, parsed.searchParams.get("namespace") ?? undefined, parsed.searchParams.get("sessionKey") ?? undefined)); return; }
1756
+ if (req.method === "POST" && (pathname === "/engram/v1/recall/deep" || pathname === "/remnic/v1/recall/deep")) {
1757
+ this.enforceTokenOp("deep_recall"); await respondDeepRecall(req, res, this.respondJson.bind(this), this.readJsonBody.bind(this), this.service, (ns, sk) => this.wearablesScope(req, ns ?? parsed.searchParams.get("namespace") ?? undefined, sk ?? parsed.searchParams.get("sessionKey") ?? undefined)); return; }
1758
+ // Location sync surfaces (issue #2047): thin branches; bodies + boundary dispatch live in location/http-glue.ts.
1759
1759
  if (req.method === "GET" && (pathname === "/engram/v1/location/status" || pathname === "/remnic/v1/location/status")) {
1760
1760
  this.enforceTokenOp("location_status"); await respondLocationStatus(res, this.respondJson.bind(this), this.service); return; }
1761
1761
  if (req.method === "GET" && (pathname === "/engram/v1/location/check" || pathname === "/remnic/v1/location/check")) {
@@ -82,6 +82,7 @@ const TOOL_OUTPUT_SCHEMAS: Readonly<Record<string, Record<string, unknown>>> = {
82
82
  skipped: T_NUMBER,
83
83
  removed: T_ARRAY,
84
84
  }),
85
+ deep_recall: objectSchema({ ok: T_BOOLEAN, error: T_NULLABLE_STRING, entries: T_ARRAY, trace: T_ARRAY, rendered: T_STRING }, ["entries", "trace"]),
85
86
  standup: objectSchema({ date: T_STRING, yesterday: T_STRING, today: T_STRING, highlights: T_ARRAY, priorities: T_ARRAY, blockers: T_ARRAY, activityGrid: T_STRING, markdown: T_STRING }),
86
87
  action_confidence: objectSchema({
87
88
  schemaVersion: T_NUMBER,
package/src/access-mcp.ts CHANGED
@@ -51,7 +51,7 @@ import {
51
51
  withToolAliases,
52
52
  } from "./access-mcp-tool-names.js";
53
53
  import { MCP_READ_ONLY_TOOL_SUFFIXES } from "./mcp-read-only-tools.js";
54
- import { MEETINGS_MCP_TOOLS } from "./meetings/mcp-tools.js";
54
+ import { MEETINGS_MCP_TOOLS } from "./meetings/mcp-tools.js"; import { DEEP_RECALL_MCP_TOOLS } from "./deep-recall-mcp-tools.js";
55
55
  import { WEARABLES_MCP_TOOLS } from "./wearables/mcp-tools.js";
56
56
  import { WHO_KNOWS_MCP_TOOLS } from "./who-knows.js"; import { LOCATION_MCP_TOOLS } from "./location/mcp-tools.js"; import { STANDUP_MCP_TOOLS } from "./standup/mcp-tools.js";
57
57
  import { PROMOTION_CANDIDATES_MCP_TOOLS } from "./memory-subject.js";
@@ -246,7 +246,7 @@ export const MCP_MIGRATED_OPERATIONS: Readonly<Record<string, OperationName>> =
246
246
  "engram.console_state": "console_state",
247
247
  "engram.dreams_status": "dreams_status",
248
248
  "engram.dreams_run": "dreams_run",
249
- ...SUPPORT_PASSPORT_MCP_MIGRATED_OPERATIONS, ...MCP_ADMIN_OPS_MIGRATED_OPERATIONS,
249
+ ...SUPPORT_PASSPORT_MCP_MIGRATED_OPERATIONS, ...MCP_ADMIN_OPS_MIGRATED_OPERATIONS, "engram.deep_recall": "deep_recall",
250
250
  "engram.memory_chat": "chat_message",
251
251
  };
252
252
 
@@ -687,7 +687,7 @@ export class EngramMcpServer {
687
687
  additionalProperties: false,
688
688
  },
689
689
  },
690
- ...WEARABLES_MCP_TOOLS, ...MEETINGS_MCP_TOOLS, ...WHO_KNOWS_MCP_TOOLS, ...PROMOTION_CANDIDATES_MCP_TOOLS, ...LOCATION_MCP_TOOLS, ...STANDUP_MCP_TOOLS,
690
+ ...WEARABLES_MCP_TOOLS, ...MEETINGS_MCP_TOOLS, ...WHO_KNOWS_MCP_TOOLS, ...PROMOTION_CANDIDATES_MCP_TOOLS, ...LOCATION_MCP_TOOLS, ...STANDUP_MCP_TOOLS, ...DEEP_RECALL_MCP_TOOLS,
691
691
  ...(service.supportPassportEnabled ? SUPPORT_PASSPORT_MCP_TOOLS : []),
692
692
  {
693
693
  name: "engram.action_confidence",
@@ -187,6 +187,8 @@ defineOperation({ name: "transcript_memories", description: "Transcript memories
187
187
  defineOperation({ name: "meetings_list", description: "List stored meeting records (all days, or one day).", schema: strictSchema({ date: S.str, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const d = optStr(input.date); return { result: await ctx.service.meetingsList(d && d.length > 0 ? d : undefined, { authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }; } });
188
188
  defineOperation({ name: "meetings_get", description: "Get a stored meeting record by id.", schema: strictSchema({ id: S.str, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.meetingsGet(reqStr(input.id, "id"), { authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }) });
189
189
  defineOperation({ name: "meetings_build", description: "Detect + fuse + store a day's meetings.", schema: strictSchema({ date: S.str, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.meetingsBuild(reqStr(input.date, "date"), { authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }) });
190
+ // === DEEP RECALL (issue #2332) — budgeted REFINE/EXPAND/STOP retrieval ===
191
+ defineOperation({ name: "deep_recall", description: "Budgeted multi-hop deep recall over the anchor graph.", schema: strictSchema({ query: S.str, maxSteps: S.flexNum, namespace: S.str, sessionKey: S.str }), handler: async (input, ctx) => { const q = defStr(input.query, ""); if (q.trim().length === 0) throw new EngramAccessInputError("deep_recall: query is required"); return { result: await ctx.service.deepRecall({ query: q, maxSteps: typeof input.maxSteps === "number" ? input.maxSteps : typeof input.maxSteps === "string" && Number.isFinite(Number(input.maxSteps)) ? Number(input.maxSteps) : undefined, authenticatedPrincipal: ctx.authenticatedPrincipal, namespace: optStr(input.namespace), sessionKey: optStr(input.sessionKey) }) }; } });
190
192
 
191
193
  // === ACTION CONFIDENCE + INSPECTOR + CAPSULE ===
192
194
  defineOperation({ name: "action_confidence", description: "Action confidence.", schema: strictSchema({ intendedAction: S.str, confidence: S.num, risk: S.str, contextReadiness: S.str, currentContextScopes: S.strArr, userRules: z.array(z.unknown()).optional(), retrievedMemories: z.array(z.unknown()).optional() }), handler: async (input, ctx) => { const req: Record<string, unknown> = {}; if (input.intendedAction !== undefined) req.intendedAction = optStr(input.intendedAction); if (input.confidence !== undefined) req.confidence = optNum(input.confidence); if (input.risk !== undefined) req.risk = optStr(input.risk) as "low" | "medium" | "high" | "irreversible" | "restricted" | undefined; if (input.contextReadiness !== undefined) req.contextReadiness = optStr(input.contextReadiness) as "none" | "partial" | "sufficient" | undefined; if (input.currentContextScopes !== undefined) req.currentContextScopes = optStrArr(input.currentContextScopes); if (input.userRules !== undefined) req.userRules = input.userRules; if (input.retrievedMemories !== undefined) req.retrievedMemories = input.retrievedMemories; return { result: await ctx.service.actionConfidence(req) }; } });
@@ -278,7 +280,7 @@ defineOperation({ name: "memory_identity", description: "Memory identity.", sche
278
280
  defineOperation({ name: "work_task", description: "Manage work task.", schema: strictSchema({ action: S.str, id: S.str, title: S.str, description: S.str, status: S.str, priority: S.str, owner: S.str, assignee: S.str, projectId: S.str, tags: S.strArr, dueAt: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.workTask({ action: (optStr(input.action) as "update" | "list" | "get" | "create" | "delete" | "transition") ?? "list", id: optStr(input.id), title: optStr(input.title), description: optStr(input.description), status: optStr(input.status), priority: optStr(input.priority), owner: optStr(input.owner), assignee: optStr(input.assignee), projectId: optStr(input.projectId), tags: optStrArr(input.tags), dueAt: optStr(input.dueAt) }) }) });
279
281
  defineOperation({ name: "work_project", description: "Manage work project.", schema: strictSchema({ action: S.str, id: S.str, name: S.str, description: S.str, status: S.str, owner: S.str, tags: S.strArr, taskId: S.str, projectId: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.workProject({ action: (optStr(input.action) as "update" | "list" | "get" | "create" | "delete" | "link_task") ?? "list", id: optStr(input.id), name: optStr(input.name), description: optStr(input.description), status: optStr(input.status), owner: optStr(input.owner), tags: optStrArr(input.tags), taskId: optStr(input.taskId), projectId: optStr(input.projectId) }) }) });
280
282
  defineOperation({ name: "work_board", description: "Manage work board.", schema: strictSchema({ action: S.str, projectId: S.str, snapshotJson: S.str, linkToMemory: S.bool }), handler: async (input, ctx) => ({ result: await ctx.service.workBoard({ action: (optStr(input.action) as "export_markdown" | "export_snapshot" | "import_snapshot") ?? "export_markdown", projectId: optStr(input.projectId) ?? "", snapshotJson: optStr(input.snapshotJson) ?? "", linkToMemory: input.linkToMemory === true }) }) });
281
- defineOperation({ name: "shared_context_write_output", description: "Write shared output.", schema: strictSchema({ agentId: S.str, title: S.str, content: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.sharedContextWriteOutput({ agentId: optStr(input.agentId) ?? "", title: optStr(input.title) ?? "", content: optStr(input.content) ?? "" }) }) });
283
+ defineOperation({ name: "shared_context_write_output", description: "Write shared output.", schema: strictSchema({ agentId: S.str, title: S.str, content: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.sharedContextWriteOutput({ agentId: optStr(input.agentId) ?? "", title: optStr(input.title) ?? "", content: optStr(input.content) ?? "", principal: ctx.authenticatedPrincipal }) }) });
282
284
  defineOperation({ name: "shared_feedback_record", description: "Record shared feedback.", schema: strictSchema({ agent: S.str, decision: S.str, reason: S.str, date: S.str, learning: S.str, outcome: S.str, severity: S.str, confidence: S.num, workflow: S.str, tags: S.strArr, evidenceWindowStart: S.str, evidenceWindowEnd: S.str, refs: S.strArr }), handler: async (input, ctx) => { const sv = optStr(input.severity); return { result: await ctx.service.sharedFeedbackRecord({ agent: optStr(input.agent) ?? "", decision: (optStr(input.decision) as "rejected" | "approved" | "approved_with_feedback") ?? "approved", reason: optStr(input.reason) ?? "", date: optStr(input.date), learning: optStr(input.learning), outcome: optStr(input.outcome), severity: sv === "low" || sv === "medium" || sv === "high" ? sv as "low" | "medium" | "high" : undefined, confidence: optNum(input.confidence), workflow: optStr(input.workflow), tags: optStrArr(input.tags), evidenceWindowStart: optStr(input.evidenceWindowStart), evidenceWindowEnd: optStr(input.evidenceWindowEnd), refs: optStrArr(input.refs) }) }; } });
283
285
  defineOperation({ name: "shared_priorities_append", description: "Append priorities.", schema: strictSchema({ agentId: S.str, text: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.sharedPrioritiesAppend({ agentId: optStr(input.agentId) ?? "", text: optStr(input.text) ?? "" }) }) });
284
286
  defineOperation({ name: "shared_context_cross_signals_run", description: "Run cross signals.", fleetWide: true, schema: strictSchema({ date: S.str }), handler: async (input, ctx) => ({ result: await ctx.service.sharedContextCrossSignalsRun({ date: optStr(input.date) }) }) });
@@ -241,6 +241,18 @@ export const observeRequestSchema = z.object({
241
241
  projectTag: projectTagSchema,
242
242
  });
243
243
 
244
+ // ---------------------------------------------------------------------------
245
+ // Deep recall (issue #2332)
246
+ // ---------------------------------------------------------------------------
247
+
248
+ export const deepRecallRequestSchema = z.object({
249
+ query: z.string().trim().min(1, "query is required").max(2000),
250
+ /** Optional policy-step ceiling; validated against the configured maximum in the service. */
251
+ maxSteps: z.union([z.number().int().min(0), z.string()]).optional(),
252
+ namespace: namespaceSchema,
253
+ sessionKey: z.string().optional(),
254
+ });
255
+
244
256
  // ---------------------------------------------------------------------------
245
257
  // Memory store / suggestion submit
246
258
  // ---------------------------------------------------------------------------
@@ -33,6 +33,7 @@ import { readAggregateExtractionWatermark } from "./orchestration/extraction-wat
33
33
  import { ReplicaDivergenceMonitor } from "./replica-divergence.js";
34
34
  import type { ResolveSecretRefFn } from "./resolve-auth-token.js";
35
35
  import { buildAccessWriteRequestFingerprint, buildObserveRequestFingerprint } from "./write-envelope.js";
36
+ import { UNATTRIBUTED_ACCESS_WRITE_ORIGIN } from "./shared-context/envelope-io.js";
36
37
  export type { EngramAccessHealthResponse, EngramAccessQmdCollectionState, EngramAccessQmdHealthResponse };
37
38
  import { AccessAuditAdapter, type AccessAuditConfig, type AccessAuditResult } from "./access-audit.js";
38
39
  import {
@@ -168,6 +169,15 @@ import {
168
169
  redactSensitive,
169
170
  } from "./admin/admin-surfaces.js";
170
171
  import { FileCalendarSource, buildBriefing, parseBriefingFocus, parseBriefingWindow } from "./briefing.js";
172
+ import {
173
+ type DeepRecallResult,
174
+ runBudgetedDeepRecall,
175
+ } from "./deep-recall.js";
176
+ import { callDeepRecallPolicyLlm } from "./deep-recall-policy-llm.js";
177
+ import { createDeepRecallSeedSearch } from "./deep-recall-seeds.js";
178
+ import { renderDeepRecallResult } from "./deep-recall-renderer.js";
179
+ import { readProjectedHarmonicGraph } from "./harmonic-retrieval.js";
180
+ import { stripAttributesSuffix } from "./structured-attributes.js";
171
181
  import {
172
182
  type GraphSnapshotNodeMetadata,
173
183
  type GraphSnapshotRequest,
@@ -2684,6 +2694,133 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
2684
2694
  return toRecallExplainJson(snapshot);
2685
2695
  }
2686
2696
 
2697
+ /**
2698
+ * Budgeted REFINE/EXPAND/STOP deep recall (issue #2332). Deep surface
2699
+ * only — never called from the recall hot path. Single implementation
2700
+ * for MCP, HTTP, and CLI (rule 22: one renderer, one service method).
2701
+ */
2702
+ async deepRecall(request: {
2703
+ query: string;
2704
+ namespace?: string;
2705
+ sessionKey?: string;
2706
+ authenticatedPrincipal?: string;
2707
+ maxSteps?: number;
2708
+ }): Promise<DeepRecallResult & { rendered: string }> {
2709
+ const cfg = this.orchestrator.config.deepRecall;
2710
+ if (!cfg.enabled) {
2711
+ return {
2712
+ ok: false,
2713
+ error: "disabled",
2714
+ entries: [],
2715
+ trace: [],
2716
+ rendered: "deep recall is disabled; set deepRecall.enabled",
2717
+ };
2718
+ }
2719
+ const query = typeof request.query === "string" ? request.query.trim() : "";
2720
+ if (query.length === 0) {
2721
+ throw new EngramAccessInputError("deepRecall: query is required");
2722
+ }
2723
+ let effective = cfg;
2724
+ const requestedSteps = request.maxSteps;
2725
+ if (requestedSteps !== undefined) {
2726
+ if (typeof requestedSteps !== "number" || !Number.isInteger(requestedSteps) || requestedSteps < 0) {
2727
+ throw new EngramAccessInputError("deepRecall: maxSteps must be a non-negative integer");
2728
+ }
2729
+ // `deepRecall.maxSteps: 0` is a documented disable value (§33): the
2730
+ // policy loop is off, so ANY positive override is a refusal rather than
2731
+ // a ceiling comparison. The zero case resolves first, so the ceiling
2732
+ // threshold below only runs while the loop is enabled.
2733
+ if (cfg.maxSteps <= 0) {
2734
+ if (requestedSteps > 0) {
2735
+ throw new EngramAccessInputError(
2736
+ "deepRecall: the policy loop is disabled (deepRecall.maxSteps=0); maxSteps must be 0",
2737
+ );
2738
+ }
2739
+ } else if (requestedSteps > cfg.maxSteps) {
2740
+ throw new EngramAccessInputError(
2741
+ `deepRecall: maxSteps ${requestedSteps} exceeds the configured ceiling ${cfg.maxSteps}`,
2742
+ );
2743
+ }
2744
+ effective = { ...cfg, maxSteps: requestedSteps };
2745
+ }
2746
+ const principal =
2747
+ request.authenticatedPrincipal?.trim() || resolvePrincipal(request.sessionKey, this.orchestrator.config);
2748
+ // Read path resolves through the SAME namespace layer as memoryGet (§30):
2749
+ // one resolved namespace, one storage instance, for seeds and expansions.
2750
+ const resolvedNamespace = this.resolveReadableNamespace(request.namespace, principal);
2751
+ const storage = await this.orchestrator.getStorage(resolvedNamespace);
2752
+ const config = this.orchestrator.config;
2753
+ // `abstractionNodeStoreDir` names the DEFAULT namespace's graph store and
2754
+ // takes precedence over `storage.dir` inside the store resolver, so only a
2755
+ // default-namespace read may pass it. This is the rule the harmonic WRITE
2756
+ // path already applies (persistConstructedHarmonicRecords: the override
2757
+ // goes to the base namespace only); passing it here made every non-default
2758
+ // namespace load the DEFAULT namespace's nodes and anchors, missing its own
2759
+ // anchor expansions and exposing foreign graph metadata on an id collision.
2760
+ const graphStoreDir =
2761
+ resolvedNamespace === config.defaultNamespace ? config.abstractionNodeStoreDir : undefined;
2762
+ // Seeds route through the namespace search router (never the base
2763
+ // `config.qmdCollection`, which is the DEFAULT namespace's collection):
2764
+ // a non-default caller must search its own suffixed collection or deep
2765
+ // recall silently misses its corpus and returns foreign doc ids. Hit ->
2766
+ // memory-id resolution is per hit through the shared QMD result resolver
2767
+ // (which also decodes the raw collection-qualified path forms the
2768
+ // namespaces-disabled fanout returns), so no invocation pre-scans the
2769
+ // namespace corpus.
2770
+ const result = await runBudgetedDeepRecall(
2771
+ {
2772
+ config: effective,
2773
+ searchSeed: createDeepRecallSeedSearch({
2774
+ namespace: resolvedNamespace,
2775
+ storage,
2776
+ router: this.orchestrator,
2777
+ resolver: this.orchestrator.qmdResultResolver,
2778
+ }),
2779
+ // Nodes and anchors are projected against the namespace's CURRENT
2780
+ // active memories through the SAME helper searchHarmonicRetrieval
2781
+ // uses. A raw read still carries the stored title, summary, and
2782
+ // anchor value of a memory that was later rejected or quarantined,
2783
+ // and the deep-recall state prompt hands those to the policy LLM long
2784
+ // before `loadMemory(...).active` can exclude the memory itself.
2785
+ loadGraph: async () =>
2786
+ readProjectedHarmonicGraph({
2787
+ memoryDir: storage.dir,
2788
+ abstractionNodeStoreDir: graphStoreDir,
2789
+ anchorsEnabled: true,
2790
+ }),
2791
+ loadMemory: async (memoryId) => {
2792
+ const memory = await storage.getMemoryById(memoryId);
2793
+ // Same private-record exclusion memoryGet applies (#2332): a
2794
+ // support-passport private record is reported as absent (null),
2795
+ // never as content — deep recall must not become the read surface
2796
+ // that answers what every other surface denies.
2797
+ if (!memory || isSupportPassportPrivateMemory(memory)) return null;
2798
+ return {
2799
+ memoryId,
2800
+ content: memory.frontmatter.structuredAttributes
2801
+ ? stripAttributesSuffix(memory.content)
2802
+ : memory.content,
2803
+ // Enumerate the active set — never an exclusion list (§41).
2804
+ active: inferMemoryStatus(
2805
+ memory.frontmatter,
2806
+ toMemoryPathRel(storage.dir, memory.path)
2807
+ ) === "active",
2808
+ };
2809
+ },
2810
+ callPolicy: (statePrompt, timeoutMs) =>
2811
+ callDeepRecallPolicyLlm({
2812
+ statePrompt,
2813
+ config,
2814
+ localLlm: this.orchestrator.localLlm ?? null,
2815
+ fallbackLlm: this.orchestrator.fastGatewayLlm ?? null,
2816
+ timeoutMs,
2817
+ }),
2818
+ },
2819
+ query,
2820
+ );
2821
+ return { ...result, rendered: renderDeepRecallResult(result) };
2822
+ }
2823
+
2687
2824
  async recallXray(request: {
2688
2825
  query: string;
2689
2826
  sessionKey?: string;
@@ -4430,15 +4567,35 @@ export class EngramAccessService extends SupportPassportAccessServiceBase {
4430
4567
  agentId: string;
4431
4568
  title: string;
4432
4569
  content: string;
4570
+ /** Authenticated principal resolved by the surface, never client-supplied. */
4571
+ principal?: string;
4433
4572
  }): Promise<unknown> {
4434
4573
  if (!this.orchestrator.sharedContext) {
4435
4574
  return { enabled: false, reason: "Shared context is disabled. Enable `sharedContextEnabled: true`." };
4436
4575
  }
4437
- const fp = await this.orchestrator.sharedContext.writeAgentOutput({
4438
- agentId: request.agentId,
4439
- title: request.title,
4440
- content: request.content,
4441
- });
4576
+ let fp: string;
4577
+ try {
4578
+ fp = await this.orchestrator.sharedContext.writeAgentOutput({
4579
+ agentId: request.agentId,
4580
+ title: request.title,
4581
+ content: request.content,
4582
+ // The origin is server-owned in BOTH cases (issue #1957 review
4583
+ // round 4): the authenticated principal when one resolved, and a
4584
+ // reserved unattributed token otherwise — a principal-less
4585
+ // authenticated request must never stamp the client's `agentId`
4586
+ // as audit metadata. The client label survives only as the
4587
+ // producer, which feeds grouping and display, never authority.
4588
+ ...(request.principal
4589
+ ? { authenticatedIdentity: request.principal }
4590
+ : { unattributedOrigin: UNATTRIBUTED_ACCESS_WRITE_ORIGIN }),
4591
+ });
4592
+ } catch (error) {
4593
+ const message = error instanceof Error ? error.message : String(error);
4594
+ if (message.startsWith("shared-context write origin mismatch")) {
4595
+ throw new EngramAccessInputError(message);
4596
+ }
4597
+ throw error;
4598
+ }
4442
4599
  return { written: true, path: fp };
4443
4600
  }
4444
4601
 
@@ -71,6 +71,7 @@ export const MCP_TOOLS: readonly McpToolEntry[] = [
71
71
  { tool: "meetings_list", operation: "meetings_list" },
72
72
  { tool: "meetings_get", operation: "meetings_get" },
73
73
  { tool: "meetings_build", operation: "meetings_build" },
74
+ { tool: "deep_recall", operation: "deep_recall" },
74
75
  { tool: "standup", operation: "standup" },
75
76
  { tool: "action_confidence", operation: "action_confidence" },
76
77
  { tool: "chatgpt_memory_inspector", operation: "chatgpt_memory_inspector" },
@@ -235,6 +236,7 @@ export const HTTP_ROUTES: readonly HttpRouteEntry[] = [
235
236
  { method: "GET", pathname: "/engram/v1/meetings", operation: "meetings_list" },
236
237
  { method: "POST", pathname: "/engram/v1/meetings/build", operation: "meetings_build" },
237
238
  { method: "GET", pathname: "/engram/v1/meetings/:id", operation: "meetings_get" },
239
+ { method: "POST", pathname: "/engram/v1/recall/deep", operation: "deep_recall" },
238
240
  { method: "GET", pathname: "/engram/v1/standup", operation: "standup" },
239
241
  { method: "POST", pathname: "/engram/v1/observe", operation: "observe" },
240
242
  { method: "POST", pathname: "/engram/v1/lcm/search", operation: "lcm_search" },
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Deep-recall command group (issue #2332) — extracted from cli.ts so the
3
+ * surface file stays at its structural ceiling (same seam as
4
+ * meetings-commands.ts). `engram deep-recall <query>` runs the budgeted
5
+ * REFINE/EXPAND/STOP loop through EngramAccessService — the same single
6
+ * implementation MCP and HTTP call.
7
+ */
8
+
9
+ import type { Orchestrator } from "../orchestrator.js";
10
+ import type { CliCommand } from "../cli.js";
11
+ import { EngramAccessService } from "../access-service.js";
12
+
13
+ function parseMaxSteps(raw: unknown): number | undefined {
14
+ if (raw === undefined || raw === null) return undefined;
15
+ const value = typeof raw === "string" ? Number(raw) : raw;
16
+ if (typeof value !== "number" || !Number.isFinite(value) || !Number.isInteger(value) || value < 0) {
17
+ throw new Error(`--max-steps must be a non-negative integer; got ${JSON.stringify(raw)}`);
18
+ }
19
+ return value;
20
+ }
21
+
22
+ export function registerDeepRecallCommands(cmd: CliCommand, orchestrator: Orchestrator): void {
23
+ cmd
24
+ .command("deep-recall <query>")
25
+ .description("Budgeted multi-hop retrieval over the anchor graph (slow, thorough; issue #2332)")
26
+ .option("--max-steps <n>", "Policy-step ceiling (cannot exceed the configured deepRecall.maxSteps)")
27
+ .option("--namespace <ns>", "Namespace to scope the retrieval to")
28
+ .option("--json", "JSON output (full entries + trace)")
29
+ .action(async (...args: unknown[]) => {
30
+ const query = String(args[0] ?? "");
31
+ const options = (args[args.length - 1] ?? {}) as Record<string, unknown>;
32
+ let maxSteps: number | undefined;
33
+ try {
34
+ maxSteps = parseMaxSteps(options.maxSteps);
35
+ } catch (err) {
36
+ console.error(err instanceof Error ? err.message : String(err));
37
+ process.exitCode = 1;
38
+ return;
39
+ }
40
+ const service = new EngramAccessService(orchestrator);
41
+ try {
42
+ const result = await service.deepRecall({
43
+ query,
44
+ ...(maxSteps !== undefined ? { maxSteps } : {}),
45
+ ...(typeof options.namespace === "string" && options.namespace.length > 0
46
+ ? { namespace: options.namespace }
47
+ : {}),
48
+ });
49
+ if (options.json === true) {
50
+ console.log(JSON.stringify(result, null, 2));
51
+ } else {
52
+ console.log(result.rendered);
53
+ }
54
+ if (!result.ok) process.exitCode = 1;
55
+ } catch (err) {
56
+ console.error(err instanceof Error ? err.message : String(err));
57
+ process.exitCode = 1;
58
+ }
59
+ });
60
+ }
package/src/cli.ts CHANGED
@@ -14,7 +14,7 @@ import { bumpMemoryCorpusVersionForDir } from "./memory-corpus-version.js";
14
14
  import { utcDayRange } from "./transcript.js";
15
15
  import { padEndDisplay, truncateGraphemeSafe } from "./whitespace.js";
16
16
  import { runWearablesCliCommand } from "./wearables/cli.js";
17
- import { registerMeetingsCommands } from "./cli/meetings-commands.js";
17
+ import { registerMeetingsCommands } from "./cli/meetings-commands.js"; import { registerDeepRecallCommands } from "./cli/deep-recall-commands.js";
18
18
  import { registerExportOkfCommand, registerOkfCommands } from "./cli/okf-commands.js";
19
19
  import { registerSkillsCommands } from "./cli/skills-commands.js";
20
20
  import { registerResearchStatusCommands } from "./cli/research-status-commands.js";
@@ -6230,7 +6230,7 @@ export function registerCli(
6230
6230
 
6231
6231
  registerResearchStatusCommands(cmd, orchestrator);
6232
6232
 
6233
- registerCreationLedgerCommands(cmd, orchestrator); registerMeetingsCommands(cmd, orchestrator); registerOkfCommands(cmd, orchestrator);
6233
+ registerCreationLedgerCommands(cmd, orchestrator); registerMeetingsCommands(cmd, orchestrator); registerOkfCommands(cmd, orchestrator); registerDeepRecallCommands(cmd, orchestrator);
6234
6234
 
6235
6235
  cmd
6236
6236
  .command("trust-zone-promote")
@@ -2656,3 +2656,22 @@ test("parseConfig rejects array contradictionLocalization values", () => {
2656
2656
  /contradictionLocalization must be an object/,
2657
2657
  );
2658
2658
  });
2659
+
2660
+ test("parseConfig coerces string-typed sharedContextAllowBindingAuthority from the CLI", () => {
2661
+ // `--config sharedContextAllowBindingAuthority=true` arrives as a string, so a
2662
+ // strict `=== true` silently left the feature off for anyone who enabled it.
2663
+ for (const enabled of ["true", "1", "yes", "on", true]) {
2664
+ assert.equal(
2665
+ parseConfig({ sharedContextAllowBindingAuthority: enabled }).sharedContextAllowBindingAuthority,
2666
+ true,
2667
+ `${JSON.stringify(enabled)} must enable binding authority`,
2668
+ );
2669
+ }
2670
+ for (const disabled of ["false", "0", "no", "off", false, undefined, "", "garbage"]) {
2671
+ assert.equal(
2672
+ parseConfig({ sharedContextAllowBindingAuthority: disabled }).sharedContextAllowBindingAuthority,
2673
+ false,
2674
+ `${JSON.stringify(disabled)} must leave binding authority off`,
2675
+ );
2676
+ }
2677
+ });
package/src/config.ts CHANGED
@@ -46,6 +46,7 @@ import { parseProceduralMaintenanceConfig } from "./procedural/maintenance-confi
46
46
  import { parseActiveContextFields } from "./active-context-config.js";
47
47
  import { parseSkillProjectionConfig } from "./procedural/skill-projection.js";
48
48
  import { parseDriftDetectionConfig } from "./preferences/drift-config.js";
49
+ import { parseDeepRecallConfig } from "./deep-recall-config.js";
49
50
  import { parseContradictionLocalizationConfig, parseContradictionScanConfig } from "./contradiction-config.js";
50
51
  import { parseGraphPathScoringConfig } from "./graph-path-scoring-config.js";
51
52
  import { parseWritePathDedupConfig } from "./dedup/novelty-gate.js";
@@ -1793,6 +1794,8 @@ export function parseConfig(
1793
1794
  contradictionScan: parseContradictionScanConfig(cfg.contradictionScan),
1794
1795
  // Preference drift detection (issue #2371)
1795
1796
  driftDetection: parseDriftDetectionConfig(cfg.driftDetection),
1797
+ // Budgeted deep-recall surface (issue #2332)
1798
+ deepRecall: parseDeepRecallConfig(cfg.deepRecall),
1796
1799
  dependencyPropagation: parseDependencyPropagationConfig(cfg),
1797
1800
  // Temporal Supersession (issue #375)
1798
1801
  temporalSupersessionEnabled: cfg.temporalSupersessionEnabled !== false, // On by default
@@ -3026,6 +3029,10 @@ export function parseConfig(
3026
3029
 
3027
3030
  // v4.0 shared-context (default off)
3028
3031
  sharedContextEnabled: cfg.sharedContextEnabled === true,
3032
+ // CLI values arrive as strings (`--config sharedContextAllowBindingAuthority=true`),
3033
+ // so a strict `=== true` silently keeps the feature off. Default stays false.
3034
+ sharedContextAllowBindingAuthority:
3035
+ coerceBool(cfg.sharedContextAllowBindingAuthority, "sharedContextAllowBindingAuthority") ?? false,
3029
3036
  sharedContextDir:
3030
3037
  typeof cfg.sharedContextDir === "string" && cfg.sharedContextDir.length > 0 ? cfg.sharedContextDir : undefined,
3031
3038
  sharedContextMaxInjectChars:
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Deep-recall config (issue #2332) — the `deepRecall` block.
3
+ *
4
+ * Parsed the same way `driftDetection` and `contradictionScan` are:
5
+ * shape-validated, string-coercion safe (§24), and honoring documented
6
+ * zero/no-op values (§33) rather than clamping them to something non-zero.
7
+ * `maxSteps: 0` disables the policy loop (seed-only retrieval);
8
+ * `maxResults: 0` returns an empty entry list; `maxExpandPerStep: 0`
9
+ * lets the policy pick EXPAND but select nothing. Millisecond fields
10
+ * of `0` mean "no timeout on that axis".
11
+ */
12
+
13
+ import { coerceBool, coerceNumber } from "./connectors/coerce.js";
14
+
15
+ export interface DeepRecallConfig {
16
+ /** Master switch for the deep-recall surface. Default false. */
17
+ enabled: boolean;
18
+ /** Policy iterations; 0 disables the loop (seed-only). Default 4. */
19
+ maxSteps: number;
20
+ /** Per-step cap on frontier nodes pulled into the working set. Default 3. */
21
+ maxExpandPerStep: number;
22
+ /** Final working-set cap returned to the caller. Default 12. */
23
+ maxResults: number;
24
+ /** Per policy-call timeout in ms; 0 = none. Default 10000. */
25
+ stepTimeoutMs: number;
26
+ /** Whole-invocation wall-clock timeout in ms; 0 = none. Default 45000. */
27
+ totalTimeoutMs: number;
28
+ }
29
+
30
+ export interface DeepRecallSettings {
31
+ deepRecall: DeepRecallConfig;
32
+ }
33
+
34
+ export const DEEP_RECALL_CONFIG_DEFAULTS: DeepRecallConfig = {
35
+ enabled: false,
36
+ maxSteps: 4,
37
+ maxExpandPerStep: 3,
38
+ maxResults: 12,
39
+ stepTimeoutMs: 10000,
40
+ totalTimeoutMs: 45000,
41
+ };
42
+
43
+ function parseFlag(src: Record<string, unknown>, key: string, fallback: boolean): boolean {
44
+ const value = src[key];
45
+ if (value === undefined || value === null) return fallback;
46
+ const coerced = coerceBool(value);
47
+ if (coerced === undefined) {
48
+ throw new Error(`deepRecall.${key} must be a boolean (or "true"/"false"/"1"/"0"); got ${JSON.stringify(value)}`);
49
+ }
50
+ return coerced;
51
+ }
52
+
53
+ function parseCount(src: Record<string, unknown>, key: string, fallback: number): number {
54
+ const value = src[key];
55
+ if (value === undefined || value === null) return fallback;
56
+ const coerced = coerceNumber(value);
57
+ if (coerced === undefined || !Number.isFinite(coerced)) {
58
+ throw new Error(`deepRecall.${key} must be a finite number; got ${JSON.stringify(value)}`);
59
+ }
60
+ if (!Number.isInteger(coerced)) {
61
+ throw new Error(`deepRecall.${key} must be an integer; got ${JSON.stringify(value)}`);
62
+ }
63
+ if (coerced < 0) {
64
+ throw new Error(`deepRecall.${key} must not be negative; got ${JSON.stringify(value)}`);
65
+ }
66
+ return coerced;
67
+ }
68
+
69
+ export function parseDeepRecallConfig(raw: unknown): DeepRecallConfig {
70
+ if (raw === undefined || raw === null) return { ...DEEP_RECALL_CONFIG_DEFAULTS };
71
+ if (typeof raw !== "object" || Array.isArray(raw)) {
72
+ throw new Error(`deepRecall must be an object; got ${JSON.stringify(raw)}`);
73
+ }
74
+ const src = raw as Record<string, unknown>;
75
+ return {
76
+ enabled: parseFlag(src, "enabled", DEEP_RECALL_CONFIG_DEFAULTS.enabled),
77
+ maxSteps: parseCount(src, "maxSteps", DEEP_RECALL_CONFIG_DEFAULTS.maxSteps),
78
+ maxExpandPerStep: parseCount(src, "maxExpandPerStep", DEEP_RECALL_CONFIG_DEFAULTS.maxExpandPerStep),
79
+ maxResults: parseCount(src, "maxResults", DEEP_RECALL_CONFIG_DEFAULTS.maxResults),
80
+ stepTimeoutMs: parseCount(src, "stepTimeoutMs", DEEP_RECALL_CONFIG_DEFAULTS.stepTimeoutMs),
81
+ totalTimeoutMs: parseCount(src, "totalTimeoutMs", DEEP_RECALL_CONFIG_DEFAULTS.totalTimeoutMs),
82
+ };
83
+ }