@remnic/core 9.69.46 → 9.69.48

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 (601) hide show
  1. package/dist/access-admin-ops-surface.d.ts +15 -14
  2. package/dist/access-admin-ops-surface.js +43 -42
  3. package/dist/access-authorization-probe.d.ts +15 -14
  4. package/dist/access-authorization-probe.js +44 -43
  5. package/dist/access-boundary.d.ts +15 -14
  6. package/dist/access-boundary.js +43 -42
  7. package/dist/access-cli.js +120 -115
  8. package/dist/access-cli.js.map +1 -1
  9. package/dist/access-coding-context-resolution.d.ts +1 -1
  10. package/dist/access-extraction-force-flush.d.ts +15 -14
  11. package/dist/access-extraction-force-flush.js +43 -42
  12. package/dist/access-health-types.d.ts +1 -1
  13. package/dist/access-http-briefing.d.ts +15 -14
  14. package/dist/access-http-briefing.js +44 -43
  15. package/dist/access-http-lcm-compaction.d.ts +15 -14
  16. package/dist/access-http-lifecycle-flush.d.ts +15 -14
  17. package/dist/access-http-offline-stream.d.ts +15 -14
  18. package/dist/access-http-query.d.ts +2 -2
  19. package/dist/access-http-query.js +45 -44
  20. package/dist/access-http.d.ts +16 -15
  21. package/dist/access-http.js +68 -64
  22. package/dist/access-identity-continuity-surface.d.ts +11 -11
  23. package/dist/access-identity-continuity-surface.js +43 -42
  24. package/dist/access-lcm-surface.d.ts +15 -14
  25. package/dist/access-lcm-surface.js +43 -42
  26. package/dist/access-mcp-output-schemas.js +1 -1
  27. package/dist/access-mcp-shared-context-tools.d.ts +15 -14
  28. package/dist/access-mcp.d.ts +15 -14
  29. package/dist/access-mcp.js +56 -53
  30. package/dist/access-memory-search-fanout.d.ts +2 -2
  31. package/dist/{access-namespace-preflight-DDnsN22V.d.ts → access-namespace-preflight-CetF9ziA.d.ts} +1 -1
  32. package/dist/access-namespace-preflight.d.ts +3 -3
  33. package/dist/access-namespace-preflight.js +43 -42
  34. package/dist/access-observe-transcript.d.ts +11 -11
  35. package/dist/access-observe-write-category.d.ts +3 -3
  36. package/dist/access-observe-write-category.js +4 -4
  37. package/dist/access-observe-write-surface.d.ts +15 -14
  38. package/dist/access-observe-write-surface.js +43 -42
  39. package/dist/access-offline-manifest.d.ts +11 -11
  40. package/dist/access-offline-manifest.js +2 -2
  41. package/dist/access-operations-batch.js +45 -44
  42. package/dist/access-operations.d.ts +16 -15
  43. package/dist/access-operations.js +52 -50
  44. package/dist/access-recall-concurrency.d.ts +15 -14
  45. package/dist/access-recall-concurrency.js +43 -42
  46. package/dist/access-recall-response.d.ts +15 -14
  47. package/dist/access-recall-response.js +43 -42
  48. package/dist/access-recall-surface.d.ts +15 -14
  49. package/dist/access-recall-surface.js +43 -42
  50. package/dist/access-schema.d.ts +114 -114
  51. package/dist/access-schema.js +3 -3
  52. package/dist/{access-service-DGynYlbE.d.ts → access-service-DUkTWyZS.d.ts} +77 -74
  53. package/dist/access-service-helpers.d.ts +15 -14
  54. package/dist/access-service.d.ts +15 -14
  55. package/dist/access-service.js +43 -42
  56. package/dist/access-surface-catalog.d.ts +15 -14
  57. package/dist/access-surface-catalog.js +51 -44
  58. package/dist/access-surface-catalog.js.map +1 -1
  59. package/dist/access-wearables-meetings-surface.d.ts +4 -4
  60. package/dist/action-confidence.d.ts +1 -1
  61. package/dist/active-memory-bridge.d.ts +1 -1
  62. package/dist/active-recall.d.ts +1 -1
  63. package/dist/active-recall.js +3 -2
  64. package/dist/active-recall.js.map +1 -1
  65. package/dist/activity/digest.d.ts +1 -1
  66. package/dist/adapters/index.js +4 -4
  67. package/dist/adapters/registry.js +2 -2
  68. package/dist/ambient-provenance.d.ts +1 -1
  69. package/dist/artifact-search.d.ts +1 -1
  70. package/dist/background-generation.d.ts +1 -1
  71. package/dist/behavior-learner.d.ts +1 -1
  72. package/dist/behavior-signals.d.ts +1 -1
  73. package/dist/bootstrap.d.ts +11 -11
  74. package/dist/briefing-window.d.ts +2 -2
  75. package/dist/briefing.d.ts +2 -2
  76. package/dist/briefing.js +13 -13
  77. package/dist/buffer-surprise-report.d.ts +1 -1
  78. package/dist/buffer-turn-helpers.d.ts +1 -1
  79. package/dist/buffer.d.ts +2 -2
  80. package/dist/buffer.js +5 -5
  81. package/dist/bulk-import/index.d.ts +3 -3
  82. package/dist/calibration.d.ts +1 -1
  83. package/dist/capabilities.d.ts +1 -1
  84. package/dist/{catalog-Dl2hYqpS.d.ts → catalog-Bns9zpl3.d.ts} +1 -1
  85. package/dist/causal-behavior.d.ts +1 -1
  86. package/dist/causal-consolidation.d.ts +1 -1
  87. package/dist/causal-consolidation.js +14 -14
  88. package/dist/causal-trajectory-graph.d.ts +1 -1
  89. package/dist/{chunk-N46SNYMC.js → chunk-2B2RHLHI.js} +2 -2
  90. package/dist/{chunk-F5V7KRQS.js → chunk-2WMXZYMS.js} +2 -2
  91. package/dist/{chunk-KF57IQFX.js → chunk-32ZBIGID.js} +19 -15
  92. package/dist/chunk-32ZBIGID.js.map +1 -0
  93. package/dist/{chunk-ORQ7AZMU.js → chunk-3RKVSECD.js} +8 -8
  94. package/dist/{chunk-3NYM6JA4.js → chunk-4LPIVP77.js} +2 -2
  95. package/dist/{chunk-PW4HTWXL.js → chunk-55XWRL6F.js} +2 -2
  96. package/dist/{chunk-GGY7WKMB.js → chunk-5KBI2MOC.js} +1 -1
  97. package/dist/{chunk-IXMWTNNY.js → chunk-6A6HSXWV.js} +2 -2
  98. package/dist/{chunk-P7S7BVBJ.js → chunk-7DU2F7LM.js} +3 -3
  99. package/dist/{chunk-4HTQ76O4.js → chunk-7SJCSDQ3.js} +2 -2
  100. package/dist/{chunk-U4ESGVZ2.js → chunk-7YUX52XZ.js} +3 -3
  101. package/dist/{chunk-FMEP2RB5.js → chunk-B4WI7OF2.js} +2 -2
  102. package/dist/{chunk-EUP4AXIW.js → chunk-B6VDWDFN.js} +2 -2
  103. package/dist/{chunk-UOREPQ3C.js → chunk-BIXELUIR.js} +2 -2
  104. package/dist/{chunk-GYYLZOSO.js → chunk-BMBAA2M5.js} +13 -6
  105. package/dist/chunk-BMBAA2M5.js.map +1 -0
  106. package/dist/{chunk-AYZHHMTK.js → chunk-BNX2TUSF.js} +2 -2
  107. package/dist/{chunk-5ZXGH2ZL.js → chunk-BXOPUJ3W.js} +2 -2
  108. package/dist/{chunk-TE6B2UU6.js → chunk-CD7VTZIG.js} +2 -2
  109. package/dist/{chunk-EC5SVM6H.js → chunk-DE4ZGH2N.js} +2 -2
  110. package/dist/{chunk-YFVIA5A6.js → chunk-DRLZB3CN.js} +2 -2
  111. package/dist/{chunk-SRRZZHA5.js → chunk-EGOWY342.js} +2 -2
  112. package/dist/chunk-EIB4FJVR.js +46 -0
  113. package/dist/chunk-EIB4FJVR.js.map +1 -0
  114. package/dist/{chunk-W44T2KHG.js → chunk-EWBDJQ5Y.js} +3 -3
  115. package/dist/{chunk-JMBTNVMW.js → chunk-FGRJJBFO.js} +2 -2
  116. package/dist/{chunk-F3TURDFG.js → chunk-FPB5LQWW.js} +4 -1
  117. package/dist/{chunk-F3TURDFG.js.map → chunk-FPB5LQWW.js.map} +1 -1
  118. package/dist/{chunk-WGZHSQDV.js → chunk-G2XZFGYN.js} +4 -4
  119. package/dist/{chunk-CFIHVWYZ.js → chunk-GGROFIYX.js} +2 -2
  120. package/dist/{chunk-XLZZLUWL.js → chunk-HG74GEVY.js} +2 -2
  121. package/dist/chunk-HMDYSGY6.js +54 -0
  122. package/dist/chunk-HMDYSGY6.js.map +1 -0
  123. package/dist/{chunk-WUUGE7QC.js → chunk-HS75MCQF.js} +4 -4
  124. package/dist/{chunk-DO6R3LIE.js → chunk-I6IJDTRP.js} +2 -2
  125. package/dist/{chunk-7ZNJN5WZ.js → chunk-IHOXK2I6.js} +55 -6
  126. package/dist/chunk-IHOXK2I6.js.map +1 -0
  127. package/dist/{chunk-2NKY7OC6.js → chunk-IMJPJY7V.js} +2 -2
  128. package/dist/{chunk-TZ44E732.js → chunk-IO7K7GES.js} +2 -2
  129. package/dist/{chunk-7BNB7KHB.js → chunk-JIURESYF.js} +7 -7
  130. package/dist/{chunk-AYP2FZFA.js → chunk-JUOJGZPV.js} +2 -2
  131. package/dist/{chunk-4XTSKGLX.js → chunk-JYXLW22X.js} +3 -3
  132. package/dist/{chunk-HXDXR2FH.js → chunk-KPYMORPQ.js} +41 -31
  133. package/dist/chunk-KPYMORPQ.js.map +1 -0
  134. package/dist/{chunk-IPLYGWQF.js → chunk-KQAFEZQX.js} +5 -5
  135. package/dist/{chunk-AN2O4KZY.js → chunk-KVIMQAER.js} +2 -2
  136. package/dist/chunk-LI4APB6M.js +218 -0
  137. package/dist/chunk-LI4APB6M.js.map +1 -0
  138. package/dist/{chunk-VGRVJ6Z6.js → chunk-LIAM7U2J.js} +2 -2
  139. package/dist/{chunk-S3SND7SO.js → chunk-LIDJWAQV.js} +2 -2
  140. package/dist/{chunk-T5NI5K46.js → chunk-LYMJ36UI.js} +2 -2
  141. package/dist/{chunk-UGGOQKO6.js → chunk-MKJFPIVG.js} +93 -51
  142. package/dist/chunk-MKJFPIVG.js.map +1 -0
  143. package/dist/{chunk-UEJY6ZTQ.js → chunk-MKLDZNBD.js} +2 -2
  144. package/dist/{chunk-QUFJ3NJE.js → chunk-MNG536IS.js} +20 -20
  145. package/dist/{chunk-SW42MMAH.js → chunk-MQT3WP3F.js} +2 -2
  146. package/dist/{chunk-5EHPB6RL.js → chunk-MUNR43V3.js} +2 -2
  147. package/dist/{chunk-OV7GJ4KW.js → chunk-NNFB4CU4.js} +2 -2
  148. package/dist/{chunk-47C6DF43.js → chunk-OS4JVTHR.js} +3 -3
  149. package/dist/{chunk-W6YDAIVB.js → chunk-OSTXIFZW.js} +13 -2
  150. package/dist/chunk-OSTXIFZW.js.map +1 -0
  151. package/dist/chunk-P3YNEMYY.js +212 -0
  152. package/dist/chunk-P3YNEMYY.js.map +1 -0
  153. package/dist/{chunk-JOP7W24J.js → chunk-PA67GXYJ.js} +8 -8
  154. package/dist/{chunk-FSH6KRKO.js → chunk-PPJLJD2D.js} +2 -2
  155. package/dist/{chunk-AG6PANBG.js → chunk-PXJ6HE2W.js} +11 -11
  156. package/dist/{chunk-DDBLZJRV.js → chunk-QB4VXCFN.js} +2 -2
  157. package/dist/{chunk-L63M2PE4.js → chunk-QGAKUOKU.js} +2 -2
  158. package/dist/{chunk-YUQPUK6H.js → chunk-QLCMOHRE.js} +2 -2
  159. package/dist/{chunk-Q4AUIFUA.js → chunk-QMWKENNK.js} +4 -4
  160. package/dist/{chunk-66QOUYNS.js → chunk-R32AEEU3.js} +174 -57
  161. package/dist/chunk-R32AEEU3.js.map +1 -0
  162. package/dist/{chunk-TNQR7N52.js → chunk-S3YM4SZQ.js} +2 -1
  163. package/dist/chunk-S3YM4SZQ.js.map +1 -0
  164. package/dist/{chunk-RW4QNB4J.js → chunk-S45INSV3.js} +3 -1
  165. package/dist/{chunk-RW4QNB4J.js.map → chunk-S45INSV3.js.map} +1 -1
  166. package/dist/{chunk-EEHQY7ER.js → chunk-SK6HEQTW.js} +2 -2
  167. package/dist/{chunk-PGAB2V53.js → chunk-SMBWBEE7.js} +2 -2
  168. package/dist/{chunk-62NYUFNH.js → chunk-SS33RR4F.js} +8 -8
  169. package/dist/{chunk-4ECS33D4.js → chunk-T3T5HTZZ.js} +2 -2
  170. package/dist/{chunk-KG2OOAFF.js → chunk-TQSCR5DU.js} +6 -6
  171. package/dist/{chunk-D5DTZBTV.js → chunk-TW4MXM7H.js} +6 -6
  172. package/dist/chunk-TW4MXM7H.js.map +1 -0
  173. package/dist/{chunk-AS2NOPDM.js → chunk-V7IONNTJ.js} +2 -2
  174. package/dist/{chunk-HYWPUYLO.js → chunk-VV5GCNKG.js} +2 -2
  175. package/dist/{chunk-Y3XHIWVP.js → chunk-WL3PGPGU.js} +2 -2
  176. package/dist/{chunk-3UQIS2GC.js → chunk-WNMVUWI7.js} +2 -2
  177. package/dist/{chunk-66YUOI53.js → chunk-WQW6KPVC.js} +1 -1
  178. package/dist/chunk-WQW6KPVC.js.map +1 -0
  179. package/dist/{chunk-2AV75BJW.js → chunk-WVI43D54.js} +24 -1
  180. package/dist/chunk-WVI43D54.js.map +1 -0
  181. package/dist/{chunk-WOBMSMUK.js → chunk-WYU66IVZ.js} +3 -3
  182. package/dist/{chunk-A7GQBJP5.js → chunk-X2NFFBTO.js} +4 -4
  183. package/dist/{chunk-CWMMKFO7.js → chunk-XEHLYA5Z.js} +3 -3
  184. package/dist/{chunk-JIWZVOQM.js → chunk-XKHRNAK7.js} +2 -2
  185. package/dist/{chunk-VW5TGNJN.js → chunk-XXLH6KFO.js} +2 -2
  186. package/dist/chunk-XYGINDIJ.js +74 -0
  187. package/dist/chunk-XYGINDIJ.js.map +1 -0
  188. package/dist/{chunk-J5OXWG66.js → chunk-XZUHXKM3.js} +2 -2
  189. package/dist/{chunk-K4KE5MYE.js → chunk-Y5VT7BIT.js} +2 -2
  190. package/dist/{chunk-S7KDHFF2.js → chunk-YXWMZAAN.js} +2 -2
  191. package/dist/{chunk-EAZ3YZKN.js → chunk-ZEIJQ4I3.js} +2 -2
  192. package/dist/{cli-Cik3H7q1.d.ts → cli-Bbndoc6k.d.ts} +5 -5
  193. package/dist/cli.d.ts +17 -16
  194. package/dist/cli.js +90 -85
  195. package/dist/coding/export-okf-codegraph.d.ts +1 -1
  196. package/dist/coding/export-okf-codegraph.js +12 -12
  197. package/dist/coding/pre-action-gate.d.ts +1 -1
  198. package/dist/compounding/engine.d.ts +2 -2
  199. package/dist/compounding/engine.js +13 -13
  200. package/dist/compounding/preference-consolidator.d.ts +1 -1
  201. package/dist/compression-optimizer.d.ts +1 -1
  202. package/dist/config.d.ts +1 -1
  203. package/dist/config.js +3 -2
  204. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  205. package/dist/connectors/codex-materialize-runner.js +13 -13
  206. package/dist/connectors/codex-materialize.d.ts +1 -1
  207. package/dist/connectors/index.d.ts +1 -1
  208. package/dist/connectors/index.js +13 -13
  209. package/dist/consolidation-provenance-check.d.ts +2 -2
  210. package/dist/consolidation-undo.d.ts +2 -2
  211. package/dist/contradiction/index.d.ts +4 -4
  212. package/dist/converge-config.d.ts +1 -1
  213. package/dist/convergence-refresh.d.ts +2 -2
  214. package/dist/convergence-refresh.js +15 -15
  215. package/dist/conversation-index/backend.d.ts +1 -1
  216. package/dist/conversation-index/chunker.d.ts +1 -1
  217. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  218. package/dist/conversation-index/indexer.d.ts +1 -1
  219. package/dist/conversation-index/search.d.ts +1 -1
  220. package/dist/corpus-watermark.d.ts +1 -1
  221. package/dist/corpus-watermark.js +15 -15
  222. package/dist/cross-lingual-recall.d.ts +1 -1
  223. package/dist/day-summary.d.ts +1 -1
  224. package/dist/deep-recall-http-glue.d.ts +15 -14
  225. package/dist/deep-recall-http-glue.js +4 -4
  226. package/dist/deep-recall-mcp-tools.d.ts +15 -14
  227. package/dist/deep-recall-policy-llm.d.ts +2 -2
  228. package/dist/deep-recall-seeds.d.ts +1 -1
  229. package/dist/deep-recall.js +2 -2
  230. package/dist/delinearize.d.ts +1 -1
  231. package/dist/dependency-propagation-config.d.ts +1 -1
  232. package/dist/{dependency-propagation-delivery-BXaUoVUf.d.ts → dependency-propagation-delivery-B-LvcDaq.d.ts} +1 -1
  233. package/dist/direct-answer-wiring.d.ts +1 -1
  234. package/dist/direct-answer.d.ts +1 -1
  235. package/dist/embedding-fallback.d.ts +1 -1
  236. package/dist/enrichment/index.d.ts +1 -1
  237. package/dist/entity-origin-fields.d.ts +1 -1
  238. package/dist/entity-retrieval.d.ts +2 -2
  239. package/dist/entity-retrieval.js +14 -14
  240. package/dist/entity-schema.d.ts +1 -1
  241. package/dist/episodic-context.d.ts +1 -1
  242. package/dist/eval-trajectory-contracts.d.ts +1 -1
  243. package/dist/eval-trajectory-store.d.ts +1 -1
  244. package/dist/eval-trajectory.d.ts +1 -1
  245. package/dist/explicit-capture.d.ts +11 -11
  246. package/dist/external-wiki-access.d.ts +15 -14
  247. package/dist/external-wiki-access.js +44 -43
  248. package/dist/external-wiki-collection-registration.d.ts +1 -1
  249. package/dist/external-wiki-collection.d.ts +1 -1
  250. package/dist/external-wiki-mcp-tools.d.ts +15 -14
  251. package/dist/extraction-error-classification.d.ts +1 -1
  252. package/dist/extraction-evidence-class.d.ts +142 -0
  253. package/dist/extraction-evidence-class.js +113 -0
  254. package/dist/extraction-evidence-class.js.map +1 -0
  255. package/dist/extraction-faithfulness.d.ts +2 -2
  256. package/dist/extraction-judge-telemetry.d.ts +2 -2
  257. package/dist/extraction-judge-training.d.ts +2 -2
  258. package/dist/extraction-judge.d.ts +2 -2
  259. package/dist/extraction-liveness.d.ts +1 -1
  260. package/dist/extraction-normalization.d.ts +1 -1
  261. package/dist/extraction-prompt.d.ts +1 -1
  262. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  263. package/dist/extraction-source-grounding.d.ts +1 -1
  264. package/dist/extraction-source-grounding.js +2 -2
  265. package/dist/extraction-span-config.d.ts +1 -1
  266. package/dist/extraction-span-materialize.d.ts +1 -1
  267. package/dist/extraction-span-wire.d.ts +1 -1
  268. package/dist/extraction.d.ts +2 -2
  269. package/dist/extraction.js +21 -21
  270. package/dist/fallback-llm-codex-subscription.d.ts +1 -1
  271. package/dist/fallback-llm.d.ts +1 -1
  272. package/dist/{generic-recall-paths-BkVVEoeO.d.ts → generic-recall-paths-Bfc7zigS.d.ts} +1 -1
  273. package/dist/graph-append-error.d.ts +1 -1
  274. package/dist/graph-dashboard-diff.d.ts +1 -1
  275. package/dist/graph-dashboard-key.d.ts +1 -1
  276. package/dist/graph-dashboard-parser.d.ts +1 -1
  277. package/dist/graph-edge-reinforcement.d.ts +1 -1
  278. package/dist/graph-jsonl.d.ts +1 -1
  279. package/dist/graph-path-reconstruction.d.ts +1 -1
  280. package/dist/graph-path-scoring.d.ts +1 -1
  281. package/dist/graph-snapshot.d.ts +1 -1
  282. package/dist/graph.d.ts +1 -1
  283. package/dist/harmonic-retrieval.js +1 -1
  284. package/dist/importance.d.ts +1 -1
  285. package/dist/importers/index.d.ts +1 -1
  286. package/dist/importers/test-utils.d.ts +1 -1
  287. package/dist/in-flight-reads.d.ts +1 -1
  288. package/dist/{index-Zb6SUV4R.d.ts → index-C7IA1DxB.d.ts} +3 -3
  289. package/dist/index.d.ts +798 -707
  290. package/dist/index.js +184 -134
  291. package/dist/intent.d.ts +1 -1
  292. package/dist/lcm/engine.d.ts +1 -1
  293. package/dist/lcm/engine.js +2 -2
  294. package/dist/lcm/index.d.ts +1 -1
  295. package/dist/lcm/index.js +7 -7
  296. package/dist/lcm/tools.d.ts +1 -1
  297. package/dist/lifecycle.d.ts +1 -1
  298. package/dist/live-connectors-runner.d.ts +1 -1
  299. package/dist/{local-llm-DdrhmecM.d.ts → local-llm-DH4tWtck.d.ts} +1 -1
  300. package/dist/local-llm-helpers.d.ts +2 -2
  301. package/dist/local-llm.d.ts +2 -2
  302. package/dist/local-llm.js +2 -2
  303. package/dist/local-model-endpoint.d.ts +1 -1
  304. package/dist/location/index.d.ts +5 -5
  305. package/dist/location/index.js +15 -15
  306. package/dist/maintenance/memory-governance.d.ts +1 -1
  307. package/dist/maintenance/memory-governance.js +13 -13
  308. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  309. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +13 -13
  310. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  311. package/dist/maintenance/rebuild-memory-projection.js +14 -14
  312. package/dist/{maintenance-Du_VRvVg.d.ts → maintenance-n6yeTQhR.d.ts} +4 -4
  313. package/dist/mcp-memory-inspector-app.d.ts +15 -14
  314. package/dist/mcp-read-only-tools.js +1 -1
  315. package/dist/memory-action-policy.d.ts +1 -1
  316. package/dist/memory-browse-http-glue.d.ts +170 -0
  317. package/dist/memory-browse-http-glue.js +9 -0
  318. package/dist/memory-browse-http-glue.js.map +1 -0
  319. package/dist/memory-browse-mcp-tools.d.ts +160 -0
  320. package/dist/memory-browse-mcp-tools.js +8 -0
  321. package/dist/memory-browse-mcp-tools.js.map +1 -0
  322. package/dist/memory-browse-operations.d.ts +2 -0
  323. package/dist/memory-browse-operations.js +246 -0
  324. package/dist/memory-browse-operations.js.map +1 -0
  325. package/dist/memory-browse.d.ts +113 -0
  326. package/dist/memory-browse.js +49 -0
  327. package/dist/memory-browse.js.map +1 -0
  328. package/dist/memory-cache.d.ts +1 -1
  329. package/dist/memory-controller.d.ts +1 -1
  330. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  331. package/dist/memory-projection-store.d.ts +1 -1
  332. package/dist/memory-provenance.d.ts +1 -1
  333. package/dist/memory-snapshot.d.ts +1 -1
  334. package/dist/memory-subject-cli.d.ts +15 -14
  335. package/dist/memory-subject.d.ts +15 -14
  336. package/dist/memory-worth-outcomes.d.ts +2 -2
  337. package/dist/models-json.d.ts +1 -1
  338. package/dist/namespaces/migrate.d.ts +3 -3
  339. package/dist/namespaces/migrate.js +14 -14
  340. package/dist/namespaces/principal.d.ts +1 -1
  341. package/dist/namespaces/search.d.ts +1 -1
  342. package/dist/namespaces/search.js +6 -6
  343. package/dist/namespaces/storage.d.ts +3 -3
  344. package/dist/namespaces/storage.js +13 -13
  345. package/dist/native-knowledge.d.ts +1 -1
  346. package/dist/offline-sync-impression-drain.d.ts +1 -1
  347. package/dist/operator-doctor-corpus.d.ts +1 -1
  348. package/dist/operator-doctor-corpus.js +16 -16
  349. package/dist/operator-doctor-replica.d.ts +1 -1
  350. package/dist/operator-toolkit.d.ts +3 -3
  351. package/dist/operator-toolkit.js +23 -22
  352. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  353. package/dist/orchestration/maintenance.d.ts +4 -4
  354. package/dist/orchestration/maintenance.js +23 -23
  355. package/dist/{orchestrator-D9U3Zgjp.d.ts → orchestrator-Cirjo3ZB.d.ts} +10 -10
  356. package/dist/orchestrator.d.ts +11 -11
  357. package/dist/orchestrator.js +122 -117
  358. package/dist/patterns-cli.d.ts +1 -1
  359. package/dist/{pipeline-4lqKJZ_0.d.ts → pipeline-DK79FrgH.d.ts} +1 -1
  360. package/dist/policy-runtime.d.ts +1 -1
  361. package/dist/proactive-contention.d.ts +2 -2
  362. package/dist/provenance.d.ts +77 -2
  363. package/dist/provenance.js +7 -3
  364. package/dist/{public-http-AabioFLh.d.ts → public-http-DaHHhWRR.d.ts} +1 -1
  365. package/dist/{qmd-DnoWaXKb.d.ts → qmd-BT0ErlRS.d.ts} +1 -1
  366. package/dist/qmd-preflight.d.ts +2 -2
  367. package/dist/qmd-recall-cache.d.ts +1 -1
  368. package/dist/qmd.d.ts +2 -2
  369. package/dist/qmd.js +4 -4
  370. package/dist/recall-concurrency-config.d.ts +1 -1
  371. package/dist/recall-context-composition.d.ts +43 -3
  372. package/dist/recall-context-composition.js +5 -1
  373. package/dist/recall-disclosure-escalation.d.ts +1 -1
  374. package/dist/recall-explain-renderer.d.ts +1 -1
  375. package/dist/recall-explain-renderer.js +3 -3
  376. package/dist/recall-memory-map.d.ts +1 -1
  377. package/dist/recall-navigate-access.d.ts +1 -1
  378. package/dist/recall-navigate-access.js +2 -2
  379. package/dist/recall-navigate-disclosure.d.ts +1 -1
  380. package/dist/recall-navigate-disclosure.js +2 -2
  381. package/dist/recall-navigate.d.ts +1 -1
  382. package/dist/recall-navigate.js +2 -2
  383. package/dist/recall-navigation-http-glue.d.ts +15 -14
  384. package/dist/recall-navigation-mcp-tools.d.ts +15 -14
  385. package/dist/recall-navigation-operations.js +44 -43
  386. package/dist/recall-navigation-renderer.d.ts +1 -1
  387. package/dist/recall-navigation.d.ts +1 -1
  388. package/dist/recall-navigation.js +43 -42
  389. package/dist/recall-planner-llm.d.ts +1 -1
  390. package/dist/recall-state-view-admission.d.ts +2 -2
  391. package/dist/recall-state-view-admission.js +5 -5
  392. package/dist/recall-state-view-anchors.d.ts +1 -1
  393. package/dist/recall-state.d.ts +1 -1
  394. package/dist/recall-tag-filter.d.ts +1 -1
  395. package/dist/recall-timings.d.ts +1 -1
  396. package/dist/recall-xray-cli.d.ts +1 -1
  397. package/dist/recall-xray-cli.js +4 -4
  398. package/dist/recall-xray-renderer.d.ts +1 -1
  399. package/dist/recall-xray-renderer.js +3 -3
  400. package/dist/recall-xray.d.ts +1 -1
  401. package/dist/recall-xray.js +2 -2
  402. package/dist/reconcile/cursor.d.ts +1 -1
  403. package/dist/reconcile/manifest.d.ts +4 -1
  404. package/dist/reconcile/manifest.js +1 -1
  405. package/dist/reconcile/plan.d.ts +1 -1
  406. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  407. package/dist/replay/normalizers/claude.d.ts +1 -1
  408. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  409. package/dist/replay/normalizers/shared.d.ts +1 -1
  410. package/dist/replay/runner.d.ts +1 -1
  411. package/dist/replay/types.d.ts +1 -1
  412. package/dist/replica-divergence.d.ts +1 -1
  413. package/dist/replica-peers-config.d.ts +1 -1
  414. package/dist/resolve-auth-token.d.ts +1 -1
  415. package/dist/resume-bundles.js +4 -3
  416. package/dist/retrieval-agents.d.ts +2 -2
  417. package/dist/retrieval-tiers.d.ts +1 -1
  418. package/dist/routing/engine.d.ts +1 -1
  419. package/dist/routing/store.d.ts +1 -1
  420. package/dist/salvage-envelope.d.ts +1 -1
  421. package/dist/schemas.d.ts +160 -160
  422. package/dist/{scope-profiles-crazXegZ.d.ts → scope-profiles-BgPQx9iE.d.ts} +1 -1
  423. package/dist/search/embed-helper.d.ts +1 -1
  424. package/dist/search/factory.d.ts +1 -1
  425. package/dist/search/factory.js +5 -5
  426. package/dist/search/index.d.ts +1 -1
  427. package/dist/search/index.js +9 -9
  428. package/dist/search/lancedb-backend.d.ts +1 -1
  429. package/dist/search/meilisearch-backend.d.ts +1 -1
  430. package/dist/search/noop-backend.d.ts +1 -1
  431. package/dist/search/orama-backend.d.ts +1 -1
  432. package/dist/search/port.d.ts +1 -1
  433. package/dist/search/remote-backend.d.ts +1 -1
  434. package/dist/{semantic-consolidation-B09JI9WM.d.ts → semantic-consolidation-BrAWKVcm.d.ts} +1 -1
  435. package/dist/semantic-consolidation.d.ts +2 -2
  436. package/dist/semantic-consolidation.js +14 -14
  437. package/dist/semantic-rule-promotion.js +13 -13
  438. package/dist/semantic-rule-verifier.d.ts +1 -1
  439. package/dist/semantic-rule-verifier.js +13 -13
  440. package/dist/{service-ByjbCuj7.d.ts → service-CqHOTg87.d.ts} +2 -2
  441. package/dist/session-observer-bands.d.ts +1 -1
  442. package/dist/session-observer-state.d.ts +1 -1
  443. package/dist/shared-context/manager.d.ts +7 -7
  444. package/dist/signal.d.ts +1 -1
  445. package/dist/source-agent-qualifier.d.ts +1 -1
  446. package/dist/source-agent-qualifier.js +17 -17
  447. package/dist/standing-memory-block.d.ts +77 -0
  448. package/dist/standing-memory-block.js +40 -0
  449. package/dist/standing-memory-block.js.map +1 -0
  450. package/dist/standup/build.js +13 -13
  451. package/dist/{storage-CbdF077z.d.ts → storage-mD2YQ8_2.d.ts} +1 -1
  452. package/dist/storage.d.ts +2 -2
  453. package/dist/storage.js +12 -12
  454. package/dist/subject-config.d.ts +1 -1
  455. package/dist/summarizer.d.ts +1 -1
  456. package/dist/summarizer.js +3 -3
  457. package/dist/summary-snapshot.d.ts +1 -1
  458. package/dist/support-passport/index.d.ts +18 -17
  459. package/dist/support-passport/index.js +46 -45
  460. package/dist/{tagging-CF7DNV7_.d.ts → tagging-CiAVA-ID.d.ts} +2 -2
  461. package/dist/temporal-supersession.d.ts +2 -2
  462. package/dist/temporal-timeline-recall.d.ts +1 -1
  463. package/dist/temporal-timeline-recall.js +2 -2
  464. package/dist/temporal-validity.d.ts +1 -1
  465. package/dist/threading.d.ts +1 -1
  466. package/dist/tier-migration.d.ts +2 -2
  467. package/dist/tier-routing.d.ts +1 -1
  468. package/dist/topics.d.ts +1 -1
  469. package/dist/transcript.d.ts +1 -1
  470. package/dist/transfer/autodetect.js +1 -1
  471. package/dist/transfer/backup.js +1 -1
  472. package/dist/transfer/capsule-export.js +2 -2
  473. package/dist/transfer/export-okf.d.ts +1 -1
  474. package/dist/transfer/export-okf.js +13 -13
  475. package/dist/transfer/types.d.ts +78 -78
  476. package/dist/trust-score-stage.d.ts +1 -1
  477. package/dist/trust-score.d.ts +1 -1
  478. package/dist/{types-nmhnJpxx.d.ts → types-DgDaoY61.d.ts} +6 -0
  479. package/dist/types.d.ts +1 -1
  480. package/dist/types.js +1 -1
  481. package/dist/utility-runtime.d.ts +1 -1
  482. package/dist/verified-recall.js +13 -13
  483. package/dist/who-knows-cli.d.ts +15 -14
  484. package/dist/who-knows-cli.js +14 -14
  485. package/dist/who-knows.d.ts +15 -14
  486. package/dist/who-knows.js +13 -13
  487. package/dist/write-envelope.d.ts +1 -1
  488. package/package.json +2 -2
  489. package/src/access-boundary.ts +3 -0
  490. package/src/access-http.ts +2 -2
  491. package/src/access-mcp-output-schemas.ts +25 -0
  492. package/src/access-mcp.ts +3 -3
  493. package/src/access-operations.ts +2 -0
  494. package/src/access-service.ts +6 -1
  495. package/src/access-surface-catalog.test.ts +20 -0
  496. package/src/access-surface-catalog.ts +6 -0
  497. package/src/activity/timeline/index.ts +1 -0
  498. package/src/activity/timeline/journal-recap.test.ts +17 -0
  499. package/src/activity/timeline/journal-recap.ts +19 -6
  500. package/src/activity/timeline/recap-export-range.test.ts +289 -0
  501. package/src/activity/timeline/recap-export-range.ts +169 -0
  502. package/src/activity/timeline/recap-export.test.ts +73 -1
  503. package/src/activity/timeline/recap-export.ts +57 -4
  504. package/src/cli/memory-browse-commands.ts +77 -0
  505. package/src/cli.ts +2 -2
  506. package/src/config.ts +11 -0
  507. package/src/extraction-evidence-class.test.ts +355 -0
  508. package/src/extraction-evidence-class.ts +241 -0
  509. package/src/index.ts +1 -0
  510. package/src/mcp-read-only-tools.ts +3 -0
  511. package/src/memory-browse-http-glue.ts +93 -0
  512. package/src/memory-browse-mcp-tools.ts +57 -0
  513. package/src/memory-browse-operations.ts +88 -0
  514. package/src/memory-browse-surface.test.ts +500 -0
  515. package/src/memory-browse.ts +316 -0
  516. package/src/provenance.ts +3 -3
  517. package/src/recall-context-composition.test.ts +66 -0
  518. package/src/recall-context-composition.ts +102 -2
  519. package/src/reconcile/manifest.test.ts +27 -0
  520. package/src/reconcile/manifest.ts +7 -0
  521. package/src/standing-memory-block.test.ts +262 -0
  522. package/src/standing-memory-block.ts +331 -0
  523. package/src/types.ts +6 -0
  524. package/dist/chunk-2AV75BJW.js.map +0 -1
  525. package/dist/chunk-66QOUYNS.js.map +0 -1
  526. package/dist/chunk-66YUOI53.js.map +0 -1
  527. package/dist/chunk-7ZNJN5WZ.js.map +0 -1
  528. package/dist/chunk-D5DTZBTV.js.map +0 -1
  529. package/dist/chunk-GYYLZOSO.js.map +0 -1
  530. package/dist/chunk-HXDXR2FH.js.map +0 -1
  531. package/dist/chunk-KF57IQFX.js.map +0 -1
  532. package/dist/chunk-TNQR7N52.js.map +0 -1
  533. package/dist/chunk-UGGOQKO6.js.map +0 -1
  534. package/dist/chunk-W6YDAIVB.js.map +0 -1
  535. /package/dist/{chunk-N46SNYMC.js.map → chunk-2B2RHLHI.js.map} +0 -0
  536. /package/dist/{chunk-F5V7KRQS.js.map → chunk-2WMXZYMS.js.map} +0 -0
  537. /package/dist/{chunk-ORQ7AZMU.js.map → chunk-3RKVSECD.js.map} +0 -0
  538. /package/dist/{chunk-3NYM6JA4.js.map → chunk-4LPIVP77.js.map} +0 -0
  539. /package/dist/{chunk-PW4HTWXL.js.map → chunk-55XWRL6F.js.map} +0 -0
  540. /package/dist/{chunk-GGY7WKMB.js.map → chunk-5KBI2MOC.js.map} +0 -0
  541. /package/dist/{chunk-IXMWTNNY.js.map → chunk-6A6HSXWV.js.map} +0 -0
  542. /package/dist/{chunk-P7S7BVBJ.js.map → chunk-7DU2F7LM.js.map} +0 -0
  543. /package/dist/{chunk-4HTQ76O4.js.map → chunk-7SJCSDQ3.js.map} +0 -0
  544. /package/dist/{chunk-U4ESGVZ2.js.map → chunk-7YUX52XZ.js.map} +0 -0
  545. /package/dist/{chunk-FMEP2RB5.js.map → chunk-B4WI7OF2.js.map} +0 -0
  546. /package/dist/{chunk-EUP4AXIW.js.map → chunk-B6VDWDFN.js.map} +0 -0
  547. /package/dist/{chunk-UOREPQ3C.js.map → chunk-BIXELUIR.js.map} +0 -0
  548. /package/dist/{chunk-AYZHHMTK.js.map → chunk-BNX2TUSF.js.map} +0 -0
  549. /package/dist/{chunk-5ZXGH2ZL.js.map → chunk-BXOPUJ3W.js.map} +0 -0
  550. /package/dist/{chunk-TE6B2UU6.js.map → chunk-CD7VTZIG.js.map} +0 -0
  551. /package/dist/{chunk-EC5SVM6H.js.map → chunk-DE4ZGH2N.js.map} +0 -0
  552. /package/dist/{chunk-YFVIA5A6.js.map → chunk-DRLZB3CN.js.map} +0 -0
  553. /package/dist/{chunk-SRRZZHA5.js.map → chunk-EGOWY342.js.map} +0 -0
  554. /package/dist/{chunk-W44T2KHG.js.map → chunk-EWBDJQ5Y.js.map} +0 -0
  555. /package/dist/{chunk-JMBTNVMW.js.map → chunk-FGRJJBFO.js.map} +0 -0
  556. /package/dist/{chunk-WGZHSQDV.js.map → chunk-G2XZFGYN.js.map} +0 -0
  557. /package/dist/{chunk-CFIHVWYZ.js.map → chunk-GGROFIYX.js.map} +0 -0
  558. /package/dist/{chunk-XLZZLUWL.js.map → chunk-HG74GEVY.js.map} +0 -0
  559. /package/dist/{chunk-WUUGE7QC.js.map → chunk-HS75MCQF.js.map} +0 -0
  560. /package/dist/{chunk-DO6R3LIE.js.map → chunk-I6IJDTRP.js.map} +0 -0
  561. /package/dist/{chunk-2NKY7OC6.js.map → chunk-IMJPJY7V.js.map} +0 -0
  562. /package/dist/{chunk-TZ44E732.js.map → chunk-IO7K7GES.js.map} +0 -0
  563. /package/dist/{chunk-7BNB7KHB.js.map → chunk-JIURESYF.js.map} +0 -0
  564. /package/dist/{chunk-AYP2FZFA.js.map → chunk-JUOJGZPV.js.map} +0 -0
  565. /package/dist/{chunk-4XTSKGLX.js.map → chunk-JYXLW22X.js.map} +0 -0
  566. /package/dist/{chunk-IPLYGWQF.js.map → chunk-KQAFEZQX.js.map} +0 -0
  567. /package/dist/{chunk-AN2O4KZY.js.map → chunk-KVIMQAER.js.map} +0 -0
  568. /package/dist/{chunk-VGRVJ6Z6.js.map → chunk-LIAM7U2J.js.map} +0 -0
  569. /package/dist/{chunk-S3SND7SO.js.map → chunk-LIDJWAQV.js.map} +0 -0
  570. /package/dist/{chunk-T5NI5K46.js.map → chunk-LYMJ36UI.js.map} +0 -0
  571. /package/dist/{chunk-UEJY6ZTQ.js.map → chunk-MKLDZNBD.js.map} +0 -0
  572. /package/dist/{chunk-QUFJ3NJE.js.map → chunk-MNG536IS.js.map} +0 -0
  573. /package/dist/{chunk-SW42MMAH.js.map → chunk-MQT3WP3F.js.map} +0 -0
  574. /package/dist/{chunk-5EHPB6RL.js.map → chunk-MUNR43V3.js.map} +0 -0
  575. /package/dist/{chunk-OV7GJ4KW.js.map → chunk-NNFB4CU4.js.map} +0 -0
  576. /package/dist/{chunk-47C6DF43.js.map → chunk-OS4JVTHR.js.map} +0 -0
  577. /package/dist/{chunk-JOP7W24J.js.map → chunk-PA67GXYJ.js.map} +0 -0
  578. /package/dist/{chunk-FSH6KRKO.js.map → chunk-PPJLJD2D.js.map} +0 -0
  579. /package/dist/{chunk-AG6PANBG.js.map → chunk-PXJ6HE2W.js.map} +0 -0
  580. /package/dist/{chunk-DDBLZJRV.js.map → chunk-QB4VXCFN.js.map} +0 -0
  581. /package/dist/{chunk-L63M2PE4.js.map → chunk-QGAKUOKU.js.map} +0 -0
  582. /package/dist/{chunk-YUQPUK6H.js.map → chunk-QLCMOHRE.js.map} +0 -0
  583. /package/dist/{chunk-Q4AUIFUA.js.map → chunk-QMWKENNK.js.map} +0 -0
  584. /package/dist/{chunk-EEHQY7ER.js.map → chunk-SK6HEQTW.js.map} +0 -0
  585. /package/dist/{chunk-PGAB2V53.js.map → chunk-SMBWBEE7.js.map} +0 -0
  586. /package/dist/{chunk-62NYUFNH.js.map → chunk-SS33RR4F.js.map} +0 -0
  587. /package/dist/{chunk-4ECS33D4.js.map → chunk-T3T5HTZZ.js.map} +0 -0
  588. /package/dist/{chunk-KG2OOAFF.js.map → chunk-TQSCR5DU.js.map} +0 -0
  589. /package/dist/{chunk-AS2NOPDM.js.map → chunk-V7IONNTJ.js.map} +0 -0
  590. /package/dist/{chunk-HYWPUYLO.js.map → chunk-VV5GCNKG.js.map} +0 -0
  591. /package/dist/{chunk-Y3XHIWVP.js.map → chunk-WL3PGPGU.js.map} +0 -0
  592. /package/dist/{chunk-3UQIS2GC.js.map → chunk-WNMVUWI7.js.map} +0 -0
  593. /package/dist/{chunk-WOBMSMUK.js.map → chunk-WYU66IVZ.js.map} +0 -0
  594. /package/dist/{chunk-A7GQBJP5.js.map → chunk-X2NFFBTO.js.map} +0 -0
  595. /package/dist/{chunk-CWMMKFO7.js.map → chunk-XEHLYA5Z.js.map} +0 -0
  596. /package/dist/{chunk-JIWZVOQM.js.map → chunk-XKHRNAK7.js.map} +0 -0
  597. /package/dist/{chunk-VW5TGNJN.js.map → chunk-XXLH6KFO.js.map} +0 -0
  598. /package/dist/{chunk-J5OXWG66.js.map → chunk-XZUHXKM3.js.map} +0 -0
  599. /package/dist/{chunk-K4KE5MYE.js.map → chunk-Y5VT7BIT.js.map} +0 -0
  600. /package/dist/{chunk-S7KDHFF2.js.map → chunk-YXWMZAAN.js.map} +0 -0
  601. /package/dist/{chunk-EAZ3YZKN.js.map → chunk-ZEIJQ4I3.js.map} +0 -0
