@remnic/core 1.1.0 → 1.1.2

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 (308) hide show
  1. package/dist/access-audit.d.ts +56 -0
  2. package/dist/access-audit.js +9 -0
  3. package/dist/access-cli.js +70 -53
  4. package/dist/access-cli.js.map +1 -1
  5. package/dist/access-http.d.ts +16 -9
  6. package/dist/access-http.js +26 -18
  7. package/dist/access-mcp.d.ts +16 -9
  8. package/dist/access-mcp.js +30 -8
  9. package/dist/access-schema.d.ts +124 -33
  10. package/dist/access-schema.js +5 -1
  11. package/dist/{access-service-HmO1Trrx.d.ts → access-service-Br8ZydTK.d.ts} +158 -63
  12. package/dist/access-service.d.ts +13 -6
  13. package/dist/access-service.js +23 -14
  14. package/dist/bootstrap.d.ts +6 -3
  15. package/dist/briefing.d.ts +1 -0
  16. package/dist/briefing.js +8 -6
  17. package/dist/buffer-surprise-report.d.ts +70 -0
  18. package/dist/buffer-surprise-report.js +7 -0
  19. package/dist/buffer-surprise-report.js.map +1 -0
  20. package/dist/buffer-surprise.d.ts +98 -0
  21. package/dist/buffer-surprise.js +11 -0
  22. package/dist/buffer-surprise.js.map +1 -0
  23. package/dist/buffer.d.ts +100 -2
  24. package/dist/buffer.js +1 -1
  25. package/dist/calibration.js +6 -6
  26. package/dist/causal-behavior.js +4 -4
  27. package/dist/causal-chain.js +2 -2
  28. package/dist/causal-consolidation.js +19 -18
  29. package/dist/causal-consolidation.js.map +1 -1
  30. package/dist/causal-retrieval.js +4 -4
  31. package/dist/causal-trajectory.js +1 -1
  32. package/dist/{chunk-QNJMBKFK.js → chunk-2LGMW3DJ.js} +3 -2
  33. package/dist/chunk-2LGMW3DJ.js.map +1 -0
  34. package/dist/{chunk-QDYXG4CS.js → chunk-3FPTCC3Z.js} +4 -3
  35. package/dist/chunk-3FPTCC3Z.js.map +1 -0
  36. package/dist/chunk-3GPTTA4J.js +57 -0
  37. package/dist/chunk-3GPTTA4J.js.map +1 -0
  38. package/dist/{chunk-ITRLGI2T.js → chunk-3OGMS3PE.js} +2 -2
  39. package/dist/{chunk-DEPL3635.js → chunk-3YGHKTBF.js} +1446 -196
  40. package/dist/chunk-3YGHKTBF.js.map +1 -0
  41. package/dist/{chunk-BLKTA7MM.js → chunk-4HQS2HPX.js} +54 -21
  42. package/dist/chunk-4HQS2HPX.js.map +1 -0
  43. package/dist/chunk-54V4BZWP.js +139 -0
  44. package/dist/chunk-54V4BZWP.js.map +1 -0
  45. package/dist/chunk-5JRF2PZA.js +67 -0
  46. package/dist/chunk-5JRF2PZA.js.map +1 -0
  47. package/dist/chunk-64NJRYU2.js +332 -0
  48. package/dist/chunk-64NJRYU2.js.map +1 -0
  49. package/dist/{chunk-OIT5QGG4.js → chunk-6AUUAZEX.js} +72 -2
  50. package/dist/chunk-6AUUAZEX.js.map +1 -0
  51. package/dist/{chunk-3QHL5ABG.js → chunk-6YJHX2DL.js} +191 -10
  52. package/dist/chunk-6YJHX2DL.js.map +1 -0
  53. package/dist/chunk-AJU4PJGY.js +126 -0
  54. package/dist/chunk-AJU4PJGY.js.map +1 -0
  55. package/dist/chunk-ASAITVLA.js +64 -0
  56. package/dist/chunk-ASAITVLA.js.map +1 -0
  57. package/dist/{chunk-44ICJRF3.js → chunk-AYXIPSZO.js} +5 -5
  58. package/dist/{chunk-MBJHSA7F.js → chunk-BECYBZLX.js} +265 -20
  59. package/dist/chunk-BECYBZLX.js.map +1 -0
  60. package/dist/chunk-C4SQJZAF.js +486 -0
  61. package/dist/chunk-C4SQJZAF.js.map +1 -0
  62. package/dist/{chunk-6UJ47TVX.js → chunk-CUPFXL3J.js} +2 -2
  63. package/dist/chunk-DF3RVK3X.js +119 -0
  64. package/dist/chunk-DF3RVK3X.js.map +1 -0
  65. package/dist/{chunk-N42IWANG.js → chunk-DG6YMRDC.js} +3 -3
  66. package/dist/chunk-DGVM5SFL.js +69 -0
  67. package/dist/chunk-DGVM5SFL.js.map +1 -0
  68. package/dist/{chunk-3SV6CQHO.js → chunk-DIXB44VE.js} +102 -66
  69. package/dist/chunk-DIXB44VE.js.map +1 -0
  70. package/dist/chunk-EIR5VLIH.js +90 -0
  71. package/dist/chunk-EIR5VLIH.js.map +1 -0
  72. package/dist/{chunk-GV6NLQ4X.js → chunk-F5VP6YCB.js} +374 -16
  73. package/dist/chunk-F5VP6YCB.js.map +1 -0
  74. package/dist/{chunk-6ZH4TU6I.js → chunk-FAAFWE4G.js} +2 -1
  75. package/dist/chunk-FAAFWE4G.js.map +1 -0
  76. package/dist/{chunk-7WQ6SLIE.js → chunk-FVA6TGI3.js} +2 -2
  77. package/dist/{chunk-PAORGQRI.js → chunk-GA5P7RST.js} +37 -23
  78. package/dist/chunk-GA5P7RST.js.map +1 -0
  79. package/dist/chunk-GDFS42HT.js +206 -0
  80. package/dist/chunk-GDFS42HT.js.map +1 -0
  81. package/dist/chunk-IISBCCWR.js +52 -0
  82. package/dist/chunk-IISBCCWR.js.map +1 -0
  83. package/dist/chunk-JBMSGZEQ.js +441 -0
  84. package/dist/chunk-JBMSGZEQ.js.map +1 -0
  85. package/dist/{chunk-J4IYOZZ5.js → chunk-JXS5PDQ7.js} +3 -1
  86. package/dist/chunk-JXS5PDQ7.js.map +1 -0
  87. package/dist/chunk-KVBLZUKV.js +173 -0
  88. package/dist/chunk-KVBLZUKV.js.map +1 -0
  89. package/dist/{chunk-4LACOVZX.js → chunk-L7IXWRYE.js} +10 -5
  90. package/dist/chunk-L7IXWRYE.js.map +1 -0
  91. package/dist/chunk-LBLXEFWK.js +51 -0
  92. package/dist/chunk-LBLXEFWK.js.map +1 -0
  93. package/dist/{chunk-WBSAYXVI.js → chunk-LOIMBRDE.js} +201 -45
  94. package/dist/chunk-LOIMBRDE.js.map +1 -0
  95. package/dist/{chunk-3WHVNEN7.js → chunk-LTCGGW2D.js} +1 -1
  96. package/dist/chunk-LTCGGW2D.js.map +1 -0
  97. package/dist/{chunk-ZVBB3T7V.js → chunk-NBVAS5MT.js} +25 -23
  98. package/dist/chunk-NBVAS5MT.js.map +1 -0
  99. package/dist/{chunk-UEYA6UC7.js → chunk-NZLQTHS5.js} +25 -2
  100. package/dist/chunk-NZLQTHS5.js.map +1 -0
  101. package/dist/{chunk-NQEVYWX6.js → chunk-OC5OXUQ4.js} +211 -7
  102. package/dist/chunk-OC5OXUQ4.js.map +1 -0
  103. package/dist/{chunk-LK6SGL53.js → chunk-OR64ZGRZ.js} +3 -2
  104. package/dist/chunk-OR64ZGRZ.js.map +1 -0
  105. package/dist/{chunk-SYUK3VLY.js → chunk-PVICZTKG.js} +117 -5
  106. package/dist/chunk-PVICZTKG.js.map +1 -0
  107. package/dist/chunk-PVPWZSSI.js +37 -0
  108. package/dist/chunk-PVPWZSSI.js.map +1 -0
  109. package/dist/{chunk-JL2PU6AI.js → chunk-R2XRID2N.js} +2 -2
  110. package/dist/{chunk-4NRAJUDS.js → chunk-RBBWYEFJ.js} +1 -1
  111. package/dist/chunk-RFYAYKTD.js +146 -0
  112. package/dist/chunk-RFYAYKTD.js.map +1 -0
  113. package/dist/chunk-SOBJ6NEY.js +18 -0
  114. package/dist/chunk-SOBJ6NEY.js.map +1 -0
  115. package/dist/{chunk-JIU55F3X.js → chunk-SPI27QT6.js} +2 -2
  116. package/dist/{chunk-MVTHXUBX.js → chunk-STGWEHYR.js} +479 -20
  117. package/dist/chunk-STGWEHYR.js.map +1 -0
  118. package/dist/{chunk-6LX5ORAS.js → chunk-TMYO7B5P.js} +4 -4
  119. package/dist/chunk-TVVEYCNW.js +65 -0
  120. package/dist/chunk-TVVEYCNW.js.map +1 -0
  121. package/dist/chunk-ULYOGL6R.js +322 -0
  122. package/dist/chunk-ULYOGL6R.js.map +1 -0
  123. package/dist/{chunk-37UIFYWO.js → chunk-UWB5LMWY.js} +108 -9
  124. package/dist/chunk-UWB5LMWY.js.map +1 -0
  125. package/dist/{chunk-47UU5PU2.js → chunk-VBVG2M5G.js} +18 -3
  126. package/dist/chunk-VBVG2M5G.js.map +1 -0
  127. package/dist/{chunk-7ECD5ATE.js → chunk-VDX363PS.js} +2 -2
  128. package/dist/{chunk-O5ETUNBT.js → chunk-VTU2B4VF.js} +7 -3
  129. package/dist/chunk-VTU2B4VF.js.map +1 -0
  130. package/dist/{chunk-MTLYEMJB.js → chunk-WCLICCGB.js} +18 -3
  131. package/dist/chunk-WCLICCGB.js.map +1 -0
  132. package/dist/chunk-X6GF3FX2.js +26 -0
  133. package/dist/chunk-X6GF3FX2.js.map +1 -0
  134. package/dist/{chunk-3QFQGRHO.js → chunk-XMHBH5H6.js} +4 -4
  135. package/dist/{chunk-DHHP2Z4X.js → chunk-XXVWLXSG.js} +2 -2
  136. package/dist/{chunk-XZ2TIKGC.js → chunk-Y7R2XJ5Q.js} +25 -9
  137. package/dist/chunk-Y7R2XJ5Q.js.map +1 -0
  138. package/dist/{chunk-ALXMCZEU.js → chunk-Z2E7VW55.js} +6 -3
  139. package/dist/chunk-Z2E7VW55.js.map +1 -0
  140. package/dist/chunk-ZAIM4TUE.js +488 -0
  141. package/dist/chunk-ZAIM4TUE.js.map +1 -0
  142. package/dist/chunk-ZZTOURJI.js +91 -0
  143. package/dist/chunk-ZZTOURJI.js.map +1 -0
  144. package/dist/{cli-BneVIEvh.d.ts → cli-BkeRaYfk.d.ts} +2 -2
  145. package/dist/cli.d.ts +13 -6
  146. package/dist/cli.js +42 -31
  147. package/dist/config.js +2 -2
  148. package/dist/consolidation-operator.d.ts +41 -0
  149. package/dist/consolidation-operator.js +11 -0
  150. package/dist/consolidation-operator.js.map +1 -0
  151. package/dist/consolidation-provenance-check.d.ts +68 -0
  152. package/dist/consolidation-provenance-check.js +9 -0
  153. package/dist/consolidation-provenance-check.js.map +1 -0
  154. package/dist/consolidation-undo.d.ts +123 -0
  155. package/dist/consolidation-undo.js +426 -0
  156. package/dist/consolidation-undo.js.map +1 -0
  157. package/dist/{contradiction-scan-GR33PONM.js → contradiction-scan-E3GJTI4F.js} +43 -7
  158. package/dist/contradiction-scan-E3GJTI4F.js.map +1 -0
  159. package/dist/cross-namespace-budget.d.ts +133 -0
  160. package/dist/cross-namespace-budget.js +9 -0
  161. package/dist/cross-namespace-budget.js.map +1 -0
  162. package/dist/direct-answer-wiring.js +5 -70
  163. package/dist/direct-answer-wiring.js.map +1 -1
  164. package/dist/embedding-fallback.js +2 -1
  165. package/dist/{engine-5TIQBYZR.js → engine-72LSIWQP.js} +8 -7
  166. package/dist/engine-72LSIWQP.js.map +1 -0
  167. package/dist/entity-retrieval.d.ts +1 -0
  168. package/dist/entity-retrieval.js +7 -6
  169. package/dist/explicit-capture.d.ts +6 -3
  170. package/dist/explicit-capture.js +2 -2
  171. package/dist/extraction-judge-telemetry.d.ts +113 -0
  172. package/dist/extraction-judge-telemetry.js +14 -0
  173. package/dist/extraction-judge-telemetry.js.map +1 -0
  174. package/dist/extraction-judge-training.d.ts +85 -0
  175. package/dist/extraction-judge-training.js +16 -0
  176. package/dist/extraction-judge-training.js.map +1 -0
  177. package/dist/extraction-judge.d.ts +124 -2
  178. package/dist/extraction-judge.js +11 -1
  179. package/dist/extraction.js +10 -9
  180. package/dist/fallback-llm.js +3 -3
  181. package/dist/graph-recall.d.ts +100 -0
  182. package/dist/graph-recall.js +8 -0
  183. package/dist/graph-recall.js.map +1 -0
  184. package/dist/graph-retrieval.d.ts +271 -0
  185. package/dist/graph-retrieval.js +21 -0
  186. package/dist/graph-retrieval.js.map +1 -0
  187. package/dist/importance.js +1 -1
  188. package/dist/index.d.ts +585 -20
  189. package/dist/index.js +542 -344
  190. package/dist/index.js.map +1 -1
  191. package/dist/local-llm.js +2 -2
  192. package/dist/memory-worth-bench.d.ts +51 -0
  193. package/dist/memory-worth-bench.js +131 -0
  194. package/dist/memory-worth-bench.js.map +1 -0
  195. package/dist/memory-worth-filter.d.ts +128 -0
  196. package/dist/memory-worth-filter.js +10 -0
  197. package/dist/memory-worth-filter.js.map +1 -0
  198. package/dist/memory-worth-outcomes.d.ts +118 -0
  199. package/dist/memory-worth-outcomes.js +9 -0
  200. package/dist/memory-worth-outcomes.js.map +1 -0
  201. package/dist/memory-worth.d.ts +102 -0
  202. package/dist/memory-worth.js +7 -0
  203. package/dist/memory-worth.js.map +1 -0
  204. package/dist/operator-toolkit.d.ts +40 -1
  205. package/dist/operator-toolkit.js +25 -16
  206. package/dist/{orchestrator-DRYA6_lW.d.ts → orchestrator-CmJ-NTdJ.d.ts} +233 -8
  207. package/dist/orchestrator.d.ts +6 -3
  208. package/dist/orchestrator.js +54 -44
  209. package/dist/page-versioning.d.ts +12 -1
  210. package/dist/page-versioning.js +5 -3
  211. package/dist/{port-C1GZFv8h.d.ts → port-BADbLZU5.d.ts} +2 -2
  212. package/dist/qmd-recall-cache.d.ts +1 -1
  213. package/dist/qmd.d.ts +5 -3
  214. package/dist/qmd.js +3 -3
  215. package/dist/reasoning-trace-recall.d.ts +90 -0
  216. package/dist/reasoning-trace-recall.js +13 -0
  217. package/dist/reasoning-trace-recall.js.map +1 -0
  218. package/dist/reasoning-trace-types.d.ts +54 -0
  219. package/dist/reasoning-trace-types.js +17 -0
  220. package/dist/reasoning-trace-types.js.map +1 -0
  221. package/dist/recall-audit-anomaly.d.ts +112 -0
  222. package/dist/recall-audit-anomaly.js +11 -0
  223. package/dist/recall-audit-anomaly.js.map +1 -0
  224. package/dist/recall-audit.js +5 -44
  225. package/dist/recall-audit.js.map +1 -1
  226. package/dist/recall-explain-renderer.d.ts +49 -0
  227. package/dist/recall-explain-renderer.js +18 -0
  228. package/dist/recall-explain-renderer.js.map +1 -0
  229. package/dist/recall-state.d.ts +12 -1
  230. package/dist/recall-state.js +1 -1
  231. package/dist/recall-xray-cli.d.ts +40 -0
  232. package/dist/recall-xray-cli.js +11 -0
  233. package/dist/recall-xray-cli.js.map +1 -0
  234. package/dist/recall-xray-renderer.d.ts +44 -0
  235. package/dist/recall-xray-renderer.js +18 -0
  236. package/dist/recall-xray-renderer.js.map +1 -0
  237. package/dist/recall-xray.d.ts +179 -0
  238. package/dist/recall-xray.js +13 -0
  239. package/dist/recall-xray.js.map +1 -0
  240. package/dist/resolve-provider-secret.d.ts +5 -1
  241. package/dist/resolve-provider-secret.js +3 -1
  242. package/dist/resume-bundles.js +6 -6
  243. package/dist/retrieval-agents.d.ts +1 -1
  244. package/dist/retrieval-tiers.d.ts +17 -0
  245. package/dist/retrieval-tiers.js +9 -0
  246. package/dist/retrieval-tiers.js.map +1 -0
  247. package/dist/schemas.d.ts +309 -53
  248. package/dist/schemas.js +1 -1
  249. package/dist/{semantic-consolidation-DrvSYRdB.d.ts → semantic-consolidation-CxJU6MJk.d.ts} +62 -1
  250. package/dist/semantic-consolidation.d.ts +2 -1
  251. package/dist/semantic-consolidation.js +22 -7
  252. package/dist/semantic-rule-promotion.js +7 -6
  253. package/dist/semantic-rule-verifier.js +7 -6
  254. package/dist/storage.d.ts +82 -1
  255. package/dist/storage.js +6 -5
  256. package/dist/summarizer.js +6 -6
  257. package/dist/temporal-supersession.d.ts +1 -0
  258. package/dist/tier-migration.d.ts +2 -1
  259. package/dist/tokens.js +2 -1
  260. package/dist/types.d.ts +276 -2
  261. package/dist/types.js +1 -1
  262. package/dist/verified-recall.js +7 -6
  263. package/package.json +1 -1
  264. package/dist/chunk-37UIFYWO.js.map +0 -1
  265. package/dist/chunk-3QHL5ABG.js.map +0 -1
  266. package/dist/chunk-3SV6CQHO.js.map +0 -1
  267. package/dist/chunk-3WHVNEN7.js.map +0 -1
  268. package/dist/chunk-47UU5PU2.js.map +0 -1
  269. package/dist/chunk-4LACOVZX.js.map +0 -1
  270. package/dist/chunk-6ZH4TU6I.js.map +0 -1
  271. package/dist/chunk-ALXMCZEU.js.map +0 -1
  272. package/dist/chunk-BLKTA7MM.js.map +0 -1
  273. package/dist/chunk-DEPL3635.js.map +0 -1
  274. package/dist/chunk-GV6NLQ4X.js.map +0 -1
  275. package/dist/chunk-J4IYOZZ5.js.map +0 -1
  276. package/dist/chunk-LAYN4LDC.js +0 -267
  277. package/dist/chunk-LAYN4LDC.js.map +0 -1
  278. package/dist/chunk-LK6SGL53.js.map +0 -1
  279. package/dist/chunk-MBJHSA7F.js.map +0 -1
  280. package/dist/chunk-MTLYEMJB.js.map +0 -1
  281. package/dist/chunk-MVTHXUBX.js.map +0 -1
  282. package/dist/chunk-NQEVYWX6.js.map +0 -1
  283. package/dist/chunk-O5ETUNBT.js.map +0 -1
  284. package/dist/chunk-OIT5QGG4.js.map +0 -1
  285. package/dist/chunk-PAORGQRI.js.map +0 -1
  286. package/dist/chunk-QDYXG4CS.js.map +0 -1
  287. package/dist/chunk-QNJMBKFK.js.map +0 -1
  288. package/dist/chunk-SYUK3VLY.js.map +0 -1
  289. package/dist/chunk-UEYA6UC7.js.map +0 -1
  290. package/dist/chunk-UVJFDP7P.js +0 -202
  291. package/dist/chunk-UVJFDP7P.js.map +0 -1
  292. package/dist/chunk-WBSAYXVI.js.map +0 -1
  293. package/dist/chunk-XZ2TIKGC.js.map +0 -1
  294. package/dist/chunk-ZVBB3T7V.js.map +0 -1
  295. package/dist/contradiction-scan-GR33PONM.js.map +0 -1
  296. /package/dist/{engine-5TIQBYZR.js.map → access-audit.js.map} +0 -0
  297. /package/dist/{chunk-ITRLGI2T.js.map → chunk-3OGMS3PE.js.map} +0 -0
  298. /package/dist/{chunk-44ICJRF3.js.map → chunk-AYXIPSZO.js.map} +0 -0
  299. /package/dist/{chunk-6UJ47TVX.js.map → chunk-CUPFXL3J.js.map} +0 -0
  300. /package/dist/{chunk-N42IWANG.js.map → chunk-DG6YMRDC.js.map} +0 -0
  301. /package/dist/{chunk-7WQ6SLIE.js.map → chunk-FVA6TGI3.js.map} +0 -0
  302. /package/dist/{chunk-JL2PU6AI.js.map → chunk-R2XRID2N.js.map} +0 -0
  303. /package/dist/{chunk-4NRAJUDS.js.map → chunk-RBBWYEFJ.js.map} +0 -0
  304. /package/dist/{chunk-JIU55F3X.js.map → chunk-SPI27QT6.js.map} +0 -0
  305. /package/dist/{chunk-6LX5ORAS.js.map → chunk-TMYO7B5P.js.map} +0 -0
  306. /package/dist/{chunk-7ECD5ATE.js.map → chunk-VDX363PS.js.map} +0 -0
  307. /package/dist/{chunk-3QFQGRHO.js.map → chunk-XMHBH5H6.js.map} +0 -0
  308. /package/dist/{chunk-DHHP2Z4X.js.map → chunk-XXVWLXSG.js.map} +0 -0
