@remnic/core 10.0.194 → 10.0.196

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 (323) hide show
  1. package/dist/access-admin-ops-surface.js +65 -66
  2. package/dist/access-cli.js +65 -66
  3. package/dist/access-cli.js.map +1 -1
  4. package/dist/access-coding-context-resolution.js +2 -2
  5. package/dist/access-extraction-force-flush-preempt.js +65 -66
  6. package/dist/access-extraction-force-flush.js +65 -66
  7. package/dist/access-http-briefing.js +65 -66
  8. package/dist/access-http-query.js +65 -66
  9. package/dist/access-http.js +65 -66
  10. package/dist/access-identity-continuity-surface.js +65 -66
  11. package/dist/access-lcm-surface.js +65 -66
  12. package/dist/access-mcp.d.ts.map +1 -1
  13. package/dist/access-mcp.js +65 -66
  14. package/dist/access-observe-write-category.js +2 -2
  15. package/dist/access-observe-write-surface.js +65 -66
  16. package/dist/access-operations-batch.js +65 -66
  17. package/dist/access-operations.js +65 -66
  18. package/dist/access-recall-concurrency.d.ts +4 -0
  19. package/dist/access-recall-concurrency.d.ts.map +1 -1
  20. package/dist/access-recall-concurrency.js +65 -66
  21. package/dist/access-recall-diagnostics.js +2 -2
  22. package/dist/access-recall-response.d.ts.map +1 -1
  23. package/dist/access-recall-response.js +65 -66
  24. package/dist/access-recall-surface.d.ts.map +1 -1
  25. package/dist/access-recall-surface.js +65 -66
  26. package/dist/access-schema.d.ts +1 -0
  27. package/dist/access-schema.d.ts.map +1 -1
  28. package/dist/access-schema.js +1 -1
  29. package/dist/access-service.d.ts.map +1 -1
  30. package/dist/access-service.js +65 -66
  31. package/dist/active-recall.js +7 -6
  32. package/dist/active-recall.js.map +1 -1
  33. package/dist/{auto-sync-BJUAGKI5.js → auto-sync-BEW65FDT.js} +6 -5
  34. package/dist/{auto-sync-BJUAGKI5.js.map → auto-sync-BEW65FDT.js.map} +1 -1
  35. package/dist/briefing.js +7 -6
  36. package/dist/buffer.d.ts +1 -0
  37. package/dist/buffer.d.ts.map +1 -1
  38. package/dist/buffer.js +3 -3
  39. package/dist/calibration.js +5 -4
  40. package/dist/calibration.js.map +1 -1
  41. package/dist/causal-consolidation.js +8 -7
  42. package/dist/causal-consolidation.js.map +1 -1
  43. package/dist/{chunk-FZU62GIV.js → chunk-2X5I5C3M.js} +27 -10
  44. package/dist/chunk-2X5I5C3M.js.map +1 -0
  45. package/dist/{chunk-F2MVWUNF.js → chunk-374E2HYZ.js} +10 -2
  46. package/dist/chunk-374E2HYZ.js.map +1 -0
  47. package/dist/{chunk-3ZS3NUEI.js → chunk-3DSLTUK6.js} +2 -2
  48. package/dist/{chunk-DYUPSTCV.js → chunk-3EXG2KPK.js} +3 -3
  49. package/dist/{chunk-FGFU6J26.js → chunk-4FTYKZ77.js} +3 -3
  50. package/dist/{chunk-QIPRDRGM.js → chunk-4HEJDVPU.js} +1 -1
  51. package/dist/chunk-4HEJDVPU.js.map +1 -0
  52. package/dist/{chunk-EEA2RM4B.js → chunk-4I6A3SDL.js} +2 -2
  53. package/dist/{chunk-SKJM4PKE.js → chunk-4JI5PPFW.js} +2 -2
  54. package/dist/{chunk-TDG5NZAZ.js → chunk-65JA7LWV.js} +2 -2
  55. package/dist/{chunk-3YID7KZ6.js → chunk-6QMKUWXH.js} +2 -2
  56. package/dist/{chunk-7SOKOEAZ.js → chunk-6RRHTHKQ.js} +2 -2
  57. package/dist/{chunk-VHQNJW4Q.js → chunk-6W62D4MC.js} +2 -2
  58. package/dist/{chunk-CRS2NY44.js → chunk-7O6H7BPW.js} +2 -2
  59. package/dist/{chunk-VSLV3EEP.js → chunk-7TK5Q6LQ.js} +112 -81
  60. package/dist/chunk-7TK5Q6LQ.js.map +1 -0
  61. package/dist/{chunk-NN3LMWKA.js → chunk-7TQ3EDQ3.js} +1 -1
  62. package/dist/chunk-7TQ3EDQ3.js.map +1 -0
  63. package/dist/{chunk-KJ65WZHB.js → chunk-A7DIZOTF.js} +2 -2
  64. package/dist/{chunk-TZ7ZA2LM.js → chunk-AD3JOG2Q.js} +2 -2
  65. package/dist/{chunk-2QW5HPKU.js → chunk-AUDLHIHI.js} +35 -28
  66. package/dist/chunk-AUDLHIHI.js.map +1 -0
  67. package/dist/{chunk-BDFSVUUZ.js → chunk-C3H2QZOZ.js} +2 -1
  68. package/dist/chunk-C3H2QZOZ.js.map +1 -0
  69. package/dist/{chunk-7EP4FURO.js → chunk-C72YQM7E.js} +2 -2
  70. package/dist/{chunk-4EAVEDLG.js → chunk-CRKT2JXN.js} +9 -9
  71. package/dist/{chunk-CJSTQNE5.js → chunk-CTOMDCCA.js} +2 -2
  72. package/dist/{chunk-PSQ347YP.js → chunk-DSKII2W4.js} +3 -3
  73. package/dist/{chunk-KOVQZJ27.js → chunk-E7LDTUWK.js} +2 -2
  74. package/dist/{chunk-SPAKBUJY.js → chunk-EWLMEYLF.js} +2 -2
  75. package/dist/{chunk-JJ42IDJU.js → chunk-FEGQI5KR.js} +2 -2
  76. package/dist/{chunk-3BICT225.js → chunk-FGNBUUPX.js} +2 -2
  77. package/dist/{chunk-QZMGZBTF.js → chunk-HBG6CQEX.js} +2 -2
  78. package/dist/{chunk-7V6GNQC2.js → chunk-HINQENZG.js} +2 -2
  79. package/dist/{chunk-WRVKI6ZO.js → chunk-HLQXSX4F.js} +2 -2
  80. package/dist/{chunk-KQIOW3TG.js → chunk-HUDE2SQA.js} +2 -2
  81. package/dist/{chunk-T765HQ5U.js → chunk-IIDAN7XJ.js} +2 -2
  82. package/dist/{chunk-M7Q7Z6V5.js → chunk-JDZ5JPYG.js} +38 -8
  83. package/dist/chunk-JDZ5JPYG.js.map +1 -0
  84. package/dist/{chunk-VMNX2UV7.js → chunk-JRUOIEFL.js} +5 -5
  85. package/dist/{chunk-JKMIGCK6.js → chunk-KDGEEZOI.js} +3 -2
  86. package/dist/chunk-KDGEEZOI.js.map +1 -0
  87. package/dist/{chunk-MMRTPH3J.js → chunk-KQYGUFMQ.js} +5 -3
  88. package/dist/chunk-KQYGUFMQ.js.map +1 -0
  89. package/dist/{chunk-TWYYUMYO.js → chunk-KXAGZRJV.js} +2 -2
  90. package/dist/{chunk-JITK24KX.js → chunk-LJNCJK7B.js} +10 -10
  91. package/dist/{chunk-Z6EFSXU3.js → chunk-LMM2LRVQ.js} +2 -2
  92. package/dist/{chunk-V65H7MI6.js → chunk-M42UFQZY.js} +51 -4
  93. package/dist/chunk-M42UFQZY.js.map +1 -0
  94. package/dist/{chunk-KZ4BJRGQ.js → chunk-ODGVLSCQ.js} +2 -2
  95. package/dist/{chunk-AALJHIKH.js → chunk-OHJ5PNYB.js} +3 -3
  96. package/dist/{chunk-XZMQLON4.js → chunk-OK726OF4.js} +7 -5
  97. package/dist/chunk-OK726OF4.js.map +1 -0
  98. package/dist/{chunk-Q6S67LHR.js → chunk-OOMFFMX3.js} +2 -2
  99. package/dist/{chunk-YCJJODER.js → chunk-PNDTRIOI.js} +10 -3
  100. package/dist/chunk-PNDTRIOI.js.map +1 -0
  101. package/dist/{chunk-3RZ4GDOH.js → chunk-PX4AMRAN.js} +93 -23
  102. package/dist/chunk-PX4AMRAN.js.map +1 -0
  103. package/dist/{chunk-JNDMIAJ4.js → chunk-QEVZKJM6.js} +2 -2
  104. package/dist/{chunk-ZNCCX7P6.js → chunk-QO5QZR2U.js} +2 -2
  105. package/dist/{chunk-NFQKIZK3.js → chunk-QXEF66SC.js} +2 -2
  106. package/dist/{chunk-NKHRIDYP.js → chunk-RTXW6E6X.js} +3 -3
  107. package/dist/{chunk-5WDUY2ZZ.js → chunk-S4QWAWR6.js} +4 -4
  108. package/dist/{chunk-HEJFE3BC.js → chunk-SJCN7ESG.js} +2 -2
  109. package/dist/{chunk-AJ7JHHRY.js → chunk-SPPWVMP4.js} +2 -2
  110. package/dist/{chunk-QSF5SJAM.js → chunk-STQNKDKZ.js} +9 -3
  111. package/dist/chunk-STQNKDKZ.js.map +1 -0
  112. package/dist/{chunk-QFKNIKUF.js → chunk-SXR7L57Z.js} +2 -2
  113. package/dist/{chunk-GYCUX3N4.js → chunk-TGMIJABS.js} +2 -2
  114. package/dist/{chunk-GH7IKABD.js → chunk-UFJJMQDV.js} +2 -2
  115. package/dist/{chunk-FKHXXL42.js → chunk-VAE6QCZQ.js} +2 -2
  116. package/dist/{chunk-UH2VY2QQ.js → chunk-WCW7I7ZM.js} +2 -2
  117. package/dist/{chunk-5GIYIYJI.js → chunk-WLP3XJCO.js} +2 -2
  118. package/dist/{chunk-STSORBX5.js → chunk-XII23FXP.js} +1 -1
  119. package/dist/chunk-XII23FXP.js.map +1 -0
  120. package/dist/{chunk-LR6LWX33.js → chunk-XXDIPAUE.js} +2 -2
  121. package/dist/{chunk-G2MS56KM.js → chunk-YQUGYQRY.js} +2 -2
  122. package/dist/{chunk-WEI6HEUX.js → chunk-YXAH5TSN.js} +2 -2
  123. package/dist/{chunk-75K6DRPN.js → chunk-ZAVFAGBE.js} +2 -2
  124. package/dist/{chunk-7KTORRIK.js → chunk-ZNJU3NBJ.js} +2 -2
  125. package/dist/cli.js +65 -66
  126. package/dist/coding/export-okf-codegraph.js +9 -8
  127. package/dist/coding/export-okf-codegraph.js.map +1 -1
  128. package/dist/compounding/engine.js +8 -7
  129. package/dist/config.d.ts.map +1 -1
  130. package/dist/config.js +7 -6
  131. package/dist/connectors/codex-materialize-runner.js +7 -6
  132. package/dist/connectors/index.js +7 -6
  133. package/dist/convergence-refresh.js +9 -8
  134. package/dist/corpus-watermark.js +9 -8
  135. package/dist/deep-recall-http-glue.js +2 -2
  136. package/dist/deep-recall-policy-llm.js +4 -3
  137. package/dist/entity-retrieval.js +7 -6
  138. package/dist/eval-trajectory-store.js +2 -2
  139. package/dist/eval-trajectory.js +2 -2
  140. package/dist/evals.d.ts.map +1 -1
  141. package/dist/evals.js +1 -1
  142. package/dist/explicit-capture.js +65 -66
  143. package/dist/extraction-error-classification.d.ts +40 -5
  144. package/dist/extraction-error-classification.d.ts.map +1 -1
  145. package/dist/extraction-error-classification.js +5 -2
  146. package/dist/extraction-faithfulness.js +4 -3
  147. package/dist/extraction-judge.js +4 -3
  148. package/dist/extraction.d.ts.map +1 -1
  149. package/dist/extraction.js +17 -18
  150. package/dist/fallback-llm-codex-subscription.d.ts +3 -1
  151. package/dist/fallback-llm-codex-subscription.d.ts.map +1 -1
  152. package/dist/fallback-llm-codex-subscription.js +2 -1
  153. package/dist/fallback-llm.d.ts.map +1 -1
  154. package/dist/fallback-llm.js +3 -2
  155. package/dist/harmonic-retrieval.js +7 -6
  156. package/dist/index.js +65 -66
  157. package/dist/live-connectors-runner.js +1 -2
  158. package/dist/local-llm-helpers.d.ts +1 -0
  159. package/dist/local-llm-helpers.d.ts.map +1 -1
  160. package/dist/local-llm-helpers.js +1 -1
  161. package/dist/local-llm.d.ts.map +1 -1
  162. package/dist/local-llm.js +4 -3
  163. package/dist/location/index.js +8 -7
  164. package/dist/maintenance/memory-governance.js +7 -6
  165. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -6
  166. package/dist/maintenance/rebuild-memory-projection-runner.js +9 -8
  167. package/dist/maintenance/rebuild-memory-projection.js +8 -7
  168. package/dist/memory-browse.js +3 -3
  169. package/dist/namespaces/migrate.js +8 -7
  170. package/dist/namespaces/storage.js +7 -6
  171. package/dist/operator-doctor-corpus.js +10 -9
  172. package/dist/operator-toolkit.js +15 -14
  173. package/dist/orchestration/backlog-scheduler.js +66 -67
  174. package/dist/orchestration/backlog-scheduler.js.map +1 -1
  175. package/dist/orchestration/buffer-drain-runner.js +66 -67
  176. package/dist/orchestration/extraction-drain.d.ts +1 -0
  177. package/dist/orchestration/extraction-drain.d.ts.map +1 -1
  178. package/dist/orchestration/extraction-run-helpers.d.ts +41 -4
  179. package/dist/orchestration/extraction-run-helpers.d.ts.map +1 -1
  180. package/dist/orchestration/extraction-run.d.ts +4 -0
  181. package/dist/orchestration/extraction-run.d.ts.map +1 -1
  182. package/dist/orchestration/maintenance.js +17 -16
  183. package/dist/orchestration/orchestrator-helpers.d.ts +2 -0
  184. package/dist/orchestration/orchestrator-helpers.d.ts.map +1 -1
  185. package/dist/orchestration/recall-entry.d.ts +2 -2
  186. package/dist/orchestration/recall-entry.d.ts.map +1 -1
  187. package/dist/orchestration/recall-internal.d.ts.map +1 -1
  188. package/dist/orchestrator.d.ts.map +1 -1
  189. package/dist/orchestrator.js +65 -66
  190. package/dist/recall-explain-renderer.js +3 -3
  191. package/dist/recall-navigate-access.js +2 -2
  192. package/dist/recall-navigate-disclosure.js +2 -2
  193. package/dist/recall-navigate.js +2 -2
  194. package/dist/recall-navigation.js +65 -66
  195. package/dist/recall-planner-llm.js +3 -2
  196. package/dist/recall-planner-llm.js.map +1 -1
  197. package/dist/recall-state-view-admission.js +3 -3
  198. package/dist/recall-why-service.js +3 -3
  199. package/dist/recall-xray-cli.js +4 -4
  200. package/dist/recall-xray-renderer.js +3 -3
  201. package/dist/recall-xray.js +2 -2
  202. package/dist/resume-bundles.js +8 -7
  203. package/dist/semantic-consolidation.js +8 -7
  204. package/dist/semantic-rule-promotion.js +7 -6
  205. package/dist/semantic-rule-verifier.js +7 -6
  206. package/dist/source-agent-qualifier.js +10 -9
  207. package/dist/standup/build.js +7 -6
  208. package/dist/storage.d.ts.map +1 -1
  209. package/dist/storage.js +6 -5
  210. package/dist/summarizer.js +6 -5
  211. package/dist/support-passport/index.js +6 -5
  212. package/dist/transfer/export-okf.js +7 -6
  213. package/dist/types-extraction-failure.d.ts +7 -1
  214. package/dist/types-extraction-failure.d.ts.map +1 -1
  215. package/dist/types.d.ts +6 -6
  216. package/dist/types.d.ts.map +1 -1
  217. package/dist/types.js +1 -1
  218. package/dist/verified-recall.js +7 -6
  219. package/dist/who-knows-cli.js +8 -7
  220. package/dist/who-knows.js +7 -6
  221. package/package.json +2 -2
  222. package/src/access-mcp.ts +8 -0
  223. package/src/access-recall-concurrency.ts +35 -2
  224. package/src/access-recall-response.ts +3 -1
  225. package/src/access-recall-surface.ts +1 -0
  226. package/src/access-schema.ts +8 -0
  227. package/src/access-service-recall-concurrency.test.ts +65 -0
  228. package/src/access-service.ts +4 -3
  229. package/src/buffer-incremental-persistence.test.ts +23 -0
  230. package/src/buffer.ts +30 -28
  231. package/src/config.ts +2 -0
  232. package/src/evals.ts +6 -6
  233. package/src/extraction-error-classification.ts +88 -8
  234. package/src/extraction-local-failure-class.test.ts +117 -3
  235. package/src/extraction-reply-diagnostic-wiring.test.ts +3 -1
  236. package/src/extraction.test.ts +73 -3
  237. package/src/extraction.ts +26 -25
  238. package/src/fallback-llm-codex-subscription.ts +17 -3
  239. package/src/fallback-llm.test.ts +70 -0
  240. package/src/fallback-llm.ts +17 -18
  241. package/src/local-llm-headers-timeout.test.ts +151 -0
  242. package/src/local-llm-helpers.ts +1 -1
  243. package/src/local-llm.ts +44 -43
  244. package/src/orchestration/extraction-drain.ts +11 -5
  245. package/src/orchestration/extraction-run-helpers.ts +110 -4
  246. package/src/orchestration/extraction-run.test.ts +408 -3
  247. package/src/orchestration/extraction-run.ts +75 -75
  248. package/src/orchestration/orchestrator-helpers.ts +2 -0
  249. package/src/orchestration/recall-entry.ts +7 -7
  250. package/src/orchestration/recall-internal.ts +14 -4
  251. package/src/orchestrator.ts +3 -2
  252. package/src/recall-client-deadline-trace.test.ts +209 -0
  253. package/src/storage.ts +5 -4
  254. package/src/types-extraction-failure.ts +12 -1
  255. package/src/types.ts +6 -6
  256. package/dist/chunk-2QW5HPKU.js.map +0 -1
  257. package/dist/chunk-3RZ4GDOH.js.map +0 -1
  258. package/dist/chunk-BDFSVUUZ.js.map +0 -1
  259. package/dist/chunk-C7SRUWBW.js +0 -54
  260. package/dist/chunk-C7SRUWBW.js.map +0 -1
  261. package/dist/chunk-F2MVWUNF.js.map +0 -1
  262. package/dist/chunk-FZU62GIV.js.map +0 -1
  263. package/dist/chunk-JKMIGCK6.js.map +0 -1
  264. package/dist/chunk-M7Q7Z6V5.js.map +0 -1
  265. package/dist/chunk-MMRTPH3J.js.map +0 -1
  266. package/dist/chunk-NN3LMWKA.js.map +0 -1
  267. package/dist/chunk-QIPRDRGM.js.map +0 -1
  268. package/dist/chunk-QSF5SJAM.js.map +0 -1
  269. package/dist/chunk-STSORBX5.js.map +0 -1
  270. package/dist/chunk-V65H7MI6.js.map +0 -1
  271. package/dist/chunk-VSLV3EEP.js.map +0 -1
  272. package/dist/chunk-XZMQLON4.js.map +0 -1
  273. package/dist/chunk-YCJJODER.js.map +0 -1
  274. /package/dist/{chunk-3ZS3NUEI.js.map → chunk-3DSLTUK6.js.map} +0 -0
  275. /package/dist/{chunk-DYUPSTCV.js.map → chunk-3EXG2KPK.js.map} +0 -0
  276. /package/dist/{chunk-FGFU6J26.js.map → chunk-4FTYKZ77.js.map} +0 -0
  277. /package/dist/{chunk-EEA2RM4B.js.map → chunk-4I6A3SDL.js.map} +0 -0
  278. /package/dist/{chunk-SKJM4PKE.js.map → chunk-4JI5PPFW.js.map} +0 -0
  279. /package/dist/{chunk-TDG5NZAZ.js.map → chunk-65JA7LWV.js.map} +0 -0
  280. /package/dist/{chunk-3YID7KZ6.js.map → chunk-6QMKUWXH.js.map} +0 -0
  281. /package/dist/{chunk-7SOKOEAZ.js.map → chunk-6RRHTHKQ.js.map} +0 -0
  282. /package/dist/{chunk-VHQNJW4Q.js.map → chunk-6W62D4MC.js.map} +0 -0
  283. /package/dist/{chunk-CRS2NY44.js.map → chunk-7O6H7BPW.js.map} +0 -0
  284. /package/dist/{chunk-KJ65WZHB.js.map → chunk-A7DIZOTF.js.map} +0 -0
  285. /package/dist/{chunk-TZ7ZA2LM.js.map → chunk-AD3JOG2Q.js.map} +0 -0
  286. /package/dist/{chunk-7EP4FURO.js.map → chunk-C72YQM7E.js.map} +0 -0
  287. /package/dist/{chunk-4EAVEDLG.js.map → chunk-CRKT2JXN.js.map} +0 -0
  288. /package/dist/{chunk-CJSTQNE5.js.map → chunk-CTOMDCCA.js.map} +0 -0
  289. /package/dist/{chunk-PSQ347YP.js.map → chunk-DSKII2W4.js.map} +0 -0
  290. /package/dist/{chunk-KOVQZJ27.js.map → chunk-E7LDTUWK.js.map} +0 -0
  291. /package/dist/{chunk-SPAKBUJY.js.map → chunk-EWLMEYLF.js.map} +0 -0
  292. /package/dist/{chunk-JJ42IDJU.js.map → chunk-FEGQI5KR.js.map} +0 -0
  293. /package/dist/{chunk-3BICT225.js.map → chunk-FGNBUUPX.js.map} +0 -0
  294. /package/dist/{chunk-QZMGZBTF.js.map → chunk-HBG6CQEX.js.map} +0 -0
  295. /package/dist/{chunk-7V6GNQC2.js.map → chunk-HINQENZG.js.map} +0 -0
  296. /package/dist/{chunk-WRVKI6ZO.js.map → chunk-HLQXSX4F.js.map} +0 -0
  297. /package/dist/{chunk-KQIOW3TG.js.map → chunk-HUDE2SQA.js.map} +0 -0
  298. /package/dist/{chunk-T765HQ5U.js.map → chunk-IIDAN7XJ.js.map} +0 -0
  299. /package/dist/{chunk-VMNX2UV7.js.map → chunk-JRUOIEFL.js.map} +0 -0
  300. /package/dist/{chunk-TWYYUMYO.js.map → chunk-KXAGZRJV.js.map} +0 -0
  301. /package/dist/{chunk-JITK24KX.js.map → chunk-LJNCJK7B.js.map} +0 -0
  302. /package/dist/{chunk-Z6EFSXU3.js.map → chunk-LMM2LRVQ.js.map} +0 -0
  303. /package/dist/{chunk-KZ4BJRGQ.js.map → chunk-ODGVLSCQ.js.map} +0 -0
  304. /package/dist/{chunk-AALJHIKH.js.map → chunk-OHJ5PNYB.js.map} +0 -0
  305. /package/dist/{chunk-Q6S67LHR.js.map → chunk-OOMFFMX3.js.map} +0 -0
  306. /package/dist/{chunk-JNDMIAJ4.js.map → chunk-QEVZKJM6.js.map} +0 -0
  307. /package/dist/{chunk-ZNCCX7P6.js.map → chunk-QO5QZR2U.js.map} +0 -0
  308. /package/dist/{chunk-NFQKIZK3.js.map → chunk-QXEF66SC.js.map} +0 -0
  309. /package/dist/{chunk-NKHRIDYP.js.map → chunk-RTXW6E6X.js.map} +0 -0
  310. /package/dist/{chunk-5WDUY2ZZ.js.map → chunk-S4QWAWR6.js.map} +0 -0
  311. /package/dist/{chunk-HEJFE3BC.js.map → chunk-SJCN7ESG.js.map} +0 -0
  312. /package/dist/{chunk-AJ7JHHRY.js.map → chunk-SPPWVMP4.js.map} +0 -0
  313. /package/dist/{chunk-QFKNIKUF.js.map → chunk-SXR7L57Z.js.map} +0 -0
  314. /package/dist/{chunk-GYCUX3N4.js.map → chunk-TGMIJABS.js.map} +0 -0
  315. /package/dist/{chunk-GH7IKABD.js.map → chunk-UFJJMQDV.js.map} +0 -0
  316. /package/dist/{chunk-FKHXXL42.js.map → chunk-VAE6QCZQ.js.map} +0 -0
  317. /package/dist/{chunk-UH2VY2QQ.js.map → chunk-WCW7I7ZM.js.map} +0 -0
  318. /package/dist/{chunk-5GIYIYJI.js.map → chunk-WLP3XJCO.js.map} +0 -0
  319. /package/dist/{chunk-LR6LWX33.js.map → chunk-XXDIPAUE.js.map} +0 -0
  320. /package/dist/{chunk-G2MS56KM.js.map → chunk-YQUGYQRY.js.map} +0 -0
  321. /package/dist/{chunk-WEI6HEUX.js.map → chunk-YXAH5TSN.js.map} +0 -0
  322. /package/dist/{chunk-75K6DRPN.js.map → chunk-ZAVFAGBE.js.map} +0 -0
  323. /package/dist/{chunk-7KTORRIK.js.map → chunk-ZNJU3NBJ.js.map} +0 -0
