@remnic/core 9.69.46 → 9.69.47

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 (589) hide show
  1. package/dist/access-admin-ops-surface.d.ts +15 -14
  2. package/dist/access-admin-ops-surface.js +42 -41
  3. package/dist/access-authorization-probe.d.ts +15 -14
  4. package/dist/access-authorization-probe.js +43 -42
  5. package/dist/access-boundary.d.ts +15 -14
  6. package/dist/access-boundary.js +42 -41
  7. package/dist/access-cli.js +119 -114
  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 +42 -41
  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 +43 -42
  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 +44 -43
  20. package/dist/access-http.d.ts +16 -15
  21. package/dist/access-http.js +67 -63
  22. package/dist/access-identity-continuity-surface.d.ts +11 -11
  23. package/dist/access-identity-continuity-surface.js +42 -41
  24. package/dist/access-lcm-surface.d.ts +15 -14
  25. package/dist/access-lcm-surface.js +42 -41
  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 +55 -52
  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 +42 -41
  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 +42 -41
  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 +44 -43
  42. package/dist/access-operations.d.ts +16 -15
  43. package/dist/access-operations.js +51 -49
  44. package/dist/access-recall-concurrency.d.ts +15 -14
  45. package/dist/access-recall-concurrency.js +42 -41
  46. package/dist/access-recall-response.d.ts +15 -14
  47. package/dist/access-recall-response.js +42 -41
  48. package/dist/access-recall-surface.d.ts +15 -14
  49. package/dist/access-recall-surface.js +42 -41
  50. package/dist/access-schema.d.ts +1 -1
  51. package/dist/access-schema.js +3 -3
  52. package/dist/{access-service-DGynYlbE.d.ts → access-service-BXYrJ3pO.d.ts} +13 -10
  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 +42 -41
  56. package/dist/access-surface-catalog.d.ts +15 -14
  57. package/dist/access-surface-catalog.js +50 -43
  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-D5DTZBTV.js → chunk-2JFSQWFH.js} +6 -6
  90. package/dist/chunk-2JFSQWFH.js.map +1 -0
  91. package/dist/{chunk-5EHPB6RL.js → chunk-2QX65IEC.js} +2 -2
  92. package/dist/{chunk-F5V7KRQS.js → chunk-2WMXZYMS.js} +2 -2
  93. package/dist/{chunk-ORQ7AZMU.js → chunk-3RKVSECD.js} +8 -8
  94. package/dist/{chunk-UGGOQKO6.js → chunk-44BILQ7U.js} +93 -51
  95. package/dist/chunk-44BILQ7U.js.map +1 -0
  96. package/dist/{chunk-3NYM6JA4.js → chunk-4LPIVP77.js} +2 -2
  97. package/dist/{chunk-PW4HTWXL.js → chunk-55XWRL6F.js} +2 -2
  98. package/dist/{chunk-GGY7WKMB.js → chunk-5KBI2MOC.js} +1 -1
  99. package/dist/{chunk-IXMWTNNY.js → chunk-6A6HSXWV.js} +2 -2
  100. package/dist/{chunk-4HTQ76O4.js → chunk-7SJCSDQ3.js} +2 -2
  101. package/dist/{chunk-U4ESGVZ2.js → chunk-7YUX52XZ.js} +3 -3
  102. package/dist/{chunk-HXDXR2FH.js → chunk-AS4YKT75.js} +40 -30
  103. package/dist/chunk-AS4YKT75.js.map +1 -0
  104. package/dist/{chunk-EUP4AXIW.js → chunk-B6VDWDFN.js} +2 -2
  105. package/dist/{chunk-AN2O4KZY.js → chunk-BMENHAJL.js} +2 -2
  106. package/dist/{chunk-5ZXGH2ZL.js → chunk-BXOPUJ3W.js} +2 -2
  107. package/dist/{chunk-TE6B2UU6.js → chunk-CD7VTZIG.js} +2 -2
  108. package/dist/{chunk-EC5SVM6H.js → chunk-DE4ZGH2N.js} +2 -2
  109. package/dist/{chunk-YFVIA5A6.js → chunk-DRLZB3CN.js} +2 -2
  110. package/dist/{chunk-SRRZZHA5.js → chunk-EGOWY342.js} +2 -2
  111. package/dist/chunk-EIB4FJVR.js +46 -0
  112. package/dist/chunk-EIB4FJVR.js.map +1 -0
  113. package/dist/{chunk-W44T2KHG.js → chunk-EWBDJQ5Y.js} +3 -3
  114. package/dist/{chunk-JMBTNVMW.js → chunk-FGRJJBFO.js} +2 -2
  115. package/dist/{chunk-F3TURDFG.js → chunk-FPB5LQWW.js} +4 -1
  116. package/dist/{chunk-F3TURDFG.js.map → chunk-FPB5LQWW.js.map} +1 -1
  117. package/dist/{chunk-7BNB7KHB.js → chunk-G2SJRFGP.js} +7 -7
  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-GXJSLNYO.js +74 -0
  121. package/dist/chunk-GXJSLNYO.js.map +1 -0
  122. package/dist/{chunk-XLZZLUWL.js → chunk-HG74GEVY.js} +2 -2
  123. package/dist/chunk-HMDYSGY6.js +54 -0
  124. package/dist/chunk-HMDYSGY6.js.map +1 -0
  125. package/dist/{chunk-WUUGE7QC.js → chunk-HS75MCQF.js} +4 -4
  126. package/dist/{chunk-DO6R3LIE.js → chunk-I6IJDTRP.js} +2 -2
  127. package/dist/{chunk-TZ44E732.js → chunk-IO7K7GES.js} +2 -2
  128. package/dist/{chunk-AYP2FZFA.js → chunk-JUOJGZPV.js} +2 -2
  129. package/dist/{chunk-P7S7BVBJ.js → chunk-JXLEQIJ7.js} +2 -2
  130. package/dist/{chunk-4XTSKGLX.js → chunk-JYXLW22X.js} +3 -3
  131. package/dist/{chunk-IPLYGWQF.js → chunk-KQAFEZQX.js} +5 -5
  132. package/dist/chunk-LI4APB6M.js +218 -0
  133. package/dist/chunk-LI4APB6M.js.map +1 -0
  134. package/dist/{chunk-VGRVJ6Z6.js → chunk-LIAM7U2J.js} +2 -2
  135. package/dist/{chunk-S3SND7SO.js → chunk-LIDJWAQV.js} +2 -2
  136. package/dist/{chunk-T5NI5K46.js → chunk-LYMJ36UI.js} +2 -2
  137. package/dist/{chunk-KF57IQFX.js → chunk-MMQVWKFY.js} +19 -15
  138. package/dist/chunk-MMQVWKFY.js.map +1 -0
  139. package/dist/{chunk-QUFJ3NJE.js → chunk-MNG536IS.js} +20 -20
  140. package/dist/{chunk-SW42MMAH.js → chunk-MQT3WP3F.js} +2 -2
  141. package/dist/{chunk-UEJY6ZTQ.js → chunk-NE45P3OF.js} +2 -2
  142. package/dist/{chunk-N46SNYMC.js → chunk-NMA7RQPR.js} +2 -2
  143. package/dist/{chunk-47C6DF43.js → chunk-OS4JVTHR.js} +3 -3
  144. package/dist/{chunk-W6YDAIVB.js → chunk-OSTXIFZW.js} +13 -2
  145. package/dist/chunk-OSTXIFZW.js.map +1 -0
  146. package/dist/chunk-P3YNEMYY.js +212 -0
  147. package/dist/chunk-P3YNEMYY.js.map +1 -0
  148. package/dist/{chunk-JOP7W24J.js → chunk-PA67GXYJ.js} +8 -8
  149. package/dist/{chunk-FSH6KRKO.js → chunk-PPJLJD2D.js} +2 -2
  150. package/dist/{chunk-AG6PANBG.js → chunk-PXJ6HE2W.js} +11 -11
  151. package/dist/{chunk-DDBLZJRV.js → chunk-QB4VXCFN.js} +2 -2
  152. package/dist/{chunk-L63M2PE4.js → chunk-QGAKUOKU.js} +2 -2
  153. package/dist/{chunk-AYZHHMTK.js → chunk-QKFYJVDG.js} +2 -2
  154. package/dist/{chunk-YUQPUK6H.js → chunk-QLCMOHRE.js} +2 -2
  155. package/dist/{chunk-Q4AUIFUA.js → chunk-QMWKENNK.js} +4 -4
  156. package/dist/{chunk-GYYLZOSO.js → chunk-R4JTUTU6.js} +13 -6
  157. package/dist/chunk-R4JTUTU6.js.map +1 -0
  158. package/dist/{chunk-66QOUYNS.js → chunk-ROBGBT3D.js} +173 -56
  159. package/dist/chunk-ROBGBT3D.js.map +1 -0
  160. package/dist/{chunk-TNQR7N52.js → chunk-S3YM4SZQ.js} +2 -1
  161. package/dist/chunk-S3YM4SZQ.js.map +1 -0
  162. package/dist/{chunk-RW4QNB4J.js → chunk-S45INSV3.js} +3 -1
  163. package/dist/{chunk-RW4QNB4J.js.map → chunk-S45INSV3.js.map} +1 -1
  164. package/dist/{chunk-FMEP2RB5.js → chunk-SJ7ZNUXB.js} +2 -2
  165. package/dist/{chunk-EEHQY7ER.js → chunk-SK6HEQTW.js} +2 -2
  166. package/dist/{chunk-PGAB2V53.js → chunk-SMBWBEE7.js} +2 -2
  167. package/dist/{chunk-62NYUFNH.js → chunk-SS33RR4F.js} +8 -8
  168. package/dist/{chunk-4ECS33D4.js → chunk-T3T5HTZZ.js} +2 -2
  169. package/dist/{chunk-KG2OOAFF.js → chunk-TQSCR5DU.js} +6 -6
  170. package/dist/{chunk-OV7GJ4KW.js → chunk-V2XNMIAM.js} +2 -2
  171. package/dist/{chunk-AS2NOPDM.js → chunk-V7IONNTJ.js} +2 -2
  172. package/dist/{chunk-HYWPUYLO.js → chunk-VV5GCNKG.js} +2 -2
  173. package/dist/{chunk-Y3XHIWVP.js → chunk-WL3PGPGU.js} +2 -2
  174. package/dist/{chunk-3UQIS2GC.js → chunk-WNMVUWI7.js} +2 -2
  175. package/dist/{chunk-66YUOI53.js → chunk-WQW6KPVC.js} +1 -1
  176. package/dist/chunk-WQW6KPVC.js.map +1 -0
  177. package/dist/{chunk-2AV75BJW.js → chunk-WVI43D54.js} +24 -1
  178. package/dist/chunk-WVI43D54.js.map +1 -0
  179. package/dist/{chunk-WOBMSMUK.js → chunk-WYU66IVZ.js} +3 -3
  180. package/dist/{chunk-A7GQBJP5.js → chunk-X2NFFBTO.js} +4 -4
  181. package/dist/{chunk-CWMMKFO7.js → chunk-XEHLYA5Z.js} +3 -3
  182. package/dist/{chunk-JIWZVOQM.js → chunk-XKHRNAK7.js} +2 -2
  183. package/dist/{chunk-VW5TGNJN.js → chunk-XXLH6KFO.js} +2 -2
  184. package/dist/{chunk-J5OXWG66.js → chunk-XZUHXKM3.js} +2 -2
  185. package/dist/{chunk-K4KE5MYE.js → chunk-Y5VT7BIT.js} +2 -2
  186. package/dist/{chunk-UOREPQ3C.js → chunk-YOSLKZLZ.js} +2 -2
  187. package/dist/{chunk-S7KDHFF2.js → chunk-YXWMZAAN.js} +2 -2
  188. package/dist/{chunk-EAZ3YZKN.js → chunk-ZEIJQ4I3.js} +2 -2
  189. package/dist/{cli-Cik3H7q1.d.ts → cli-B8YyIrPR.d.ts} +5 -5
  190. package/dist/cli.d.ts +17 -16
  191. package/dist/cli.js +89 -84
  192. package/dist/coding/export-okf-codegraph.d.ts +1 -1
  193. package/dist/coding/export-okf-codegraph.js +12 -12
  194. package/dist/coding/pre-action-gate.d.ts +1 -1
  195. package/dist/compounding/engine.d.ts +2 -2
  196. package/dist/compounding/engine.js +13 -13
  197. package/dist/compounding/preference-consolidator.d.ts +1 -1
  198. package/dist/compression-optimizer.d.ts +1 -1
  199. package/dist/config.d.ts +1 -1
  200. package/dist/config.js +3 -2
  201. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  202. package/dist/connectors/codex-materialize-runner.js +13 -13
  203. package/dist/connectors/codex-materialize.d.ts +1 -1
  204. package/dist/connectors/index.d.ts +1 -1
  205. package/dist/connectors/index.js +13 -13
  206. package/dist/consolidation-provenance-check.d.ts +2 -2
  207. package/dist/consolidation-undo.d.ts +2 -2
  208. package/dist/contradiction/index.d.ts +4 -4
  209. package/dist/converge-config.d.ts +1 -1
  210. package/dist/convergence-refresh.d.ts +2 -2
  211. package/dist/convergence-refresh.js +15 -15
  212. package/dist/conversation-index/backend.d.ts +1 -1
  213. package/dist/conversation-index/chunker.d.ts +1 -1
  214. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  215. package/dist/conversation-index/indexer.d.ts +1 -1
  216. package/dist/conversation-index/search.d.ts +1 -1
  217. package/dist/corpus-watermark.d.ts +1 -1
  218. package/dist/corpus-watermark.js +15 -15
  219. package/dist/cross-lingual-recall.d.ts +1 -1
  220. package/dist/day-summary.d.ts +1 -1
  221. package/dist/deep-recall-http-glue.d.ts +15 -14
  222. package/dist/deep-recall-http-glue.js +4 -4
  223. package/dist/deep-recall-mcp-tools.d.ts +15 -14
  224. package/dist/deep-recall-policy-llm.d.ts +2 -2
  225. package/dist/deep-recall-seeds.d.ts +1 -1
  226. package/dist/deep-recall.js +2 -2
  227. package/dist/delinearize.d.ts +1 -1
  228. package/dist/dependency-propagation-config.d.ts +1 -1
  229. package/dist/{dependency-propagation-delivery-BXaUoVUf.d.ts → dependency-propagation-delivery-B-LvcDaq.d.ts} +1 -1
  230. package/dist/direct-answer-wiring.d.ts +1 -1
  231. package/dist/direct-answer.d.ts +1 -1
  232. package/dist/embedding-fallback.d.ts +1 -1
  233. package/dist/enrichment/index.d.ts +1 -1
  234. package/dist/entity-origin-fields.d.ts +1 -1
  235. package/dist/entity-retrieval.d.ts +2 -2
  236. package/dist/entity-retrieval.js +13 -13
  237. package/dist/entity-schema.d.ts +1 -1
  238. package/dist/episodic-context.d.ts +1 -1
  239. package/dist/eval-trajectory-contracts.d.ts +1 -1
  240. package/dist/eval-trajectory-store.d.ts +1 -1
  241. package/dist/eval-trajectory.d.ts +1 -1
  242. package/dist/explicit-capture.d.ts +11 -11
  243. package/dist/external-wiki-access.d.ts +15 -14
  244. package/dist/external-wiki-access.js +43 -42
  245. package/dist/external-wiki-collection-registration.d.ts +1 -1
  246. package/dist/external-wiki-collection.d.ts +1 -1
  247. package/dist/external-wiki-mcp-tools.d.ts +15 -14
  248. package/dist/extraction-error-classification.d.ts +1 -1
  249. package/dist/extraction-evidence-class.d.ts +142 -0
  250. package/dist/extraction-evidence-class.js +113 -0
  251. package/dist/extraction-evidence-class.js.map +1 -0
  252. package/dist/extraction-faithfulness.d.ts +2 -2
  253. package/dist/extraction-judge-telemetry.d.ts +2 -2
  254. package/dist/extraction-judge-training.d.ts +2 -2
  255. package/dist/extraction-judge.d.ts +2 -2
  256. package/dist/extraction-liveness.d.ts +1 -1
  257. package/dist/extraction-normalization.d.ts +1 -1
  258. package/dist/extraction-prompt.d.ts +1 -1
  259. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  260. package/dist/extraction-source-grounding.d.ts +1 -1
  261. package/dist/extraction-source-grounding.js +2 -2
  262. package/dist/extraction-span-config.d.ts +1 -1
  263. package/dist/extraction-span-materialize.d.ts +1 -1
  264. package/dist/extraction-span-wire.d.ts +1 -1
  265. package/dist/extraction.d.ts +2 -2
  266. package/dist/extraction.js +21 -21
  267. package/dist/fallback-llm-codex-subscription.d.ts +1 -1
  268. package/dist/fallback-llm.d.ts +1 -1
  269. package/dist/{generic-recall-paths-BkVVEoeO.d.ts → generic-recall-paths-Bfc7zigS.d.ts} +1 -1
  270. package/dist/graph-append-error.d.ts +1 -1
  271. package/dist/graph-dashboard-diff.d.ts +1 -1
  272. package/dist/graph-dashboard-key.d.ts +1 -1
  273. package/dist/graph-dashboard-parser.d.ts +1 -1
  274. package/dist/graph-edge-reinforcement.d.ts +1 -1
  275. package/dist/graph-jsonl.d.ts +1 -1
  276. package/dist/graph-path-reconstruction.d.ts +1 -1
  277. package/dist/graph-path-scoring.d.ts +1 -1
  278. package/dist/graph-snapshot.d.ts +1 -1
  279. package/dist/graph.d.ts +1 -1
  280. package/dist/harmonic-retrieval.js +1 -1
  281. package/dist/importance.d.ts +1 -1
  282. package/dist/importers/index.d.ts +1 -1
  283. package/dist/importers/test-utils.d.ts +1 -1
  284. package/dist/in-flight-reads.d.ts +1 -1
  285. package/dist/{index-Zb6SUV4R.d.ts → index-C7IA1DxB.d.ts} +3 -3
  286. package/dist/index.d.ts +121 -30
  287. package/dist/index.js +179 -133
  288. package/dist/intent.d.ts +1 -1
  289. package/dist/lcm/engine.d.ts +1 -1
  290. package/dist/lcm/engine.js +2 -2
  291. package/dist/lcm/index.d.ts +1 -1
  292. package/dist/lcm/index.js +7 -7
  293. package/dist/lcm/tools.d.ts +1 -1
  294. package/dist/lifecycle.d.ts +1 -1
  295. package/dist/live-connectors-runner.d.ts +1 -1
  296. package/dist/{local-llm-DdrhmecM.d.ts → local-llm-DH4tWtck.d.ts} +1 -1
  297. package/dist/local-llm-helpers.d.ts +2 -2
  298. package/dist/local-llm.d.ts +2 -2
  299. package/dist/local-llm.js +2 -2
  300. package/dist/local-model-endpoint.d.ts +1 -1
  301. package/dist/location/index.d.ts +5 -5
  302. package/dist/location/index.js +15 -15
  303. package/dist/maintenance/memory-governance.d.ts +1 -1
  304. package/dist/maintenance/memory-governance.js +13 -13
  305. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  306. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +13 -13
  307. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  308. package/dist/maintenance/rebuild-memory-projection.js +14 -14
  309. package/dist/{maintenance-Du_VRvVg.d.ts → maintenance-n6yeTQhR.d.ts} +4 -4
  310. package/dist/mcp-memory-inspector-app.d.ts +15 -14
  311. package/dist/mcp-read-only-tools.js +1 -1
  312. package/dist/memory-action-policy.d.ts +1 -1
  313. package/dist/memory-browse-http-glue.d.ts +170 -0
  314. package/dist/memory-browse-http-glue.js +9 -0
  315. package/dist/memory-browse-http-glue.js.map +1 -0
  316. package/dist/memory-browse-mcp-tools.d.ts +160 -0
  317. package/dist/memory-browse-mcp-tools.js +8 -0
  318. package/dist/memory-browse-mcp-tools.js.map +1 -0
  319. package/dist/memory-browse-operations.d.ts +2 -0
  320. package/dist/memory-browse-operations.js +246 -0
  321. package/dist/memory-browse-operations.js.map +1 -0
  322. package/dist/memory-browse.d.ts +113 -0
  323. package/dist/memory-browse.js +49 -0
  324. package/dist/memory-browse.js.map +1 -0
  325. package/dist/memory-cache.d.ts +1 -1
  326. package/dist/memory-controller.d.ts +1 -1
  327. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  328. package/dist/memory-projection-store.d.ts +1 -1
  329. package/dist/memory-provenance.d.ts +1 -1
  330. package/dist/memory-snapshot.d.ts +1 -1
  331. package/dist/memory-subject-cli.d.ts +15 -14
  332. package/dist/memory-subject.d.ts +15 -14
  333. package/dist/memory-worth-outcomes.d.ts +2 -2
  334. package/dist/models-json.d.ts +1 -1
  335. package/dist/namespaces/migrate.d.ts +3 -3
  336. package/dist/namespaces/migrate.js +14 -14
  337. package/dist/namespaces/principal.d.ts +1 -1
  338. package/dist/namespaces/search.d.ts +1 -1
  339. package/dist/namespaces/search.js +6 -6
  340. package/dist/namespaces/storage.d.ts +3 -3
  341. package/dist/namespaces/storage.js +13 -13
  342. package/dist/native-knowledge.d.ts +1 -1
  343. package/dist/offline-sync-impression-drain.d.ts +1 -1
  344. package/dist/operator-doctor-corpus.d.ts +1 -1
  345. package/dist/operator-doctor-corpus.js +16 -16
  346. package/dist/operator-doctor-replica.d.ts +1 -1
  347. package/dist/operator-toolkit.d.ts +3 -3
  348. package/dist/operator-toolkit.js +23 -22
  349. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  350. package/dist/orchestration/maintenance.d.ts +4 -4
  351. package/dist/orchestration/maintenance.js +23 -23
  352. package/dist/{orchestrator-D9U3Zgjp.d.ts → orchestrator-Cirjo3ZB.d.ts} +10 -10
  353. package/dist/orchestrator.d.ts +11 -11
  354. package/dist/orchestrator.js +121 -116
  355. package/dist/patterns-cli.d.ts +1 -1
  356. package/dist/{pipeline-4lqKJZ_0.d.ts → pipeline-DK79FrgH.d.ts} +1 -1
  357. package/dist/policy-runtime.d.ts +1 -1
  358. package/dist/proactive-contention.d.ts +2 -2
  359. package/dist/provenance.d.ts +77 -2
  360. package/dist/provenance.js +7 -3
  361. package/dist/{public-http-AabioFLh.d.ts → public-http-VB85y0ZH.d.ts} +1 -1
  362. package/dist/{qmd-DnoWaXKb.d.ts → qmd-BT0ErlRS.d.ts} +1 -1
  363. package/dist/qmd-preflight.d.ts +2 -2
  364. package/dist/qmd-recall-cache.d.ts +1 -1
  365. package/dist/qmd.d.ts +2 -2
  366. package/dist/qmd.js +4 -4
  367. package/dist/recall-concurrency-config.d.ts +1 -1
  368. package/dist/recall-disclosure-escalation.d.ts +1 -1
  369. package/dist/recall-explain-renderer.d.ts +1 -1
  370. package/dist/recall-explain-renderer.js +3 -3
  371. package/dist/recall-memory-map.d.ts +1 -1
  372. package/dist/recall-navigate-access.d.ts +1 -1
  373. package/dist/recall-navigate-access.js +2 -2
  374. package/dist/recall-navigate-disclosure.d.ts +1 -1
  375. package/dist/recall-navigate-disclosure.js +2 -2
  376. package/dist/recall-navigate.d.ts +1 -1
  377. package/dist/recall-navigate.js +2 -2
  378. package/dist/recall-navigation-http-glue.d.ts +15 -14
  379. package/dist/recall-navigation-mcp-tools.d.ts +15 -14
  380. package/dist/recall-navigation-operations.js +43 -42
  381. package/dist/recall-navigation-renderer.d.ts +1 -1
  382. package/dist/recall-navigation.d.ts +1 -1
  383. package/dist/recall-navigation.js +42 -41
  384. package/dist/recall-planner-llm.d.ts +1 -1
  385. package/dist/recall-state-view-admission.d.ts +2 -2
  386. package/dist/recall-state-view-admission.js +5 -5
  387. package/dist/recall-state-view-anchors.d.ts +1 -1
  388. package/dist/recall-state.d.ts +1 -1
  389. package/dist/recall-tag-filter.d.ts +1 -1
  390. package/dist/recall-timings.d.ts +1 -1
  391. package/dist/recall-xray-cli.d.ts +1 -1
  392. package/dist/recall-xray-cli.js +4 -4
  393. package/dist/recall-xray-renderer.d.ts +1 -1
  394. package/dist/recall-xray-renderer.js +3 -3
  395. package/dist/recall-xray.d.ts +1 -1
  396. package/dist/recall-xray.js +2 -2
  397. package/dist/reconcile/cursor.d.ts +1 -1
  398. package/dist/reconcile/manifest.d.ts +4 -1
  399. package/dist/reconcile/manifest.js +1 -1
  400. package/dist/reconcile/plan.d.ts +1 -1
  401. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  402. package/dist/replay/normalizers/claude.d.ts +1 -1
  403. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  404. package/dist/replay/normalizers/shared.d.ts +1 -1
  405. package/dist/replay/runner.d.ts +1 -1
  406. package/dist/replay/types.d.ts +1 -1
  407. package/dist/replica-divergence.d.ts +1 -1
  408. package/dist/replica-peers-config.d.ts +1 -1
  409. package/dist/resolve-auth-token.d.ts +1 -1
  410. package/dist/resume-bundles.js +4 -3
  411. package/dist/retrieval-agents.d.ts +2 -2
  412. package/dist/retrieval-tiers.d.ts +1 -1
  413. package/dist/routing/engine.d.ts +1 -1
  414. package/dist/routing/store.d.ts +1 -1
  415. package/dist/salvage-envelope.d.ts +1 -1
  416. package/dist/{scope-profiles-crazXegZ.d.ts → scope-profiles-BgPQx9iE.d.ts} +1 -1
  417. package/dist/search/embed-helper.d.ts +1 -1
  418. package/dist/search/factory.d.ts +1 -1
  419. package/dist/search/factory.js +5 -5
  420. package/dist/search/index.d.ts +1 -1
  421. package/dist/search/index.js +9 -9
  422. package/dist/search/lancedb-backend.d.ts +1 -1
  423. package/dist/search/meilisearch-backend.d.ts +1 -1
  424. package/dist/search/noop-backend.d.ts +1 -1
  425. package/dist/search/orama-backend.d.ts +1 -1
  426. package/dist/search/port.d.ts +1 -1
  427. package/dist/search/remote-backend.d.ts +1 -1
  428. package/dist/{semantic-consolidation-B09JI9WM.d.ts → semantic-consolidation-BrAWKVcm.d.ts} +1 -1
  429. package/dist/semantic-consolidation.d.ts +2 -2
  430. package/dist/semantic-consolidation.js +14 -14
  431. package/dist/semantic-rule-promotion.js +13 -13
  432. package/dist/semantic-rule-verifier.d.ts +1 -1
  433. package/dist/semantic-rule-verifier.js +13 -13
  434. package/dist/{service-ByjbCuj7.d.ts → service-CqHOTg87.d.ts} +2 -2
  435. package/dist/session-observer-bands.d.ts +1 -1
  436. package/dist/session-observer-state.d.ts +1 -1
  437. package/dist/shared-context/manager.d.ts +1 -1
  438. package/dist/signal.d.ts +1 -1
  439. package/dist/source-agent-qualifier.d.ts +1 -1
  440. package/dist/source-agent-qualifier.js +17 -17
  441. package/dist/standing-memory-block.d.ts +77 -0
  442. package/dist/standing-memory-block.js +40 -0
  443. package/dist/standing-memory-block.js.map +1 -0
  444. package/dist/standup/build.js +13 -13
  445. package/dist/{storage-CbdF077z.d.ts → storage-mD2YQ8_2.d.ts} +1 -1
  446. package/dist/storage.d.ts +2 -2
  447. package/dist/storage.js +12 -12
  448. package/dist/subject-config.d.ts +1 -1
  449. package/dist/summarizer.d.ts +1 -1
  450. package/dist/summarizer.js +3 -3
  451. package/dist/summary-snapshot.d.ts +1 -1
  452. package/dist/support-passport/index.d.ts +18 -17
  453. package/dist/support-passport/index.js +45 -44
  454. package/dist/{tagging-CF7DNV7_.d.ts → tagging-CiAVA-ID.d.ts} +2 -2
  455. package/dist/temporal-supersession.d.ts +2 -2
  456. package/dist/temporal-timeline-recall.d.ts +1 -1
  457. package/dist/temporal-validity.d.ts +1 -1
  458. package/dist/threading.d.ts +1 -1
  459. package/dist/tier-migration.d.ts +2 -2
  460. package/dist/tier-routing.d.ts +1 -1
  461. package/dist/topics.d.ts +1 -1
  462. package/dist/transcript.d.ts +1 -1
  463. package/dist/transfer/autodetect.js +1 -1
  464. package/dist/transfer/backup.js +1 -1
  465. package/dist/transfer/capsule-export.js +2 -2
  466. package/dist/transfer/export-okf.d.ts +1 -1
  467. package/dist/transfer/export-okf.js +13 -13
  468. package/dist/trust-score-stage.d.ts +1 -1
  469. package/dist/trust-score.d.ts +1 -1
  470. package/dist/{types-nmhnJpxx.d.ts → types-DgDaoY61.d.ts} +6 -0
  471. package/dist/types.d.ts +1 -1
  472. package/dist/types.js +1 -1
  473. package/dist/utility-runtime.d.ts +1 -1
  474. package/dist/verified-recall.js +13 -13
  475. package/dist/who-knows-cli.d.ts +15 -14
  476. package/dist/who-knows-cli.js +14 -14
  477. package/dist/who-knows.d.ts +15 -14
  478. package/dist/who-knows.js +13 -13
  479. package/dist/write-envelope.d.ts +1 -1
  480. package/package.json +2 -2
  481. package/src/access-boundary.ts +3 -0
  482. package/src/access-http.ts +2 -2
  483. package/src/access-mcp-output-schemas.ts +25 -0
  484. package/src/access-mcp.ts +3 -3
  485. package/src/access-operations.ts +2 -0
  486. package/src/access-service.ts +6 -1
  487. package/src/access-surface-catalog.test.ts +20 -0
  488. package/src/access-surface-catalog.ts +6 -0
  489. package/src/activity/timeline/index.ts +1 -0
  490. package/src/activity/timeline/journal-recap.test.ts +17 -0
  491. package/src/activity/timeline/journal-recap.ts +19 -6
  492. package/src/activity/timeline/recap-export-range.test.ts +289 -0
  493. package/src/activity/timeline/recap-export-range.ts +169 -0
  494. package/src/activity/timeline/recap-export.test.ts +73 -1
  495. package/src/activity/timeline/recap-export.ts +57 -4
  496. package/src/cli/memory-browse-commands.ts +77 -0
  497. package/src/cli.ts +2 -2
  498. package/src/config.ts +11 -0
  499. package/src/extraction-evidence-class.test.ts +355 -0
  500. package/src/extraction-evidence-class.ts +241 -0
  501. package/src/index.ts +1 -0
  502. package/src/mcp-read-only-tools.ts +3 -0
  503. package/src/memory-browse-http-glue.ts +93 -0
  504. package/src/memory-browse-mcp-tools.ts +57 -0
  505. package/src/memory-browse-operations.ts +88 -0
  506. package/src/memory-browse-surface.test.ts +500 -0
  507. package/src/memory-browse.ts +316 -0
  508. package/src/provenance.ts +3 -3
  509. package/src/reconcile/manifest.test.ts +27 -0
  510. package/src/reconcile/manifest.ts +7 -0
  511. package/src/standing-memory-block.test.ts +262 -0
  512. package/src/standing-memory-block.ts +331 -0
  513. package/src/types.ts +6 -0
  514. package/dist/chunk-2AV75BJW.js.map +0 -1
  515. package/dist/chunk-66QOUYNS.js.map +0 -1
  516. package/dist/chunk-66YUOI53.js.map +0 -1
  517. package/dist/chunk-D5DTZBTV.js.map +0 -1
  518. package/dist/chunk-GYYLZOSO.js.map +0 -1
  519. package/dist/chunk-HXDXR2FH.js.map +0 -1
  520. package/dist/chunk-KF57IQFX.js.map +0 -1
  521. package/dist/chunk-TNQR7N52.js.map +0 -1
  522. package/dist/chunk-UGGOQKO6.js.map +0 -1
  523. package/dist/chunk-W6YDAIVB.js.map +0 -1
  524. /package/dist/{chunk-5EHPB6RL.js.map → chunk-2QX65IEC.js.map} +0 -0
  525. /package/dist/{chunk-F5V7KRQS.js.map → chunk-2WMXZYMS.js.map} +0 -0
  526. /package/dist/{chunk-ORQ7AZMU.js.map → chunk-3RKVSECD.js.map} +0 -0
  527. /package/dist/{chunk-3NYM6JA4.js.map → chunk-4LPIVP77.js.map} +0 -0
  528. /package/dist/{chunk-PW4HTWXL.js.map → chunk-55XWRL6F.js.map} +0 -0
  529. /package/dist/{chunk-GGY7WKMB.js.map → chunk-5KBI2MOC.js.map} +0 -0
  530. /package/dist/{chunk-IXMWTNNY.js.map → chunk-6A6HSXWV.js.map} +0 -0
  531. /package/dist/{chunk-4HTQ76O4.js.map → chunk-7SJCSDQ3.js.map} +0 -0
  532. /package/dist/{chunk-U4ESGVZ2.js.map → chunk-7YUX52XZ.js.map} +0 -0
  533. /package/dist/{chunk-EUP4AXIW.js.map → chunk-B6VDWDFN.js.map} +0 -0
  534. /package/dist/{chunk-AN2O4KZY.js.map → chunk-BMENHAJL.js.map} +0 -0
  535. /package/dist/{chunk-5ZXGH2ZL.js.map → chunk-BXOPUJ3W.js.map} +0 -0
  536. /package/dist/{chunk-TE6B2UU6.js.map → chunk-CD7VTZIG.js.map} +0 -0
  537. /package/dist/{chunk-EC5SVM6H.js.map → chunk-DE4ZGH2N.js.map} +0 -0
  538. /package/dist/{chunk-YFVIA5A6.js.map → chunk-DRLZB3CN.js.map} +0 -0
  539. /package/dist/{chunk-SRRZZHA5.js.map → chunk-EGOWY342.js.map} +0 -0
  540. /package/dist/{chunk-W44T2KHG.js.map → chunk-EWBDJQ5Y.js.map} +0 -0
  541. /package/dist/{chunk-JMBTNVMW.js.map → chunk-FGRJJBFO.js.map} +0 -0
  542. /package/dist/{chunk-7BNB7KHB.js.map → chunk-G2SJRFGP.js.map} +0 -0
  543. /package/dist/{chunk-WGZHSQDV.js.map → chunk-G2XZFGYN.js.map} +0 -0
  544. /package/dist/{chunk-CFIHVWYZ.js.map → chunk-GGROFIYX.js.map} +0 -0
  545. /package/dist/{chunk-XLZZLUWL.js.map → chunk-HG74GEVY.js.map} +0 -0
  546. /package/dist/{chunk-WUUGE7QC.js.map → chunk-HS75MCQF.js.map} +0 -0
  547. /package/dist/{chunk-DO6R3LIE.js.map → chunk-I6IJDTRP.js.map} +0 -0
  548. /package/dist/{chunk-TZ44E732.js.map → chunk-IO7K7GES.js.map} +0 -0
  549. /package/dist/{chunk-AYP2FZFA.js.map → chunk-JUOJGZPV.js.map} +0 -0
  550. /package/dist/{chunk-P7S7BVBJ.js.map → chunk-JXLEQIJ7.js.map} +0 -0
  551. /package/dist/{chunk-4XTSKGLX.js.map → chunk-JYXLW22X.js.map} +0 -0
  552. /package/dist/{chunk-IPLYGWQF.js.map → chunk-KQAFEZQX.js.map} +0 -0
  553. /package/dist/{chunk-VGRVJ6Z6.js.map → chunk-LIAM7U2J.js.map} +0 -0
  554. /package/dist/{chunk-S3SND7SO.js.map → chunk-LIDJWAQV.js.map} +0 -0
  555. /package/dist/{chunk-T5NI5K46.js.map → chunk-LYMJ36UI.js.map} +0 -0
  556. /package/dist/{chunk-QUFJ3NJE.js.map → chunk-MNG536IS.js.map} +0 -0
  557. /package/dist/{chunk-SW42MMAH.js.map → chunk-MQT3WP3F.js.map} +0 -0
  558. /package/dist/{chunk-UEJY6ZTQ.js.map → chunk-NE45P3OF.js.map} +0 -0
  559. /package/dist/{chunk-N46SNYMC.js.map → chunk-NMA7RQPR.js.map} +0 -0
  560. /package/dist/{chunk-47C6DF43.js.map → chunk-OS4JVTHR.js.map} +0 -0
  561. /package/dist/{chunk-JOP7W24J.js.map → chunk-PA67GXYJ.js.map} +0 -0
  562. /package/dist/{chunk-FSH6KRKO.js.map → chunk-PPJLJD2D.js.map} +0 -0
  563. /package/dist/{chunk-AG6PANBG.js.map → chunk-PXJ6HE2W.js.map} +0 -0
  564. /package/dist/{chunk-DDBLZJRV.js.map → chunk-QB4VXCFN.js.map} +0 -0
  565. /package/dist/{chunk-L63M2PE4.js.map → chunk-QGAKUOKU.js.map} +0 -0
  566. /package/dist/{chunk-AYZHHMTK.js.map → chunk-QKFYJVDG.js.map} +0 -0
  567. /package/dist/{chunk-YUQPUK6H.js.map → chunk-QLCMOHRE.js.map} +0 -0
  568. /package/dist/{chunk-Q4AUIFUA.js.map → chunk-QMWKENNK.js.map} +0 -0
  569. /package/dist/{chunk-FMEP2RB5.js.map → chunk-SJ7ZNUXB.js.map} +0 -0
  570. /package/dist/{chunk-EEHQY7ER.js.map → chunk-SK6HEQTW.js.map} +0 -0
  571. /package/dist/{chunk-PGAB2V53.js.map → chunk-SMBWBEE7.js.map} +0 -0
  572. /package/dist/{chunk-62NYUFNH.js.map → chunk-SS33RR4F.js.map} +0 -0
  573. /package/dist/{chunk-4ECS33D4.js.map → chunk-T3T5HTZZ.js.map} +0 -0
  574. /package/dist/{chunk-KG2OOAFF.js.map → chunk-TQSCR5DU.js.map} +0 -0
  575. /package/dist/{chunk-OV7GJ4KW.js.map → chunk-V2XNMIAM.js.map} +0 -0
  576. /package/dist/{chunk-AS2NOPDM.js.map → chunk-V7IONNTJ.js.map} +0 -0
  577. /package/dist/{chunk-HYWPUYLO.js.map → chunk-VV5GCNKG.js.map} +0 -0
  578. /package/dist/{chunk-Y3XHIWVP.js.map → chunk-WL3PGPGU.js.map} +0 -0
  579. /package/dist/{chunk-3UQIS2GC.js.map → chunk-WNMVUWI7.js.map} +0 -0
  580. /package/dist/{chunk-WOBMSMUK.js.map → chunk-WYU66IVZ.js.map} +0 -0
  581. /package/dist/{chunk-A7GQBJP5.js.map → chunk-X2NFFBTO.js.map} +0 -0
  582. /package/dist/{chunk-CWMMKFO7.js.map → chunk-XEHLYA5Z.js.map} +0 -0
  583. /package/dist/{chunk-JIWZVOQM.js.map → chunk-XKHRNAK7.js.map} +0 -0
  584. /package/dist/{chunk-VW5TGNJN.js.map → chunk-XXLH6KFO.js.map} +0 -0
  585. /package/dist/{chunk-J5OXWG66.js.map → chunk-XZUHXKM3.js.map} +0 -0
  586. /package/dist/{chunk-K4KE5MYE.js.map → chunk-Y5VT7BIT.js.map} +0 -0
  587. /package/dist/{chunk-UOREPQ3C.js.map → chunk-YOSLKZLZ.js.map} +0 -0
  588. /package/dist/{chunk-S7KDHFF2.js.map → chunk-YXWMZAAN.js.map} +0 -0
  589. /package/dist/{chunk-EAZ3YZKN.js.map → chunk-ZEIJQ4I3.js.map} +0 -0