@@ -1,11 +1,14 @@
1
1
  import {
2
2
  promoteSemanticRuleFromMemory
3
- } from "./chunk-7ECD5ATE.js";
3
+ } from "./chunk-VDX363PS.js";
4
4
  import {
5
5
  buildResumeBundleFromState,
6
6
  getResumeBundleStatus,
7
7
  recordResumeBundle
8
- } from "./chunk-6LX5ORAS.js";
8
+ } from "./chunk-TMYO7B5P.js";
9
+ import {
10
+ parseXrayCliOptions
11
+ } from "./chunk-PVPWZSSI.js";
9
12
  import {
10
13
  listNamespaces,
11
14
  runBenchmarkRecall,
@@ -16,7 +19,7 @@ import {
16
19
  runOperatorRepair,
17
20
  runOperatorSetup,
18
21
  verifyNamespaces
19
- } from "./chunk-3QHL5ABG.js";
22
+ } from "./chunk-6YJHX2DL.js";
20
23
  import {
21
24
  compareVersions
22
25
  } from "./chunk-HL4DB7TO.js";
@@ -25,16 +28,14 @@ import {
25
28
  } from "./chunk-ZPKBYX2F.js";
26
29
  import {
27
30
  RoutingRulesStore,
31
+ expandTildePath,
28
32
  isReplayRole,
29
33
  isReplaySource,
30
34
  normalizeReplaySessionKey,
31
35
  parseIsoOffsetTimestamp,
32
36
  parseIsoTimestamp,
33
37
  validateReplayTurn
34
- } from "./chunk-PAORGQRI.js";
35
- import {
36
- searchVerifiedEpisodes
37
- } from "./chunk-6UJ47TVX.js";
38
+ } from "./chunk-GA5P7RST.js";
38
39
  import {
39
40
  getUtilityLearningStatus,
40
41
  learnUtilityPromotionWeights
@@ -43,12 +44,15 @@ import {
43
44
  getUtilityTelemetryStatus,
44
45
  recordUtilityTelemetryEvent
45
46
  } from "./chunk-3QKK7QOS.js";
47
+ import {
48
+ searchVerifiedEpisodes
49
+ } from "./chunk-CUPFXL3J.js";
46
50
  import {
47
51
  ThreadingManager
48
52
  } from "./chunk-JRNQ3RNA.js";
49
53
  import {
50
54
  searchVerifiedSemanticRules
51
- } from "./chunk-JIU55F3X.js";
55
+ } from "./chunk-SPI27QT6.js";
52
56
  import {
53
57
  getWorkProductLedgerStatus,
54
58
  recordWorkProductLedgerEntry,
@@ -75,10 +79,10 @@ import {
75
79
  } from "./chunk-HMDCOMYU.js";
76
80
  import {
77
81
  rescoreMemoryImportance
78
- } from "./chunk-J4IYOZZ5.js";
82
+ } from "./chunk-JXS5PDQ7.js";
79
83
  import {
80
84
  launchProcess
81
- } from "./chunk-LK6SGL53.js";
85
+ } from "./chunk-OR64ZGRZ.js";
82
86
  import {
83
87
  loadPersistedNativeKnowledgeChunks
84
88
  } from "./chunk-7SEAZFFB.js";