@@ -0,0 +1,500 @@
1
+ /**
2
+ * Memory-store browse surface tests (issue #2978): ls/tree/find over one
3
+ * resolved namespace, excluded-derived-path invisibility, deterministic
4
+ * ordering, multi-namespace isolation, ACL enforcement, and MCP/HTTP
5
+ * dispatch parity.
6
+ *
7
+ * Service is built the way recall-navigation-surface.test.ts builds it:
8
+ * Object.create(EngramAccessService.prototype) with a stub orchestrator
9
+ * carrying REAL StorageManager instances.
10
+ */
11
+
12
+ import assert from "node:assert/strict";
13
+ import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
14
+ import { tmpdir } from "node:os";
15
+ import path from "node:path";
16
+ import test from "node:test";
17
+
18
+ import { EngramAccessHttpServer } from "./access-http.js";
19
+ import { EngramAccessService } from "./access-service.js";
20
+ import { EngramMcpServer } from "./access-mcp.js";
21
+ import type { CliCommand } from "./cli.js";
22
+ import { registerMemoryBrowseCommands } from "./cli/memory-browse-commands.js";
23
+ import { parseConfig } from "./config.js";
24
+ import { StorageManager } from "./storage.js";
25
+ import type { PluginConfig } from "./types.js";
26
+ import type { Orchestrator } from "./orchestrator.js";
27
+ import { browsePatternMatches, sanitizeBrowsePath } from "./memory-browse.js";
28
+
29
+ interface BrowseFixture {
30
+ service: EngramAccessService;
31
+ storages: Record<string, StorageManager>;
32
+ config: PluginConfig;
33
+ cleanup: () => Promise<void>;
34
+ }
35
+
36
+ async function browseFixture(options: { namespaces?: boolean } = {}): Promise<BrowseFixture> {
37
+ const base = await mkdtemp(path.join(tmpdir(), "remnic-browse-surface-"));
38
+ const nsRoot = path.join(base, "namespaces");
39
+ if (options.namespaces) {
40
+ await mkdir(path.join(nsRoot, "ns_alice"), { recursive: true });
41
+ await mkdir(path.join(nsRoot, "ns_bob"), { recursive: true });
42
+ }
43
+ const config = parseConfig({
44
+ memoryDir: base,
45
+ qmdCollection: "remnic-browse-test",
46
+ ...(options.namespaces
47
+ ? {
48
+ namespacesEnabled: true,
49
+ defaultNamespace: "default",
50
+ namespacePolicies: [
51
+ { name: "ns_alice", readPrincipals: ["alice"], writePrincipals: ["alice"] },
52
+ { name: "ns_bob", readPrincipals: ["bob"], writePrincipals: ["bob"] },
53
+ ],
54
+ }
55
+ : {}),
56
+ });
57
+ const storages: Record<string, StorageManager> = options.namespaces
58
+ ? {
59
+ ns_alice: await makeStorage(path.join(nsRoot, "ns_alice")),
60
+ ns_bob: await makeStorage(path.join(nsRoot, "ns_bob")),
61
+ }
62
+ : { default: await makeStorage(path.join(base, "default")) };
63
+ const service = Object.create(EngramAccessService.prototype) as EngramAccessService;
64
+ const host = service as unknown as { orchestrator: unknown };
65
+ host.orchestrator = {
66
+ config,
67
+ async getStorage(namespace: string) {
68
+ return storages[namespace] ?? storages.default!;
69
+ },
70
+ };
71
+ return {
72
+ service,
73
+ storages,
74
+ config,
75
+ cleanup: async () => {
76
+ StorageManager.clearAllStaticCaches();
77
+ await rm(base, { recursive: true, force: true });
78
+ },
79
+ };
80
+ }
81
+
82
+ async function makeStorage(dir: string): Promise<StorageManager> {
83
+ const storage = new StorageManager(dir);
84
+ // Await: a fire-and-forget ensureDirectories can recreate dirs while the
85
+ // test's rm cleanup is mid-delete (ENOTEMPTY flake).
86
+ await storage.ensureDirectories();
87
+ return storage;
88
+ }
89
+
90
+ /** MCP text content embeds the JSON payload; pull it out for assertions. */
91
+ function extractJson(text: string): string {
92
+ const start = text.indexOf("{");
93
+ const end = text.lastIndexOf("}");
94
+ if (start < 0 || end <= start) return "{}";
95
+ return text.slice(start, end + 1);
96
+ }
97
+
98
+ function httpServer(service: EngramAccessService): EngramAccessHttpServer {
99
+ return new EngramAccessHttpServer({
100
+ service,
101
+ port: 0,
102
+ trustPrincipalHeader: true,
103
+ adminConsoleEnabled: false,
104
+ authTokenEntriesGetter: () => [{ token: "operator-token", capabilities: { version: 1 } }],
105
+ });
106
+ }
107
+
108
+ test("ls/tree/find over the default namespace: counts, descriptions, nesting", async () => {
109
+ const f = await browseFixture();
110
+ const server = new EngramMcpServer(f.service, { emitLegacyTools: true });
111
+ try {
112
+ const storage = f.storages.default!;
113
+ await storage.writeMemory("fact", "The API rate limit is 1000 requests per minute.");
114
+ await storage.writeMemory("decision", "Ship the browse verbs behind the access boundary.");
115
+
116
+ const call = (name: string, arguments_: Record<string, unknown>) =>
117
+ server.handleRequest({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name, arguments: arguments_ } });
118
+
119
+ const lsRoot = JSON.parse(
120
+ extractJson(((await call("engram.memory_ls", {})) as { result?: { content?: Array<{ text?: string }> } }).result?.content?.[0]?.text ?? ""),
121
+ ) as { ok: boolean; namespace: string; entries?: Array<{ path: string; kind: string; count: number }>; total: number };
122
+ assert.equal(lsRoot.ok, true);
123
+ assert.deepEqual(
124
+ (lsRoot.entries ?? []).map((entry) => `${entry.kind}:${entry.path}`),
125
+ ["dir:decisions", "dir:facts"],
126
+ "root lists only non-empty recall-category dirs, sorted",
127
+ );
128
+ assert.equal(lsRoot.entries?.[0]?.count, 1);
129
+ assert.equal(lsRoot.entries?.[1]?.count, 1);
130
+
131
+ // Facts use the dated layout: facts/<date>/<id>.md, so ls facts lists
132
+ // the date dir and ls the date dir lists the memory files.
133
+ const lsFacts = JSON.parse(
134
+ extractJson(((await call("engram.memory_ls", { path: "facts" })) as { result?: { content?: Array<{ text?: string }> } }).result?.content?.[0]?.text ?? ""),
135
+ ) as { ok: boolean; entries?: Array<{ kind: string; path: string }> };
136
+ assert.equal(lsFacts.ok, true);
137
+ const dateDir = (lsFacts.entries ?? []).find((entry) => entry.kind === "dir");
138
+ assert.ok(dateDir, "facts dir lists its dated subdir");
139
+ assert.match(dateDir!.path, /^facts\/\d{4}-\d{2}-\d{2}$/);
140
+
141
+ const lsDate = JSON.parse(
142
+ extractJson(((await call("engram.memory_ls", { path: dateDir!.path })) as { result?: { content?: Array<{ text?: string }> } }).result?.content?.[0]?.text ?? ""),
143
+ ) as { ok: boolean; entries?: Array<{ kind: string; name: string; description: string }> };
144
+ assert.equal(lsDate.ok, true);
145
+ const factFile = (lsDate.entries ?? []).find((entry) => entry.kind === "file");
146
+ assert.ok(factFile, "dated dir lists the written memory file");
147
+ assert.match(factFile!.description, /API rate limit/);
148
+
149
+ const tree = JSON.parse(
150
+ extractJson(((await call("engram.memory_tree", { depth: 3 })) as { result?: { content?: Array<{ text?: string }> } }).result?.content?.[0]?.text ?? ""),
151
+ ) as { ok: boolean; entries?: Array<{ path: string; depth: number; kind: string }> };
152
+ assert.equal(tree.ok, true);
153
+ assert.ok((tree.entries ?? []).some((entry) => entry.kind === "dir" && entry.depth === 0 && entry.path === "facts"));
154
+ assert.ok((tree.entries ?? []).some((entry) => entry.kind === "file" && entry.depth === 2 && entry.path.startsWith("facts/")));
155
+
156
+ const findByGlob = JSON.parse(
157
+ extractJson(((await call("remnic.memory_find", { pattern: "facts/*/*.md" })) as { result?: { content?: Array<{ text?: string }> } }).result?.content?.[0]?.text ?? ""),
158
+ ) as { ok: boolean; entries?: Array<{ path: string }>; total: number };
159
+ assert.equal(findByGlob.ok, true);
160
+ assert.equal(findByGlob.total, 1);
161
+ assert.match(findByGlob.entries?.[0]?.path ?? "", /^facts\//);
162
+
163
+ const findBySubstring = JSON.parse(
164
+ extractJson(((await call("engram.memory_find", { pattern: "rate" })) as { result?: { content?: Array<{ text?: string }> } }).result?.content?.[0]?.text ?? ""),
165
+ ) as { ok: boolean; entries?: Array<{ description: string }>; total: number };
166
+ // Substring matches the PATH/name, not content: "rate" is in the preview
167
+ // but not the filename, so zero hits proves find is deterministic
168
+ // name/path matching, not search.
169
+ assert.equal(findBySubstring.total, 0);
170
+ } finally {
171
+ await f.cleanup();
172
+ }
173
+ });
174
+
175
+ test("derived stores are invisible: artifacts/, meetings records, state/, questions/", async () => {
176
+ const f = await browseFixture();
177
+ const server = new EngramMcpServer(f.service, { emitLegacyTools: true });
178
+ try {
179
+ const storage = f.storages.default!;
180
+ await storage.writeMemory("fact", "Visible recallable fact.");
181
+ // Derived / non-recall stores written straight to disk the way their
182
+ // dedicated writers lay them out.
183
+ const root = storage.dir;
184
+ await mkdir(path.join(root, "artifacts"), { recursive: true });
185
+ await mkdir(path.join(root, "meetings", "2026-08-24"), { recursive: true });
186
+ await mkdir(path.join(root, "state"), { recursive: true });
187
+ await mkdir(path.join(root, "questions"), { recursive: true });
188
+ await writeFile(path.join(root, "artifacts", "secret-artifact.md"), "---\nid: art-1\n---\nhidden artifact body\n");
189
+ await writeFile(path.join(root, "meetings", "2026-08-24", "mtg-2026-08-24-abcdef12.md"), "---\nid: mtg-1\n---\nhidden meeting body\n");
190
+ await writeFile(path.join(root, "state", "lcm.sqlite"), "opaque");
191
+ await writeFile(path.join(root, "questions", "q-1.md"), "---\nid: q-1\n---\nhidden question\n");
192
+
193
+ const call = (name: string, arguments_: Record<string, unknown>) =>
194
+ server.handleRequest({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name, arguments: arguments_ } });
195
+ const payload = async (response: unknown): Promise<Record<string, unknown>> =>
196
+ JSON.parse(extractJson(((response as { result?: { content?: Array<{ text?: string }> } }).result?.content?.[0]?.text) ?? "{}")) as Record<string, unknown>;
197
+
198
+ const lsRoot = (await payload(await call("engram.memory_ls", {}))) as {
199
+ entries?: Array<{ path: string }>;
200
+ };
201
+ const listed = new Set((lsRoot.entries ?? []).map((entry) => entry.path));
202
+ for (const excluded of ["artifacts", "meetings", "state", "questions"]) {
203
+ assert.ok(!listed.has(excluded), `root ls must not list ${excluded}/`);
204
+ }
205
+
206
+ // Direct ls of a derived store is not_found — indistinguishable from a
207
+ // missing path, so existence never leaks.
208
+ const lsArtifacts = (await payload(await call("engram.memory_ls", { path: "artifacts" }))) as { ok: boolean; error?: string };
209
+ assert.equal(lsArtifacts.ok, false);
210
+ assert.equal(lsArtifacts.error, "not_found");
211
+
212
+ // find cannot surface derived paths even with a wildcard that matches.
213
+ const findHidden = (await payload(await call("engram.memory_find", { pattern: "*.md" }))) as {
214
+ entries?: Array<{ path: string }>;
215
+ };
216
+ const paths = (findHidden.entries ?? []).map((entry) => entry.path).join("\n");
217
+ assert.ok(!paths.includes("artifacts/"), "find must not return artifact paths");
218
+ assert.ok(!paths.includes("meetings/"), "find must not return meeting-record paths");
219
+ assert.ok(!paths.includes("questions/"), "find must not return question-queue paths");
220
+
221
+ const findSecret = (await payload(await call("engram.memory_find", { pattern: "secret-artifact" }))) as { total: number };
222
+ assert.equal(findSecret.total, 0, "artifact name must not be findable");
223
+ } finally {
224
+ await f.cleanup();
225
+ }
226
+ });
227
+
228
+ test("deterministic ordering: code-point sort, stable across duplicate calls", async () => {
229
+ const f = await browseFixture();
230
+ try {
231
+ const storage = f.storages.default!;
232
+ // Names whose locale collation differs from code-point order: uppercase
233
+ // sorts before lowercase in code-point order; "10" before "2".
234
+ await mkdir(path.join(storage.dir, "facts", "2026-08-24"), { recursive: true });
235
+ for (const name of ["zeta.md", "Alpha.md", "alpha.md", "10-x.md", "2-x.md"]) {
236
+ await writeFile(path.join(storage.dir, "facts", "2026-08-24", name), `---\nid: ${name}\n---\nbody of ${name}\n`);
237
+ }
238
+ const browse = (verb: "ls" | "find", request: Record<string, unknown>) =>
239
+ f.service.memoryStoreBrowse({ verb, ...(verb === "find" ? { pattern: "*.md" } : { path: "facts/2026-08-24" }), ...request });
240
+
241
+ const first = await browse("ls", {});
242
+ assert.ok(first.ok);
243
+ if (!first.ok) return;
244
+ const names = first.entries.map((entry) => entry.name);
245
+ assert.deepEqual(names, [...names].sort((left, right) => (left < right ? -1 : left > right ? 1 : 0)));
246
+ assert.deepEqual(names, ["10-x.md", "2-x.md", "Alpha.md", "alpha.md", "zeta.md"], "code-point order, not locale order");
247
+
248
+ const second = await browse("ls", {});
249
+ assert.deepEqual(second.ok ? second.entries.map((entry) => entry.path) : [], first.entries.map((entry) => entry.path), "duplicate call is stable");
250
+
251
+ const found = await browse("find", {});
252
+ assert.ok(found.ok);
253
+ if (!found.ok) return;
254
+ assert.deepEqual(
255
+ found.entries.map((entry) => entry.path),
256
+ first.entries.map((entry) => `facts/2026-08-24/${entry.name}`),
257
+ "find returns the same deterministic order",
258
+ );
259
+ } finally {
260
+ await f.cleanup();
261
+ }
262
+ });
263
+
264
+ test("namespace isolation: browse from one namespace never lists another's paths", async () => {
265
+ const f = await browseFixture({ namespaces: true });
266
+ const server = httpServer(f.service);
267
+ try {
268
+ await f.storages.ns_alice!.writeMemory("fact", "Alice-private: the merger closes on Friday.");
269
+ await f.storages.ns_bob!.writeMemory("fact", "Bob-private: the merger closes never.");
270
+
271
+ const status = await server.start();
272
+ const post = (body: Record<string, unknown>, principal: string) =>
273
+ fetch(`http://127.0.0.1:${status.port}/engram/v1/memory/ls`, {
274
+ method: "POST",
275
+ headers: { "content-type": "application/json", authorization: "Bearer operator-token", "x-engram-principal": principal },
276
+ body: JSON.stringify(body),
277
+ });
278
+
279
+ const alice = await post({ namespace: "ns_alice" }, "alice");
280
+ assert.equal(alice.status, 200);
281
+ const aliceBody = (await alice.json()) as { ok: boolean; entries?: Array<{ path: string }>; rendered?: string };
282
+ assert.equal(aliceBody.ok, true);
283
+ const alicePaths = JSON.stringify(aliceBody.entries ?? []);
284
+ assert.ok(!alicePaths.includes("Bob-private"), "bob content must not appear in alice's ls");
285
+ assert.ok(!alicePaths.includes("ns_bob"), "bob namespace paths must not appear");
286
+
287
+ // The wildcard find from alice must not reach bob's namespace either.
288
+ const aliceFind = await fetch(`http://127.0.0.1:${status.port}/engram/v1/memory/find`, {
289
+ method: "POST",
290
+ headers: { "content-type": "application/json", authorization: "Bearer operator-token", "x-engram-principal": "alice" },
291
+ body: JSON.stringify({ namespace: "ns_alice", pattern: "*.md" }),
292
+ });
293
+ const findBody = (await aliceFind.json()) as { ok: boolean; entries?: Array<{ description: string }> };
294
+ assert.equal(findBody.ok, true);
295
+ assert.ok(!JSON.stringify(findBody.entries ?? []).includes("Bob-private"), "find must not cross namespaces");
296
+
297
+ // ACL: bob's principal cannot read ns_alice — the read ACL throws.
298
+ const bobProbe = await post({ namespace: "ns_alice" }, "bob");
299
+ assert.equal(bobProbe.status, 400, "namespace not readable by principal is a 400 input error");
300
+
301
+ // Unauthenticated caller: namespaces enabled + no principal fails closed.
302
+ const anonProbe = await fetch(`http://127.0.0.1:${status.port}/engram/v1/memory/ls`, {
303
+ method: "POST",
304
+ headers: { "content-type": "application/json", authorization: "Bearer operator-token" },
305
+ body: JSON.stringify({ namespace: "ns_alice" }),
306
+ });
307
+ assert.equal(anonProbe.status, 400, "no principal + namespaces enabled fails closed");
308
+ } finally {
309
+ await server.stop();
310
+ await f.cleanup();
311
+ }
312
+ });
313
+
314
+ test("HTTP parity: /memory/ls, /memory/tree, /memory/find share the service result; input errors are 400", async () => {
315
+ const f = await browseFixture();
316
+ const server = httpServer(f.service);
317
+ try {
318
+ await f.storages.default!.writeMemory("fact", "HTTP parity target memory.");
319
+ const status = await server.start();
320
+ const post = (pathname: string, body: Record<string, unknown>) =>
321
+ fetch(`http://127.0.0.1:${status.port}${pathname}`, {
322
+ method: "POST",
323
+ headers: { "content-type": "application/json", authorization: "Bearer operator-token" },
324
+ body: JSON.stringify(body),
325
+ });
326
+
327
+ const ls = await post("/engram/v1/memory/ls", {});
328
+ assert.equal(ls.status, 200);
329
+ const lsBody = (await ls.json()) as { ok: boolean; entries?: Array<{ path: string }>; rendered?: string };
330
+ assert.equal(lsBody.ok, true);
331
+ assert.equal(lsBody.rendered, undefined, "HTTP payload strips the rendered field (navigation precedent)");
332
+ assert.ok((lsBody.entries ?? []).some((entry) => entry.path === "facts"));
333
+
334
+ const remnicAlias = await post("/remnic/v1/memory/tree", { depth: 3 });
335
+ assert.equal(remnicAlias.status, 200);
336
+ const treeBody = (await remnicAlias.json()) as { ok: boolean; entries?: Array<{ depth: number; kind: string }> };
337
+ assert.equal(treeBody.ok, true);
338
+ assert.ok((treeBody.entries ?? []).some((entry) => entry.kind === "file" && entry.depth === 2), "remnic alias tree reaches files");
339
+
340
+ const find = await post("/engram/v1/memory/find", { pattern: "facts/*/*.md" });
341
+ assert.equal(find.status, 200);
342
+ const findBody = (await find.json()) as { ok: boolean; total: number };
343
+ assert.equal(findBody.ok, true);
344
+ assert.ok(findBody.total >= 1, "glob reaches the dated memory file");
345
+
346
+ const escaping = await post("/engram/v1/memory/ls", { path: "../../etc" });
347
+ assert.equal(escaping.status, 200);
348
+ const escapingBody = (await escaping.json()) as { ok: boolean; error?: string };
349
+ assert.equal(escapingBody.ok, false);
350
+ assert.equal(escapingBody.error, "invalid_path");
351
+
352
+ const badDepth = await post("/engram/v1/memory/tree", { depth: 9 });
353
+ assert.equal(badDepth.status, 200);
354
+ assert.equal(((await badDepth.json()) as { error?: string }).error, "invalid_depth");
355
+
356
+ const noPattern = await post("/engram/v1/memory/find", {});
357
+ assert.equal(noPattern.status, 200);
358
+ assert.equal(((await noPattern.json()) as { error?: string }).error, "invalid_pattern");
359
+
360
+ const badDepthType = await post("/engram/v1/memory/tree", { depth: "two" });
361
+ assert.equal(badDepthType.status, 400, "non-integer depth is a transport-level 400");
362
+ } finally {
363
+ await server.stop();
364
+ await f.cleanup();
365
+ }
366
+ });
367
+
368
+ test("tools/list: browse tools carry a real outputSchema with declared properties", async () => {
369
+ const f = await browseFixture();
370
+ const server = new EngramMcpServer(f.service, { emitLegacyTools: true });
371
+ try {
372
+ const response = (await server.handleRequest({ jsonrpc: "2.0", id: 1, method: "tools/list", params: {} })) as {
373
+ result?: { tools?: Array<{ name: string; outputSchema?: { properties?: Record<string, unknown> }; annotations?: { readOnlyHint?: boolean } }> };
374
+ };
375
+ const tools = response.result?.tools ?? [];
376
+ for (const shortName of ["memory_ls", "memory_tree", "memory_find"]) {
377
+ const engram = tools.find((tool) => tool.name === `engram.${shortName}`);
378
+ const remnic = tools.find((tool) => tool.name === `remnic_${shortName}`);
379
+ assert.ok(engram, `engram.${shortName} listed`);
380
+ assert.ok(remnic, `remnic_${shortName} alias listed`);
381
+ for (const tool of [engram, remnic]) {
382
+ const properties = tool?.outputSchema?.properties ?? {};
383
+ assert.deepEqual(
384
+ Object.keys(properties).sort(),
385
+ ["entries", "error", "message", "namespace", "ok", "path", "rendered", "total", "truncated", "verb"],
386
+ `${tool?.name} outputSchema declares the browse result fields`,
387
+ );
388
+ assert.equal(tool?.annotations?.readOnlyHint, true, `${tool?.name} is annotated read-only`);
389
+ }
390
+ }
391
+ } finally {
392
+ await f.cleanup();
393
+ }
394
+ });
395
+
396
+ test("sanitizeBrowsePath and browsePatternMatches: unit edges", () => {
397
+ assert.equal(sanitizeBrowsePath(undefined), "");
398
+ assert.equal(sanitizeBrowsePath(" "), "");
399
+ assert.equal(sanitizeBrowsePath("/"), "");
400
+ assert.equal(sanitizeBrowsePath("facts/2026-08-24"), "facts/2026-08-24");
401
+ assert.equal(sanitizeBrowsePath(" facts "), "facts");
402
+ for (const bad of ["../facts", "facts/../other", "/facts", "facts//x", "facts\\x", "."]) {
403
+ assert.throws(() => sanitizeBrowsePath(bad), `must reject ${bad}`);
404
+ }
405
+ assert.throws(() => sanitizeBrowsePath("facts/\u0000"), "control characters rejected");
406
+
407
+ assert.equal(browsePatternMatches("facts/*.md", "facts/a.md"), true);
408
+ assert.equal(browsePatternMatches("facts/*.md", "facts/sub/a.md"), false, "* does not cross the boundary");
409
+ assert.equal(browsePatternMatches("*.md", "facts/a.md"), true, "glob on basename matches");
410
+ assert.equal(browsePatternMatches("A.MD", "facts/a.md"), true, "case-insensitive");
411
+ assert.equal(browsePatternMatches("a.md", "facts/a.md"), true, "substring on basename");
412
+ assert.equal(browsePatternMatches("zzz", "facts/a.md"), false);
413
+ });
414
+
415
+ /** Stub commander that records registered actions, like the navigation suite. */
416
+ function stubCommander(): { cmd: CliCommand; actions: Map<string, (...args: unknown[]) => Promise<void> | void> } {
417
+ const actions = new Map<string, (...args: unknown[]) => Promise<void> | void>();
418
+ const cmd: CliCommand = {
419
+ command(name: string) {
420
+ const child: CliCommand = {
421
+ command: cmd.command,
422
+ description() {
423
+ return child;
424
+ },
425
+ option() {
426
+ return child;
427
+ },
428
+ requiredOption() {
429
+ return child;
430
+ },
431
+ argument() {
432
+ return child;
433
+ },
434
+ action(fn) {
435
+ actions.set(name, fn);
436
+ return child;
437
+ },
438
+ };
439
+ return child;
440
+ },
441
+ description() {
442
+ return cmd;
443
+ },
444
+ option() {
445
+ return cmd;
446
+ },
447
+ requiredOption() {
448
+ return cmd;
449
+ },
450
+ argument() {
451
+ return cmd;
452
+ },
453
+ action() {
454
+ return cmd;
455
+ },
456
+ };
457
+ return { cmd, actions };
458
+ }
459
+
460
+ test("CLI browse ls/tree/find register and share the service implementation", async () => {
461
+ const f = await browseFixture();
462
+ try {
463
+ await f.storages.default!.writeMemory("fact", "CLI browse target memory.");
464
+ const { cmd, actions } = stubCommander();
465
+ registerMemoryBrowseCommands(cmd, (f.service as unknown as { orchestrator: Orchestrator }).orchestrator);
466
+ const ls = actions.get("browse ls [path]");
467
+ const tree = actions.get("browse tree [path]");
468
+ const find = actions.get("browse find <pattern>");
469
+ assert.ok(ls && tree && find, "CLI must register all three browse commands");
470
+
471
+ const lines: string[] = [];
472
+ const originalLog = console.log;
473
+ console.log = (value?: unknown) => {
474
+ lines.push(String(value ?? ""));
475
+ };
476
+ try {
477
+ await ls(undefined, { json: true });
478
+ const lsPayload = JSON.parse(lines.join("\n")) as { ok: boolean; entries?: Array<{ path: string }> };
479
+ assert.equal(lsPayload.ok, true);
480
+ assert.ok((lsPayload.entries ?? []).some((entry) => entry.path === "facts"));
481
+
482
+ lines.length = 0;
483
+ await tree("facts", { depth: 2, json: true });
484
+ const treePayload = JSON.parse(lines.join("\n")) as { ok: boolean; entries?: Array<{ kind: string; depth: number }> };
485
+ assert.equal(treePayload.ok, true);
486
+ // Rooted at facts: the dated dir is depth 0 and its files depth 1.
487
+ assert.ok((treePayload.entries ?? []).some((entry) => entry.kind === "file" && entry.depth === 1));
488
+
489
+ lines.length = 0;
490
+ await find("facts/*/*.md", { json: true });
491
+ const findPayload = JSON.parse(lines.join("\n")) as { ok: boolean; total: number };
492
+ assert.equal(findPayload.ok, true);
493
+ assert.ok(findPayload.total >= 1);
494
+ } finally {
495
+ console.log = originalLog;
496
+ }
497
+ } finally {
498
+ await f.cleanup();
499
+ }
500
+ });