@@ -0,0 +1,241 @@
1
+ /**
2
+ * Deterministic evidence provenance classes (issue #2973).
3
+ *
4
+ * Every extracted candidate is backed by spans located in buffered turns.
5
+ * The CLASS of a span — whose words it records — decides what the span can
6
+ * license (learned from distill-kura's measured self-reinforcing assertion
7
+ * loop: an agent asserts, the extractor records, the next agent reads it back
8
+ * as ground truth and repeats it with more confidence):
9
+ *
10
+ * - `user`: the human's own words. Licenses user attributions.
11
+ * - `tool`: machine output. The ONLY licit source for numbers.
12
+ * - `action`: a tool was invoked. Weaker than reading its output.
13
+ * - `agent`: agent prose. Licenses a first-person judgement, never a
14
+ * bare fact.
15
+ *
16
+ * Derivation is pure and total: turn role plus tool-part flags in, one class
17
+ * out, no clock, no randomness, no I/O. The same input always yields the
18
+ * same class. Span matching reuses `locateQuoteOffsets` /
19
+ * `stripLeadingRolePrefix` from `provenance.ts` so class location and
20
+ * provenance building can never disagree (issue #1575 pitfall: one matcher,
21
+ * not two).
22
+ *
23
+ * The post-extraction rules (`applyEvidenceClassRules`) are deterministic
24
+ * string/flag checks — no LLM — designed to run before the judge. Each
25
+ * returns a stable rule id for shadow-mode telemetry. Not yet wired into the
26
+ * extraction pipeline; see the issue's rollout plan.
27
+ */
28
+
29
+ import { locateQuoteOffsets, stripLeadingRolePrefix } from "./provenance.js";
30
+ import type { MemorySubject } from "./types.js";
31
+ import { collapseWhitespace } from "./whitespace.js";
32
+
33
+ export type EvidenceClass = "user" | "tool" | "action" | "agent";
34
+
35
+ /** Canonical class order: strongest license first. Fixed; never reorder. */
36
+ export const EVIDENCE_CLASSES: readonly EvidenceClass[] = ["user", "tool", "action", "agent"];
37
+
38
+ /**
39
+ * A buffered turn reduced to what class derivation needs. Callers map
40
+ * `BufferTurn`s via {@link evidenceTurnInput}; `role` and the tool flags are
41
+ * the only fields that influence the class.
42
+ */
43
+ export interface EvidenceClassTurnInput {
44
+ content: string;
45
+ role: "user" | "assistant";
46
+ /** Turn carries machine output (a tool_result part). */
47
+ toolResult?: boolean;
48
+ /** Turn records a tool invocation (a tool_call part). */
49
+ toolCall?: boolean;
50
+ }
51
+
52
+ /**
53
+ * Derive a turn's evidence class. Total and deterministic:
54
+ * - `role: "user"` → `"user"` (the human's words, regardless of stray
55
+ * part flags a connector may attach).
56
+ * - `role: "assistant"` with `toolResult` → `"tool"`; machine output
57
+ * outranks the invocation that produced it.
58
+ * - else with `toolCall` → `"action"`.
59
+ * - else → `"agent"` (agent prose — the weakest license).
60
+ */
61
+ export function deriveTurnEvidenceClass(turnInput: EvidenceClassTurnInput): EvidenceClass {
62
+ if (turnInput.role === "user") return "user";
63
+ if (turnInput.toolResult === true) return "tool";
64
+ if (turnInput.toolCall === true) return "action";
65
+ return "agent";
66
+ }
67
+
68
+ /**
69
+ * Map a buffered turn (structural subset of `BufferTurn`) to
70
+ * {@link EvidenceClassTurnInput}. Tool flags derive mechanically from part
71
+ * kinds — no content inspection, no heuristics.
72
+ */
73
+ export function evidenceTurnInput(bufferTurn: {
74
+ role: "user" | "assistant";
75
+ content: string;
76
+ parts?: ReadonlyArray<{ kind: string }>;
77
+ }): EvidenceClassTurnInput {
78
+ let toolResult = false;
79
+ let toolCall = false;
80
+ if (bufferTurn.parts) {
81
+ for (const part of bufferTurn.parts) {
82
+ if (part.kind === "tool_result") toolResult = true;
83
+ else if (part.kind === "tool_call") toolCall = true;
84
+ }
85
+ }
86
+ return {
87
+ role: bufferTurn.role,
88
+ content: bufferTurn.content,
89
+ ...(toolResult ? { toolResult: true } : {}),
90
+ ...(toolCall ? { toolCall: true } : {}),
91
+ };
92
+ }
93
+
94
+ /**
95
+ * Resolve which quote `buildFactProvenance` would search for: the raw quote
96
+ * when it matches at least one turn, else the leading prompt role label
97
+ * stripped (mirrors the raw-preferred contract in `provenance.ts`).
98
+ */
99
+ function resolveSearchableQuote(
100
+ quote: string | null | undefined,
101
+ turns: ReadonlyArray<EvidenceClassTurnInput>,
102
+ ): string {
103
+ const rawQuote = typeof quote === "string" ? quote.trim() : "";
104
+ if (rawQuote.length === 0) return "";
105
+ const stripped = stripLeadingRolePrefix(rawQuote);
106
+ if (rawQuote === stripped) return rawQuote;
107
+ const rawMatches = turns.some(
108
+ (t) => typeof t?.content === "string" && t.content.length > 0 && locateQuoteOffsets(rawQuote, t.content).matched,
109
+ );
110
+ return rawMatches ? rawQuote : stripped;
111
+ }
112
+
113
+ /**
114
+ * Classify the evidence backing a fact: the classes of every turn in which
115
+ * its quote was located, in canonical `EVIDENCE_CLASSES` order regardless of
116
+ * turn order. Deterministic — the same `(quote, turns)` pair always yields
117
+ * the same array. An absent or unlocatable quote yields `[]` (no evidence
118
+ * class; the extractor's own assertion is all that backs the fact).
119
+ */
120
+ export function classifyEvidenceClasses(input: {
121
+ quote: string | null | undefined;
122
+ turns: ReadonlyArray<EvidenceClassTurnInput>;
123
+ }): EvidenceClass[] {
124
+ const quote = resolveSearchableQuote(input.quote, input.turns);
125
+ if (quote.length === 0) return [];
126
+ const present = new Set<EvidenceClass>();
127
+ for (const turn of input.turns) {
128
+ if (!turn || typeof turn.content !== "string" || turn.content.length === 0) continue;
129
+ if (locateQuoteOffsets(quote, turn.content).matched) {
130
+ present.add(deriveTurnEvidenceClass(turn));
131
+ }
132
+ }
133
+ return EVIDENCE_CLASSES.filter((cls) => present.has(cls));
134
+ }
135
+
136
+ /**
137
+ * Collapse a fact's evidence classes to the single strongest license present.
138
+ * No located span (`[]`) collapses to `"agent"`: the fact is agent-asserted.
139
+ */
140
+ export function deriveFactEvidenceClass(classes: readonly EvidenceClass[]): EvidenceClass {
141
+ for (const cls of EVIDENCE_CLASSES) {
142
+ if (classes.includes(cls)) return cls;
143
+ }
144
+ return "agent";
145
+ }
146
+
147
+ // ---------------------------------------------------------------------------
148
+ // Deterministic post-extraction rules (no LLM; run before the judge)
149
+ // ---------------------------------------------------------------------------
150
+
151
+ export type EvidenceRuleId =
152
+ | "numeric_without_tool_evidence"
153
+ | "user_attribution_without_user_span"
154
+ | "echo_of_existing_content";
155
+
156
+ export interface EvidenceRuleFinding {
157
+ rule: EvidenceRuleId;
158
+ /** `demote` routes the fact to `pending_review`; `refuse` drops it. */
159
+ action: "demote" | "refuse";
160
+ reason: string;
161
+ }
162
+
163
+ /** Categories that attribute a choice or commitment to the modeled subject. */
164
+ const DECISION_LIKE_CATEGORIES: Record<string, true> = {
165
+ decision: true,
166
+ preference: true,
167
+ commitment: true,
168
+ };
169
+
170
+ /**
171
+ * Normalize a quote for echo comparison. Casefold plus whitespace collapse —
172
+ * the same normalization `locateQuoteOffsets` matches with, via the single
173
+ * shared normalizer in `whitespace.ts`.
174
+ */
175
+ export function echoQuoteKey(quote: string): string {
176
+ return collapseWhitespace(quote.toLowerCase());
177
+ }
178
+
179
+ /**
180
+ * Apply the three deterministic evidence rules to one extracted fact.
181
+ * Pure; findings come back in canonical rule-id order. A fact triggers:
182
+ *
183
+ * 1. `numeric_without_tool_evidence` — content carries a digit but no
184
+ * `tool`/`action` span backs it. The human and the agent are both
185
+ * illicit sources for numbers; demote to review rather than refuse
186
+ * (the number may be real — it is just unproven).
187
+ * 2. `user_attribution_without_user_span` — a decision-like fact about the
188
+ * user (absent `subject` reads as `"user"`, mirroring the promotion
189
+ * guard's fail-closed default) with no `user` span. This is the
190
+ * assertion-loop gate: an agent-asserted "the user decided X" is
191
+ * refused, never promoted to active.
192
+ * 3. `echo_of_existing_content` — every quote backing the fact already
193
+ * exists in the store index, so the "evidence" is the store reading
194
+ * itself back through a tool result. Refused: not new material.
195
+ */
196
+ export function applyEvidenceClassRules(input: {
197
+ content: string;
198
+ category?: string;
199
+ subject?: MemorySubject;
200
+ evidenceClasses?: readonly EvidenceClass[];
201
+ /** Normalized keys (`echoQuoteKey`) of the fact's surviving quotes. */
202
+ quoteKeys?: readonly string[];
203
+ /** Normalized keys of quotes already present in the content-hash index. */
204
+ existingQuoteKeys?: ReadonlySet<string>;
205
+ }): EvidenceRuleFinding[] {
206
+ const classes = input.evidenceClasses ?? [];
207
+ const findings: EvidenceRuleFinding[] = [];
208
+
209
+ if (/\d/.test(input.content) && !classes.some((c) => c === "tool" || c === "action")) {
210
+ findings.push({
211
+ rule: "numeric_without_tool_evidence",
212
+ action: "demote",
213
+ reason: "content carries a number but no tool or action evidence span backs it",
214
+ });
215
+ }
216
+
217
+ const decisionLike = input.category !== undefined && DECISION_LIKE_CATEGORIES[input.category] === true;
218
+ const subject = input.subject ?? "user";
219
+ if (decisionLike && subject === "user" && !classes.includes("user")) {
220
+ findings.push({
221
+ rule: "user_attribution_without_user_span",
222
+ action: "refuse",
223
+ reason: "decision-like fact about the user with no user-role evidence span",
224
+ });
225
+ }
226
+
227
+ const quoteKeys = input.quoteKeys ?? [];
228
+ if (
229
+ quoteKeys.length > 0
230
+ && input.existingQuoteKeys !== undefined
231
+ && quoteKeys.every((key) => input.existingQuoteKeys!.has(key))
232
+ ) {
233
+ findings.push({
234
+ rule: "echo_of_existing_content",
235
+ action: "refuse",
236
+ reason: "every evidence quote already exists in the store (echo, not new material)",
237
+ });
238
+ }
239
+
240
+ return findings;
241
+ }
package/src/index.ts CHANGED
@@ -49,6 +49,7 @@ export { searchWithGenericExclusion } from "./access-memory-search-fanout.js";
49
49
  export * from "./model-registry.js";