@@ -91,21 +95,21 @@ import {
91
95
  runEvalStoredBaselineCiGate,
92
96
  validateEvalBenchmarkPack
93
97
  } from "./chunk-K6WK37A6.js";
94
- import {
95
- applyCommitmentLedgerLifecycle,
96
- getCommitmentLedgerStatus,
97
- recordCommitmentLedgerEntry,
98
- transitionCommitmentLedgerEntryState
99
- } from "./chunk-FYIYMQ5N.js";
100
98
  import {
101
99
  parseConfig
102
- } from "./chunk-MBJHSA7F.js";
100
+ } from "./chunk-BECYBZLX.js";
103
101
  import {
104
102
  getCueAnchorStoreStatus
105
103
  } from "./chunk-C6QPK5GG.js";
106
104
  import {
107
105
  analyzeGraphHealth
108
106
  } from "./chunk-C2EFFULQ.js";
107
+ import {
108
+ applyCommitmentLedgerLifecycle,
109
+ getCommitmentLedgerStatus,
110
+ recordCommitmentLedgerEntry,
111
+ transitionCommitmentLedgerEntryState
112
+ } from "./chunk-FYIYMQ5N.js";
109
113
  import {
110
114
  chunkContent
111
115
  } from "./chunk-4WMCPJWX.js";