@@ -0,0 +1,209 @@
1
+ /**
2
+ * recall-client-deadline-trace.test.ts — issue #3499.
3
+ *
4
+ * Pins the client-visible deadline + trace-ID contract on the explicit
5
+ * `engram.recall` tool route:
6
+ * - tools/list advertises `deadlineMs` and `traceId`, and tools/call
7
+ * forwards both verbatim to the access service (the merged deadline
8
+ * clamp is unreachable while the schema omits the property);
9
+ * - `recallRequestSchema` accepts both fields and rejects a `traceId`
10
+ * that could inject control characters into log lines;
11
+ * - a caller-supplied `traceId` becomes the snapshot's `traceId` so the
12
+ * response echoes the ID the client logged before dispatch, while an
13
+ * unsupplied recall keeps the derived 16-hex ID.
14
+ */
15
+
16
+ import assert from "node:assert/strict";
17
+ import os from "node:os";
18
+ import path from "node:path";
19
+ import { createHash } from "node:crypto";
20
+ import { mkdtemp, readFile, rm } from "node:fs/promises";
21
+ import test from "node:test";
22
+
23
+ import { recallRequestSchema } from "./access-schema.js";
24
+ import { recordEvalShadowRecall } from "./evals.js";
25
+ import { EngramMcpServer } from "./access-mcp.js";
26
+ import type { EngramAccessService } from "./access-service.js";
27
+ import { parseConfig } from "./config.js";
28
+ import { Orchestrator } from "./orchestrator.js";
29
+ import { StorageManager } from "./storage.js";
30
+ import type { PluginConfig } from "./types.js";
31
+
32
+ type ToolArgs = { [key: string]: string | number | boolean };
33
+
34
+ function makeToolRequest(name: string, args: ToolArgs) {
35
+ return {
36
+ jsonrpc: "2.0",
37
+ id: 1,
38
+ method: "tools/call",
39
+ params: { name, arguments: args },
40
+ };
41
+ }
42
+
43
+ type ToolListing = {
44
+ name: string;
45
+ inputSchema: { properties?: { deadlineMs?: unknown; traceId?: unknown } };
46
+ };
47
+
48
+ test("#3499: tools/list advertises deadlineMs and traceId on engram.recall", async () => {
49
+ // SAFETY: tools/list never reaches the service; the empty stub is unreachable.
50
+ const server = new EngramMcpServer(Object.assign({} as EngramAccessService, {}));
51
+ const response = await server.handleRequest({
52
+ jsonrpc: "2.0",
53
+ id: 1,
54
+ method: "tools/list",
55
+ params: {},
56
+ });
57
+ // SAFETY: a tools/list response always resolves to the JSON-RPC result
58
+ // envelope; only the tool name + advertised properties are asserted.
59
+ const tools = (response as { result?: { tools?: ToolListing[] } }).result?.tools ?? [];
60
+ const recall = tools.find((tool) => tool.name === "engram.recall");
61
+ assert.ok(recall, "engram.recall is listed");
62
+ assert.ok(recall.inputSchema.properties?.deadlineMs, "deadlineMs is advertised");
63
+ assert.ok(recall.inputSchema.properties?.traceId, "traceId is advertised");
64
+ });
65
+
66
+ test("#3499: tools/call engram.recall forwards deadlineMs and traceId to the service", async () => {
67
+ let received: ToolArgs | undefined;
68
+ // SAFETY: the stub implements only recall; every other MCP dispatch path
69
+ // is unreachable in this test.
70
+ const service = Object.assign({} as EngramAccessService, {
71
+ recall: async (args: ToolArgs) => {
72
+ received = args;
73
+ return { context: "", results: [], count: 0, memoryIds: [], fallbackUsed: false, sourcesUsed: [], traceId: args.traceId };
74
+ },
75
+ });
76
+ const server = new EngramMcpServer(service);
77
+
78
+ const response = await server.handleRequest(
79
+ makeToolRequest("engram.recall", {
80
+ query: "cold-start recall",
81
+ sessionKey: "pi:session",
82
+ deadlineMs: 55_000,
83
+ traceId: "lane-8z:attempt-2",
84
+ }),
85
+ {},
86
+ );
87
+
88
+ assert.equal(received?.deadlineMs, 55_000);
89
+ assert.equal(received?.traceId, "lane-8z:attempt-2");
90
+ // SAFETY: a tools/call response always resolves to the JSON-RPC result
91
+ // envelope; only structuredContent.traceId is asserted.
92
+ const result = (response as { result?: { structuredContent?: { traceId?: string } } }).result;
93
+ assert.equal(
94
+ result?.structuredContent?.traceId,
95
+ "lane-8z:attempt-2",
96
+ "caller traceId echoes on the response",
97
+ );
98
+ });
99
+
100
+ test("#3499: recallRequestSchema accepts deadline + traceId and rejects injectable traceIds", () => {
101
+ const ok = recallRequestSchema.safeParse({
102
+ query: "q",
103
+ deadlineMs: 42_000,
104
+ traceId: "client:req-7.1",
105
+ });
106
+ assert.equal(ok.success, true);
107
+
108
+ for (const traceId of ["has space", "newline\ninject", "x".repeat(129), ""]) {
109
+ const bad = recallRequestSchema.safeParse({ query: "q", traceId });
110
+ assert.equal(bad.success, false, `traceId ${JSON.stringify(traceId)} rejected`);
111
+ }
112
+ });
113
+
114
+ async function makeOrchestrator(): Promise<{ orchestrator: Orchestrator; memoryDir: string }> {
115
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-3499-trace-"));
116
+ // SAFETY: same minimal-config fixture shape as irc-preference-recall.test.ts;
117
+ // parseConfig fills every unset field with its default.
118
+ const config = parseConfig({
119
+ openaiApiKey: "sk-test",
120
+ memoryDir,
121
+ workspaceDir: path.join(memoryDir, "workspace"),
122
+ qmdEnabled: false,
123
+ embeddingFallbackEnabled: false,
124
+ multiGraphMemoryEnabled: false,
125
+ entityGraphEnabled: false,
126
+ timeGraphEnabled: false,
127
+ causalGraphEnabled: false,
128
+ extractionJudgeEnabled: false,
129
+ contradictionDetectionEnabled: false,
130
+ chunkingEnabled: false,
131
+ extractionMinChars: 0,
132
+ extractionMinImportanceLevel: "trivial",
133
+ inlineSourceAttributionEnabled: false,
134
+ initGateTimeoutMs: 200,
135
+ } as Partial<PluginConfig>);
136
+ return { orchestrator: new Orchestrator(config), memoryDir };
137
+ }
138
+
139
+ test("#3499: a caller-supplied traceId becomes the snapshot traceId", async () => {
140
+ const { orchestrator, memoryDir } = await makeOrchestrator();
141
+ try {
142
+ const storage = new StorageManager(memoryDir);
143
+ await storage.ensureDirectories();
144
+ await storage.writeMemory("preference", "The user prefers vim keybindings.", { source: "test" });
145
+
146
+ await orchestrator.recall("editor preferences", "sess-trace", { traceId: "lane-8z:attempt-2" });
147
+ assert.equal(
148
+ orchestrator.lastRecall.get("sess-trace")?.traceId,
149
+ "lane-8z:attempt-2",
150
+ "caller ID is pinned on the snapshot the response echoes",
151
+ );
152
+
153
+ await orchestrator.recall("editor preferences again", "sess-derived");
154
+ assert.match(
155
+ orchestrator.lastRecall.get("sess-derived")?.traceId ?? "",
156
+ /^[0-9a-f]{16}$/,
157
+ "unsupplied recalls keep the derived 16-hex ID",
158
+ );
159
+ } finally {
160
+ await orchestrator.destroy();
161
+ await rm(memoryDir, { recursive: true, force: true });
162
+ }
163
+ });
164
+
165
+ test("#3499: shadow-eval filenames are hash-derived, safe for special-char caller traceIds", async () => {
166
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-shadow-"));
167
+ try {
168
+ // A caller traceId like "lane-8z:attempt-2" is valid per the request
169
+ // schema but carries ':' — unsafe as a filename on some filesystems.
170
+ const recordTraceId = "lane-8z:attempt.2-1765123456789";
171
+ const targetPath = await recordEvalShadowRecall({
172
+ memoryDir,
173
+ record: {
174
+ schemaVersion: 1,
175
+ traceId: recordTraceId,
176
+ recordedAt: "2026-12-06T17:55:00.000Z",
177
+ sessionKey: "sess-shadow",
178
+ promptHash: "a".repeat(16),
179
+ promptLength: 24,
180
+ retrievalQueryHash: "b".repeat(16),
181
+ retrievalQueryLength: 30,
182
+ recallMode: "full",
183
+ recallResultLimit: 5,
184
+ source: "hot_qmd",
185
+ recalledMemoryCount: 2,
186
+ injected: true,
187
+ contextChars: 400,
188
+ memoryIds: [],
189
+ durationMs: 1234,
190
+ },
191
+ });
192
+
193
+ const fileName = path.basename(targetPath);
194
+ assert.match(fileName, /^[0-9a-f]{24}\.json$/, "filename is a hex hash, not the raw caller ID");
195
+ assert.equal(
196
+ fileName,
197
+ `${createHash("sha256").update(recordTraceId).digest("hex").slice(0, 24)}.json`,
198
+ "the filename deterministically derives from the record traceId",
199
+ );
200
+
201
+ // The raw caller-bearing ID stays in the JSON payload for correlation.
202
+ // SAFETY: recordEvalShadowRecall writes the validated record verbatim;
203
+ // traceId is a required string field of that record.
204
+ const payload = JSON.parse(await readFile(targetPath, "utf-8")) as { traceId: string };
205
+ assert.equal(payload.traceId, recordTraceId);
206
+ } finally {
207
+ await rm(memoryDir, { recursive: true, force: true });
208
+ }
209
+ });
package/src/storage.ts CHANGED
@@ -1623,9 +1623,8 @@ export interface MemoryWriteResult {
1623
1623
 
1624
1624
  /**
1625
1625
  * Defensively parse the persisted per-fingerprint extraction retry state from
1626
- * meta.json. Mirrors the tolerance of the `processedExtractionFingerprints`
1627
- * loader: unknown/legacy shapes are dropped, never thrown on. Uses `in`/typeof
1628
- * narrowing (no inline casts) so a malformed entry can't slip through typed.
1626
+ * meta.json — unknown/legacy shapes are dropped, never thrown on. Uses
1627
+ * `in`/typeof narrowing (no inline casts) so a malformed entry can't slip through.
1629
1628
  */
1630
1629
  function parseExtractionRetryStateEntries(raw: unknown): NonNullable<MetaState["extractionRetryState"]> {
1631
1630
  if (!Array.isArray(raw)) return [];
@@ -1638,14 +1637,16 @@ function parseExtractionRetryStateEntries(raw: unknown): NonNullable<MetaState["
1638
1637
  if (!("firstFailedAt" in entry) || typeof entry.firstFailedAt !== "string") continue;
1639
1638
  if (!("lastFailureClass" in entry)) continue;
1640
1639
  const cls = entry.lastFailureClass;
1641
- if (cls !== "provider_retryable" && cls !== "parse_empty" && cls !== "output_truncated" && cls !== "auth_config") continue;
1640
+ if (cls !== "provider_retryable" && cls !== "parse_empty" && cls !== "output_truncated" && cls !== "auth_config" && cls !== "provider_permanent") continue;
1642
1641
  const lastFailureClass: ExtractionFailureClass = cls;
1642
+ const pa = "permanentAttempts" in entry ? entry.permanentAttempts : undefined;
1643
1643
  valid.push({
1644
1644
  fingerprint: entry.fingerprint,
1645
1645
  attempts: entry.attempts,
1646
1646
  nextEligibleAt: entry.nextEligibleAt,
1647
1647
  firstFailedAt: entry.firstFailedAt,
1648
1648
  lastFailureClass,
1649
+ permanentAttempts: Number.isFinite(pa) ? pa : undefined,
1649
1650
  });
1650
1651
  }
1651
1652
  return valid;
@@ -7,5 +7,16 @@
7
7
  * at the same `maxOutputTokens` can never complete, so the fingerprint long-parks immediately;
8
8
  * the window survives for a run under a raised ceiling (#3521).
9
9
  * - `auth_config`: auth/config failure (401/403/"no models configured") — open the breaker immediately.
10
+ * - `provider_permanent`: a thrown, status-bearing 400/413/422 input refusal — a resend of the
11
+ * identical request can never succeed, so the fingerprint is dead-lettered after
12
+ * `extractionProviderPermanentMaxAttempts` instead of retrying unboundedly
13
+ * (remnic-buffer-drain.timer loop). The same class covers status-bearing local-LLM
14
+ * rejections and gateway `http_error` refusals; statusless errors stay retryable,
15
+ * and a statusless unusable local reply stays `parse_empty`.
10
16
  */
11
- export type ExtractionFailureClass = "provider_retryable" | "parse_empty" | "output_truncated" | "auth_config";
17
+ export type ExtractionFailureClass =
18
+ | "provider_retryable"
19
+ | "parse_empty"
20
+ | "output_truncated"
21
+ | "auth_config"
22
+ | "provider_permanent";
package/src/types.ts CHANGED
@@ -1703,17 +1703,17 @@ export interface PluginConfig
1703
1703
  extractionRetryJitterRatio: number;
1704
1704
  /** Max attempts for a `parse_empty` fingerprint before it is long-parked. */
1705
1705
  extractionParseEmptyMaxAttempts: number;
1706
+ /** Max attempts for a `provider_permanent` fingerprint before it dead-letters — recovery copy saved, marked processed. */
1707
+ extractionProviderPermanentMaxAttempts: number;
1706
1708
  /** Consecutive provider failures before the circuit breaker opens. */
1707
1709
  extractionBreakerFailureThreshold: number;
1708
1710
  /** Breaker open cooldown (ms) for transient provider failures. */
1709
1711
  extractionBreakerCooldownMs: number;
1710
1712
  /** Breaker open cooldown (ms) for auth/config failures (longer — provider is misconfigured). */
1711
1713
  extractionBreakerAuthCooldownMs: number;
1712
- /** Consecutive failed extraction attempts after which the failing
1713
- * trigger-drain chunk is dropped (side-file copy under `state/dropped/`). Default: `5`. */
1714
+ /** Consecutive failed trigger-drain attempts after which the chunk is dropped (side-file copy under `state/dropped/`). Default: `5`. */
1714
1715
  extractionChunkDropAfterFailures: number;
1715
- /** Maximum rendered characters per extraction call; oversized turns split
1716
- * into verbatim `extractionPartOf` parts so every part is extracted. Default: `12000`. */
1716
+ /** Maximum rendered characters per extraction call; oversized turns split into verbatim `extractionPartOf` parts. Default: `12000`. */
1717
1717
  extractionCallMaxChars: number;
1718
1718
  // Local LLM fast tier (v9.1) — smaller model for quick ops
1719
1719
  localLlmFastEnabled: boolean;
@@ -3523,8 +3523,7 @@ export interface MetaState {
3523
3523
  }>;
3524
3524
  /**
3525
3525
  * Per-fingerprint extraction retry/backoff state (extraction hot-loop
3526
- * hardening). Optional and default-safe: older meta files without it load
3527
- * unchanged. Bounded to the newest entries at write time.
3526
+ * hardening). Optional and default-safe; bounded to the newest entries at write time.
3528
3527
  */
3529
3528
  extractionRetryState?: Array<{
3530
3529
  fingerprint: string;
@@ -3532,6 +3531,7 @@ export interface MetaState {
3532
3531
  nextEligibleAt: string; // ISO
3533
3532
  firstFailedAt: string; // ISO
3534
3533
  lastFailureClass: ExtractionFailureClass;
3534
+ permanentAttempts?: number;
3535
3535
  }>;
3536
3536
  }
3537
3537