50
50
  export * from "./contradiction/index.js";
51
51
  export * from "./recall-state-view.js";
52
+ export * from "./standing-memory-block.js";
52
53
 
53
54
  export {
54
55
  buildEvidencePack,
@@ -30,6 +30,9 @@ export const MCP_READ_ONLY_TOOL_SUFFIXES: Readonly<Record<string, true>> = {
30
30
  deep_recall: true,
31
31
  memory_expand: true,
32
32
  memory_traverse: true,
33
+ memory_ls: true,
34
+ memory_tree: true,
35
+ memory_find: true,
33
36
  standup: true,
34
37
  action_confidence: true,
35
38
  capsule_list: true,
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Memory-store browse HTTP glue (issue #2978) — route bodies live here so
3
+ * access-http.ts stays at its structural ceiling (same seam as
4
+ * recall-navigation-http-glue.ts).
5
+ *
6
+ * Each route carries its literal `enforceTokenOp("<op>")` boundary-dispatch
7
+ * marker so `access-surface-catalog.test.ts` can prove dispatch statically.
8
+ * Input errors map to 400; everything else rethrows to the global 500
9
+ * handler. Namespace resolution flows through the caller-supplied
10
+ * `scopeFor` gate so a body-supplied namespace passes the SAME
11
+ * effective-namespace allow-list as the query string (issue #1850 finding
12
+ * 2), and `authenticatedPrincipal` reaches the service so authorization
13
+ * derives from the presenting principal, never client-supplied input.
14
+ */
15
+
16
+ import type { IncomingMessage, ServerResponse } from "node:http";
17
+
18
+ import { EngramAccessInputError } from "./access-errors.js";
19
+ import type { EngramAccessService } from "./access-service.js";
20
+ import type { BrowseVerb } from "./memory-browse.js";
21
+
22
+ type RespondJson = (res: ServerResponse, status: number, payload: unknown) => void;
23
+ type ReadJsonBody = (req: IncomingMessage) => Promise<unknown>;
24
+
25
+ type ScopeFor = (
26
+ bodyNamespace?: string,
27
+ ) => { namespace?: string; authenticatedPrincipal?: string };
28
+
29
+ function optStr(value: unknown): string | undefined {
30
+ return typeof value === "string" ? value : undefined;
31
+ }
32
+
33
+ function optInt(value: unknown): number | undefined {
34
+ if (value === undefined || value === null || value === "") return undefined;
35
+ const parsed = typeof value === "string" ? Number(value) : value;
36
+ if (typeof parsed !== "number" || !Number.isInteger(parsed)) {
37
+ throw new EngramAccessInputError("depth must be an integer");
38
+ }
39
+ return parsed;
40
+ }
41
+
42
+ async function respondBrowse(
43
+ req: IncomingMessage,
44
+ res: ServerResponse,
45
+ respondJson: RespondJson,
46
+ readJsonBody: ReadJsonBody,
47
+ service: EngramAccessService,
48
+ scopeFor: ScopeFor,
49
+ verb: BrowseVerb,
50
+ ): Promise<void> {
51
+ const body = (await readJsonBody(req)) as Record<string, unknown>;
52
+ const scope = scopeFor(optStr(body.namespace));
53
+ const depth = verb === "tree" ? optInt(body.depth) : undefined;
54
+ const result = await service.memoryStoreBrowse({
55
+ verb,
56
+ ...(optStr(body.path) !== undefined ? { path: optStr(body.path) } : {}),
57
+ ...(depth !== undefined ? { depth } : {}),
58
+ ...(verb === "find" && optStr(body.pattern) !== undefined ? { pattern: optStr(body.pattern) } : {}),
59
+ namespace: scope.namespace,
60
+ authenticatedPrincipal: scope.authenticatedPrincipal,
61
+ });
62
+ const { rendered: _rendered, ...payload } = result;
63
+ respondJson(res, 200, payload);
64
+ }
65
+
66
+ export async function maybeRespondMemoryBrowse(
67
+ req: IncomingMessage,
68
+ res: ServerResponse,
69
+ pathname: string,
70
+ method: string | undefined,
71
+ enforceTokenOp: (op: "memory_ls" | "memory_tree" | "memory_find") => void,
72
+ respondJson: RespondJson,
73
+ readJsonBody: ReadJsonBody,
74
+ service: EngramAccessService,
75
+ scopeFor: ScopeFor,
76
+ ): Promise<boolean> {
77
+ if (method === "POST" && (pathname === "/engram/v1/memory/ls" || pathname === "/remnic/v1/memory/ls")) {
78
+ enforceTokenOp("memory_ls");
79
+ await respondBrowse(req, res, respondJson, readJsonBody, service, scopeFor, "ls");
80
+ return true;
81
+ }
82
+ if (method === "POST" && (pathname === "/engram/v1/memory/tree" || pathname === "/remnic/v1/memory/tree")) {
83
+ enforceTokenOp("memory_tree");
84
+ await respondBrowse(req, res, respondJson, readJsonBody, service, scopeFor, "tree");
85
+ return true;
86
+ }
87
+ if (method === "POST" && (pathname === "/engram/v1/memory/find" || pathname === "/remnic/v1/memory/find")) {
88
+ enforceTokenOp("memory_find");
89
+ await respondBrowse(req, res, respondJson, readJsonBody, service, scopeFor, "find");
90
+ return true;
91
+ }
92
+ return false;
93
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Memory-store browse MCP tool definitions (issue #2978) — extracted from
3
+ * access-mcp.ts so the surface file stays at its structural ceiling (same
4
+ * seam as recall-navigation-mcp-tools.ts). Spread back into `this.tools`
5
+ * (`...MEMORY_BROWSE_MCP_TOOLS`); the migrated-operation mapping lives in
6
+ * access-mcp.ts's MCP_MIGRATED_OPERATIONS. The `remnic.` canonical alias
7
+ * is minted by withToolAliases at tools/list time.
8
+ *
9
+ * Always listed: browse is a pure read over the caller's resolved
10
+ * namespace, so there is no gating flag (unlike recallNavigation).
11
+ */
12
+
13
+ import type { McpTool } from "./access-mcp.js";
14
+
15
+ export const MEMORY_BROWSE_MCP_TOOLS: McpTool[] = [
16
+ {
17
+ name: "engram.memory_ls",
18
+ description:
19
+ "List what exists at one store path in your namespace: category directories with memory counts, memory files with a one-line description. Answers \"is there anything here at all?\" without a search query. Derived stores (artifacts/, meetings records, wearables, state/) are invisible by design.",
20
+ inputSchema: {
21
+ type: "object",
22
+ properties: {
23
+ path: { type: "string", description: "Store path to list, relative to the namespace root (\"\" or \"/\" = root). Default root." },
24
+ namespace: { type: "string", description: "Caller namespace to scope this operation to." },
25
+ },
26
+ additionalProperties: false,
27
+ },
28
+ },
29
+ {
30
+ name: "engram.memory_tree",
31
+ description:
32
+ "Depth-limited tree under one store path (depth 1 acts like ls). Deterministic sorted output, entry-capped so a large store cannot flood the response.",
33
+ inputSchema: {
34
+ type: "object",
35
+ properties: {
36
+ path: { type: "string", description: "Store path to expand, relative to the namespace root (default root)." },
37
+ depth: { type: "integer", minimum: 1, maximum: 4, description: "Expansion depth, 1-4. Default 1." },
38
+ namespace: { type: "string", description: "Caller namespace to scope this operation to." },
39
+ },
40
+ additionalProperties: false,
41
+ },
42
+ },
43
+ {
44
+ name: "engram.memory_find",
45
+ description:
46
+ "Deterministic name/path lookup over your namespace's store: `*` glob (e.g. \"facts/2026-08-*/*.md\") or substring. Use memory_search for semantic matching; use this when you know (part of) the name.",
47
+ inputSchema: {
48
+ type: "object",
49
+ properties: {
50
+ pattern: { type: "string", description: "Glob with `*` wildcards or substring to match against path and filename. Required." },
51
+ namespace: { type: "string", description: "Caller namespace to scope this operation to." },
52
+ },
53
+ required: ["pattern"],
54
+ additionalProperties: false,
55
+ },
56
+ },
57
+ ];
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Memory-store browse boundary operations (issue #2978).
3
+ *
4
+ * `memory_ls` / `memory_tree` / `memory_find` route MCP, HTTP, and CLI
5
+ * dispatch through the shared validation + error-mapping layer
6
+ * (access-boundary.ts) to the single `EngramAccessService.memoryStoreBrowse`
7
+ * implementation. Sibling module so access-operations-batch.ts stays at its
8
+ * ceiling seam (same layout as recall-navigation-operations.ts).
9
+ */
10
+
11
+ import { z } from "zod";
12
+
13
+ import { defineOperation } from "./access-boundary.js";
14
+ import { EngramAccessInputError } from "./access-errors.js";
15
+ import type { BrowseVerb, MemoryStoreBrowseRequest } from "./memory-browse.js";
16
+
17
+ function strictSchema<T extends z.ZodRawShape>(shape: T): z.ZodType<Record<string, unknown>> {
18
+ return z.preprocess(
19
+ (data) => {
20
+ if (data !== null && typeof data === "object" && !Array.isArray(data)) {
21
+ return Object.fromEntries(Object.entries(data as Record<string, unknown>).filter(([, value]) => value !== null));
22
+ }
23
+ return data;
24
+ },
25
+ z.object(shape).passthrough(),
26
+ ) as unknown as z.ZodType<Record<string, unknown>>;
27
+ }
28
+
29
+ function optStr(value: unknown): string | undefined {
30
+ return typeof value === "string" ? value : undefined;
31
+ }
32
+
33
+ function optInt(value: unknown): number | undefined {
34
+ if (typeof value === "number") return value;
35
+ if (typeof value === "string" && Number.isFinite(Number(value))) return Number(value);
36
+ return undefined;
37
+ }
38
+
39
+ function reqStr(value: unknown, field: string): string {
40
+ if (typeof value !== "string" || value.trim().length === 0) {
41
+ throw new EngramAccessInputError(`${field} is required`);
42
+ }
43
+ return value;
44
+ }
45
+
46
+ const verbShape = {
47
+ namespace: z.string().optional(),
48
+ } as const;
49
+
50
+ function browseRequest(verb: BrowseVerb, input: Record<string, unknown>): MemoryStoreBrowseRequest {
51
+ return {
52
+ verb,
53
+ ...(optStr(input.path) !== undefined ? { path: optStr(input.path) } : {}),
54
+ ...(optInt(input.depth) !== undefined ? { depth: optInt(input.depth) } : {}),
55
+ ...(optStr(input.pattern) !== undefined ? { pattern: optStr(input.pattern) } : {}),
56
+ namespace: optStr(input.namespace),
57
+ };
58
+ }
59
+
60
+ defineOperation({
61
+ name: "memory_ls",
62
+ description: "List the children of one store path in the caller's namespace: category dirs with counts, memory files with a one-line description.",
63
+ schema: strictSchema({ ...verbShape, path: z.string().optional() }),
64
+ handler: async (input, ctx) => ({
65
+ result: await ctx.service.memoryStoreBrowse({ ...browseRequest("ls", input), authenticatedPrincipal: ctx.authenticatedPrincipal }),
66
+ }),
67
+ });
68
+
69
+ defineOperation({
70
+ name: "memory_tree",
71
+ description: "Depth-limited tree of store paths under one directory, one-line descriptions, entry-capped.",
72
+ schema: strictSchema({ ...verbShape, path: z.string().optional(), depth: z.union([z.number(), z.string()]).optional() }),
73
+ handler: async (input, ctx) => ({
74
+ result: await ctx.service.memoryStoreBrowse({ ...browseRequest("tree", input), authenticatedPrincipal: ctx.authenticatedPrincipal }),
75
+ }),
76
+ });
77
+
78
+ defineOperation({
79
+ name: "memory_find",
80
+ description: "Deterministic name/path match (`*` glob or substring) over the caller's namespace store; semantic search stays memory_search.",
81
+ schema: strictSchema({ ...verbShape, pattern: z.string() }),
82
+ handler: async (input, ctx) => ({
83
+ result: await ctx.service.memoryStoreBrowse({
84
+ ...browseRequest("find", { ...input, pattern: reqStr(input.pattern, "pattern") }),
85
+ authenticatedPrincipal: ctx.authenticatedPrincipal,
86
+ }),
87
+ }),
88
+ });