@@ -114,23 +118,25 @@ import {
114
118
  } from "./chunk-NGAVDO7E.js";
115
119
  import {
116
120
  EngramAccessHttpServer
117
- } from "./chunk-37UIFYWO.js";
121
+ } from "./chunk-UWB5LMWY.js";
118
122
  import {
119
123
  EngramMcpServer
120
- } from "./chunk-NQEVYWX6.js";
121
- import {
122
- resolveHomeDir
123
- } from "./chunk-MARWOCVP.js";
124
+ } from "./chunk-OC5OXUQ4.js";
124
125
  import {
125
126
  EngramAccessService,
126
127
  WorkStorage
127
- } from "./chunk-MVTHXUBX.js";
128
+ } from "./chunk-STGWEHYR.js";
129
+ import {
130
+ parseRecallExplainFormat,
131
+ renderRecallExplain,
132
+ renderXray
133
+ } from "./chunk-ZAIM4TUE.js";
128
134
  import {
129
135
  listMemoryGovernanceRuns,
130
136
  readMemoryGovernanceRunArtifact,
131
137
  restoreMemoryGovernanceRun,
132
138
  runMemoryGovernance
133
- } from "./chunk-ITRLGI2T.js";
139
+ } from "./chunk-3OGMS3PE.js";
134
140
  import {
135
141
  getTrustZoneStoreStatus,
136
142
  promoteTrustZoneRecord,
@@ -139,13 +145,20 @@ import {
139
145
  import {
140
146
  selectRouteRule,
141
147
  validateRouteTarget
142
- } from "./chunk-QNJMBKFK.js";
148
+ } from "./chunk-2LGMW3DJ.js";
143
149
  import {
144
150
  getCausalTrajectoryStoreStatus
145
- } from "./chunk-4NRAJUDS.js";
151
+ } from "./chunk-RBBWYEFJ.js";
146
152
  import {
147
153
  StorageManager
148
- } from "./chunk-GV6NLQ4X.js";
154
+ } from "./chunk-F5VP6YCB.js";
155
+ import {
156
+ MEMORY_LIFECYCLE_EVENT_SORT_ORDER,
157
+ buildLifecycleEventsForMemory,
158
+ inferMemoryStatus,
159
+ sortMemoryLifecycleEvents,
160
+ toMemoryPathRel
161
+ } from "./chunk-TP4FZJIZ.js";
149
162
  import {
150
163
  normalizeProjectionPreview,
151
164
  normalizeProjectionTags
@@ -163,12 +176,8 @@ import {
163
176
  readProjectedNativeKnowledgeChunks
164
177
  } from "./chunk-BOUYNNYD.js";
165
178
  import {
166
- MEMORY_LIFECYCLE_EVENT_SORT_ORDER,
167
- buildLifecycleEventsForMemory,
168
- inferMemoryStatus,
169
- sortMemoryLifecycleEvents,
170
- toMemoryPathRel
171
- } from "./chunk-TP4FZJIZ.js";
179
+ resolveHomeDir
180
+ } from "./chunk-MARWOCVP.js";
172
181
 
173
182
  // src/cli.ts
174
183
  import path19 from "path";
@@ -3785,13 +3794,6 @@ function isWorkTaskPriority(value) {
3785
3794
  function isWorkProjectStatus(value) {
3786
3795
  return value === "active" || value === "on_hold" || value === "completed" || value === "archived";
3787
3796
  }
3788
- function expandTildePath(p) {
3789
- if (p === "~") return resolveHomeDir();
3790
- if (p.startsWith("~/") || p.startsWith("~\\")) {
3791
- return path19.join(resolveHomeDir(), p.slice(2));
3792
- }
3793
- return p;
3794
- }
3795
3797
  async function runTrainingExportCliCommand(opts) {
3796
3798
  const expandedMemoryDir = expandTildePath(opts.memoryDir);
3797
3799
  const expandedOutput = expandTildePath(opts.output);
@@ -4121,7 +4123,7 @@ async function runSemanticRulePromoteCliCommand(options) {
4121
4123
  });
4122
4124
  }
4123
4125
  async function runCompoundingPromoteCliCommand(options) {
4124
- const { CompoundingEngine } = await import("./engine-5TIQBYZR.js");
4126
+ const { CompoundingEngine } = await import("./engine-72LSIWQP.js");
4125
4127
  const config = parseConfig({
4126
4128
  memoryDir: options.memoryDir,
4127
4129
  qmdEnabled: false,
@@ -5531,6 +5533,68 @@ function registerCli(api, orchestrator) {
5531
5533
  }
5532
5534
  }
5533
5535
  });
5536
+ cmd.command("judge-stats").description(
5537
+ "Show extraction-judge verdict stats from the observation ledger"
5538
+ ).option("--since <iso>", "Start timestamp (inclusive, ISO-8601)").option("--until <iso>", "End timestamp (exclusive, ISO-8601)").option("--json", "Emit machine-readable JSON only").action(async (...args) => {
5539
+ const options = args[0] ?? {};
5540
+ const sinceRaw = typeof options.since === "string" ? options.since : void 0;
5541
+ const untilRaw = typeof options.until === "string" ? options.until : void 0;
5542
+ const sinceMs = sinceRaw ? Date.parse(sinceRaw) : void 0;
5543
+ const untilMs = untilRaw ? Date.parse(untilRaw) : void 0;
5544
+ if (sinceRaw && !Number.isFinite(sinceMs)) {
5545
+ throw new Error(
5546
+ `Invalid --since value: ${sinceRaw}. Use ISO-8601, e.g. 2026-04-01T00:00:00Z`
5547
+ );
5548
+ }
5549
+ if (untilRaw && !Number.isFinite(untilMs)) {
5550
+ throw new Error(
5551
+ `Invalid --until value: ${untilRaw}. Use ISO-8601, e.g. 2026-04-15T00:00:00Z`
5552
+ );
5553
+ }
5554
+ const { readJudgeVerdictStats } = await import("./extraction-judge-telemetry.js");
5555
+ const stats = await readJudgeVerdictStats(
5556
+ orchestrator.config.memoryDir,
5557
+ {
5558
+ ...typeof sinceMs === "number" && Number.isFinite(sinceMs) ? { sinceMs } : {},
5559
+ ...typeof untilMs === "number" && Number.isFinite(untilMs) ? { untilMs } : {}
5560
+ }
5561
+ );
5562
+ if (options.json === true) {
5563
+ console.log(JSON.stringify(stats, null, 2));
5564
+ return;
5565
+ }
5566
+ console.log("=== Extraction Judge Verdict Stats ===\n");
5567
+ console.log(`Total verdicts: ${stats.total}`);
5568
+ if (stats.total === 0) {
5569
+ if (!orchestrator.config.extractionJudgeTelemetryEnabled) {
5570
+ console.log(
5571
+ "\nNote: extractionJudgeTelemetryEnabled is OFF. Enable it in plugin config to collect verdict telemetry."
5572
+ );
5573
+ }
5574
+ return;
5575
+ }
5576
+ console.log(
5577
+ ` accept: ${stats.accept} (${(stats.accept / stats.total * 100).toFixed(1)}%)`
5578
+ );
5579
+ console.log(
5580
+ ` reject: ${stats.reject} (${(stats.reject / stats.total * 100).toFixed(1)}%)`
5581
+ );
5582
+ console.log(
5583
+ ` defer: ${stats.defer} (${(stats.deferRate * 100).toFixed(1)}%)`
5584
+ );
5585
+ if (stats.deferCapTriggered > 0) {
5586
+ console.log(
5587
+ ` of which ${stats.deferCapTriggered} cap-rejected (defer \u2192 reject)`
5588
+ );
5589
+ }
5590
+ console.log(` mean elapsed: ${stats.meanElapsedMs.toFixed(1)} ms`);
5591
+ if (stats.firstTs && stats.lastTs) {
5592
+ console.log(` window: ${stats.firstTs} \u2026 ${stats.lastTs}`);
5593
+ }
5594
+ if (stats.malformed > 0) {
5595
+ console.log(` malformed rows skipped: ${stats.malformed}`);
5596
+ }
5597
+ });
5534
5598
  cmd.command("setup").description("Validate config, scaffold directories, and print first-run next steps").option("--install-capture-instructions", "Create workspace MEMORY.md when explicit capture is enabled and missing").option("--preview-capture-instructions", "Print the managed explicit-capture instruction snippet without writing files").option("--remove-capture-instructions", "Remove the managed explicit-capture instruction snippet from MEMORY.md").option("--json", "Emit machine-readable JSON only").action(async (...args) => {
5535
5599
  const options = args[0] ?? {};
5536
5600
  const captureInstructionsMode = options.removeCaptureInstructions === true ? "remove" : options.previewCaptureInstructions === true ? "preview" : options.installCaptureInstructions === true ? "install" : void 0;
@@ -5950,6 +6014,59 @@ function registerCli(api, orchestrator) {
5950
6014
  }
5951
6015
  if (!reportHasMachineReadableOutput(options)) console.log("OK");
5952
6016
  });
6017
+ cmd.command("recall-explain").description(
6018
+ "Show tier explain for the most recent recall (or a specific session)"
6019
+ ).option(
6020
+ "--session <key>",
6021
+ "Session key to look up; omit to use the most recent snapshot"
6022
+ ).option("--format <fmt>", "Output format: text (default) or json", "text").action(async (...args) => {
6023
+ const options = args[0] ?? {};
6024
+ const format = parseRecallExplainFormat(options.format);
6025
+ await orchestrator.lastRecall.load();
6026
+ const sessionKey = typeof options.session === "string" && options.session.length > 0 ? options.session : void 0;
6027
+ let snapshot = null;
6028
+ try {
6029
+ snapshot = sessionKey ? orchestrator.lastRecall.get(sessionKey) : orchestrator.lastRecall.getMostRecent();
6030
+ } catch {
6031
+ snapshot = null;
6032
+ }
6033
+ console.log(renderRecallExplain(snapshot, format));
6034
+ });
6035
+ cmd.command("xray").description(
6036
+ "Run a recall with X-ray capture and print the unified snapshot (tier + audit + MMR + filters). Part of #570."
6037
+ ).argument("<query>", "Query to recall against").option(
6038
+ "--format <fmt>",
6039
+ "Output format: text (default), markdown, or json",
6040
+ "text"
6041
+ ).option(
6042
+ "--budget <chars>",
6043
+ "Override recall character budget for this call (positive integer)"
6044
+ ).option(
6045
+ "--namespace <ns>",
6046
+ "Namespace to scope the recall to (defaults to configured namespace)"
6047
+ ).option(
6048
+ "--out <path>",
6049
+ "Write the rendered snapshot to a file instead of stdout"
6050
+ ).action(async (...args) => {
6051
+ const parsed = parseXrayCliOptions(
6052
+ args[0],
6053
+ args[1] ?? {}
6054
+ );
6055
+ const xrayService = new EngramAccessService(orchestrator);
6056
+ const response = await xrayService.recallXray({
6057
+ query: parsed.query,
6058
+ ...parsed.namespace ? { namespace: parsed.namespace } : {},
6059
+ ...parsed.budget !== void 0 ? { budget: parsed.budget } : {}
6060
+ });
6061
+ const snapshot = response.snapshotFound ? response.snapshot ?? null : null;
6062
+ const rendered = renderXray(snapshot, parsed.format);
6063
+ if (parsed.outPath) {
6064
+ const { writeFile: fsWriteFile } = await import("fs/promises");
6065
+ await fsWriteFile(expandTildePath(parsed.outPath), rendered, "utf8");
6066
+ } else {
6067
+ console.log(rendered);
6068
+ }
6069
+ });
5953
6070
  cmd.command("benchmark-validate").description("Validate a benchmark manifest file or pack directory without importing it").argument("<path>", "Path to a benchmark manifest JSON file or a directory with manifest.json").action(async (...args) => {
5954
6071
  const inputPath = args[0];
5955
6072
  const summary = await runBenchmarkValidateCliCommand({
@@ -7336,6 +7453,36 @@ Clusters found: ${result.clustersFound}`);
7336
7453
  Semantic consolidation complete. clusters=${result.clustersFound}, consolidated=${result.memoriesConsolidated}, archived=${result.memoriesArchived}, errors=${result.errors}`
7337
7454
  );
7338
7455
  });
7456
+ cmd.command("consolidate-undo <target>").description(
7457
+ "Undo a consolidation: restore source memories from their derived_from snapshots and archive the target"
7458
+ ).option("--dry-run", "Show the restore plan without modifying files").action(async (...args) => {
7459
+ const rawTarget = typeof args[0] === "string" ? args[0] : "";
7460
+ const options = args[1] ?? {};
7461
+ const dryRun = options.dryRun === true;
7462
+ if (!rawTarget) {
7463
+ console.error("consolidate-undo: missing <target> argument");
7464
+ process.exitCode = 1;
7465
+ return;
7466
+ }
7467
+ const expandedTarget = expandTildePath(rawTarget);
7468
+ const targetPath = path19.isAbsolute(expandedTarget) ? expandedTarget : path19.join(orchestrator.config.memoryDir, expandedTarget);
7469
+ const { runConsolidationUndo, formatConsolidationUndoResult } = await import("./consolidation-undo.js");
7470
+ const result = await runConsolidationUndo({
7471
+ storage: orchestrator.storage,
7472
+ memoryDir: orchestrator.config.memoryDir,
7473
+ targetPath,
7474
+ versioning: {
7475
+ enabled: orchestrator.config.versioningEnabled,
7476
+ maxVersionsPerPage: orchestrator.config.versioningMaxPerPage,
7477
+ sidecarDir: orchestrator.config.versioningSidecarDir
7478
+ },
7479
+ dryRun
7480
+ });
7481
+ console.log(formatConsolidationUndoResult(result));
7482
+ if (result.error) {
7483
+ process.exitCode = 1;
7484
+ }
7485
+ });
7339
7486
  cmd.command("questions").description("List open questions from memory extraction").option("-a, --all", "Show all questions including resolved").action(async (...args) => {
7340
7487
  const options = args[0] ?? {};
7341
7488
  const showAll = options.all === true;
@@ -7802,15 +7949,24 @@ Semantic consolidation complete. clusters=${result.clustersFound}, consolidated=
7802
7949
  });
7803
7950
  reviewCmd.command("scan").description("Run an on-demand contradiction scan").option("--namespace <ns>", "Namespace to scan").action(async (...args) => {
7804
7951
  const options = args[0] ?? {};
7805
- const { runContradictionScan } = await import("./contradiction-scan-GR33PONM.js");
7952
+ const { runContradictionScan } = await import("./contradiction-scan-E3GJTI4F.js");
7806
7953
  console.log("Running contradiction scan...");
7807
7954
  const result = await runContradictionScan({
7808
7955
  storage: orchestrator.storage,
7809
7956
  config: orchestrator.config,
7810
7957
  memoryDir: orchestrator.config.memoryDir,
7811
- embeddingLookup: void 0,
7958
+ embeddingLookupFactory: (storage) => {
7959
+ if (!orchestrator.config.embeddingFallbackEnabled) return void 0;
7960
+ return async (content, limit) => {
7961
+ try {
7962
+ return await orchestrator.semanticDedupLookup(content, limit, storage);
7963
+ } catch {
7964
+ return [];
7965
+ }
7966
+ };
7967
+ },
7812
7968
  localLlm: orchestrator.localLlm ?? null,
7813
- fallbackLlm: null,
7969
+ fallbackLlm: orchestrator.fastGatewayLlm ?? null,
7814
7970
  namespace: options.namespace
7815
7971
  });
7816
7972
  console.log(`Scan complete in ${result.elapsedMs}ms:`);
@@ -7942,4 +8098,4 @@ export {
7942
8098
  resolveMemoryDirForNamespace,
7943
8099
  registerCli
7944
8100
  };
7945
- //# sourceMappingURL=chunk-WBSAYXVI.js.map
8101
+ //# sourceMappingURL=chunk-LOIMBRDE.js.map