@remnic/core 9.69.27 → 9.69.29

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 (388) hide show
  1. package/dist/access-admin-ops-surface.d.ts +1 -1
  2. package/dist/access-admin-ops-surface.js +57 -57
  3. package/dist/access-audit.js +2 -2
  4. package/dist/access-authorization-probe.d.ts +1 -1
  5. package/dist/access-authorization-probe.js +58 -58
  6. package/dist/access-boundary.d.ts +1 -1
  7. package/dist/access-boundary.js +57 -57
  8. package/dist/access-cli.js +140 -139
  9. package/dist/access-cli.js.map +1 -1
  10. package/dist/access-coding-context-resolution.js +4 -4
  11. package/dist/access-extraction-force-flush.d.ts +1 -1
  12. package/dist/access-extraction-force-flush.js +57 -57
  13. package/dist/access-http-briefing.d.ts +1 -1
  14. package/dist/access-http-briefing.js +58 -58
  15. package/dist/access-http-lcm-compaction.d.ts +1 -1
  16. package/dist/access-http-lifecycle-flush.d.ts +1 -1
  17. package/dist/access-http-offline-stream.d.ts +1 -1
  18. package/dist/access-http-query.js +59 -59
  19. package/dist/access-http.d.ts +2 -2
  20. package/dist/access-http.js +76 -76
  21. package/dist/access-identity-continuity-surface.js +57 -57
  22. package/dist/access-lcm-surface.d.ts +1 -1
  23. package/dist/access-lcm-surface.js +57 -57
  24. package/dist/access-mcp.d.ts +1 -1
  25. package/dist/access-mcp.js +65 -65
  26. package/dist/access-namespace-preflight.js +57 -57
  27. package/dist/access-observe-transcript.js +4 -4
  28. package/dist/access-observe-write-surface.d.ts +1 -1
  29. package/dist/access-observe-write-surface.js +57 -57
  30. package/dist/access-offline-manifest.js +8 -8
  31. package/dist/access-operations-batch.js +59 -59
  32. package/dist/access-operations.d.ts +6 -6
  33. package/dist/access-operations.js +64 -64
  34. package/dist/access-recall-concurrency.d.ts +1 -1
  35. package/dist/access-recall-concurrency.js +57 -57
  36. package/dist/access-recall-response.d.ts +1 -1
  37. package/dist/access-recall-response.js +57 -57
  38. package/dist/access-recall-surface.d.ts +1 -1
  39. package/dist/access-recall-surface.js +57 -57
  40. package/dist/access-schema.d.ts +91 -91
  41. package/dist/access-schema.js +3 -3
  42. package/dist/access-service-helpers.d.ts +1 -1
  43. package/dist/access-service.d.ts +1 -1
  44. package/dist/access-service.js +57 -57
  45. package/dist/access-surface-catalog.d.ts +1 -1
  46. package/dist/access-surface-catalog.js +59 -59
  47. package/dist/active-recall.js +8 -8
  48. package/dist/adapters/index.js +4 -4
  49. package/dist/adapters/registry.js +2 -2
  50. package/dist/{auto-sync-WNGG2GC2.js → auto-sync-NSHLUAQI.js} +7 -7
  51. package/dist/briefing.js +20 -20
  52. package/dist/buffer.js +8 -8
  53. package/dist/calibration.js +4 -4
  54. package/dist/{capsule-crypto-YO5QJ6L3.js → capsule-crypto-7FJQINUR.js} +2 -2
  55. package/dist/causal-consolidation.js +22 -22
  56. package/dist/{chunk-GRCREL6Q.js → chunk-22JQEBN3.js} +9 -9
  57. package/dist/{chunk-6LLLREDJ.js → chunk-2E3CG66I.js} +2 -2
  58. package/dist/{chunk-OO42R444.js → chunk-2MFH376S.js} +3 -3
  59. package/dist/{chunk-BXLOS5AJ.js → chunk-2NLLXCJG.js} +2 -2
  60. package/dist/{chunk-NXH34IPL.js → chunk-353KGBKY.js} +2 -2
  61. package/dist/{chunk-DZD3WGCD.js → chunk-3JVLGJCY.js} +2 -2
  62. package/dist/{chunk-W24T5YMW.js → chunk-47DEYNMR.js} +2 -2
  63. package/dist/chunk-4NZQ7IID.js +63 -0
  64. package/dist/chunk-4NZQ7IID.js.map +1 -0
  65. package/dist/{chunk-QOOBICJF.js → chunk-565C6ZFO.js} +2 -2
  66. package/dist/{chunk-ZY4DSWZ5.js → chunk-5OOSADXP.js} +5 -5
  67. package/dist/{chunk-EYIEWJNI.js → chunk-6KH5NLQS.js} +2 -2
  68. package/dist/{chunk-EMDLM3LW.js → chunk-7IRZK6MM.js} +2 -2
  69. package/dist/{chunk-TVVEYCNW.js → chunk-7K5Q6COX.js} +4 -4
  70. package/dist/{chunk-6CVNSDCZ.js → chunk-7VJXIDOC.js} +12 -12
  71. package/dist/{chunk-SO4IYSGT.js → chunk-A5JPK3MZ.js} +75 -75
  72. package/dist/{chunk-IVKIODHO.js → chunk-A7XEPMQ6.js} +5 -5
  73. package/dist/{chunk-K6MV3TRQ.js → chunk-ADXCCZL2.js} +2 -2
  74. package/dist/{chunk-SJDQ5RSN.js → chunk-AOCP6JA7.js} +4 -4
  75. package/dist/{chunk-JBPKEARU.js → chunk-AU7Q3LSC.js} +4 -4
  76. package/dist/{chunk-GNMELJGM.js → chunk-AYAIV5V5.js} +6 -6
  77. package/dist/{chunk-ND6IQGSZ.js → chunk-BA6WOZOT.js} +2 -2
  78. package/dist/{chunk-JI7U6AS3.js → chunk-C6FQJ52H.js} +2 -2
  79. package/dist/{chunk-IN673LEP.js → chunk-CARRTDKC.js} +2 -2
  80. package/dist/{chunk-6NXSYYGP.js → chunk-CBCNKKZD.js} +2 -2
  81. package/dist/{chunk-DXFG2VGN.js → chunk-CGC5UQCF.js} +2 -2
  82. package/dist/{chunk-QBH7M7Q4.js → chunk-CLALC6ZB.js} +2 -2
  83. package/dist/{chunk-YSSAGB2O.js → chunk-CLLPJ6QT.js} +5 -5
  84. package/dist/{chunk-KAXCYM66.js → chunk-D5LORF7A.js} +3 -3
  85. package/dist/{chunk-CEH2AFXG.js → chunk-DBQWVT2H.js} +7 -7
  86. package/dist/{chunk-XSTNGNJP.js → chunk-DCJ3YFIC.js} +2 -2
  87. package/dist/{chunk-MWN6QEI2.js → chunk-DITMGZOL.js} +2 -2
  88. package/dist/{chunk-LVE64P5Y.js → chunk-E2ZHGBAK.js} +2 -2
  89. package/dist/{chunk-2EKJDQZB.js → chunk-EZZV7OQL.js} +2 -2
  90. package/dist/{chunk-N3SS45OW.js → chunk-FCSZ4K2X.js} +3 -3
  91. package/dist/{chunk-TWF35IC6.js → chunk-FDLDOEO6.js} +28 -23
  92. package/dist/chunk-FDLDOEO6.js.map +1 -0
  93. package/dist/{chunk-5ATKSPEQ.js → chunk-FGGYSN4P.js} +2 -2
  94. package/dist/{chunk-2Z4GS5E6.js → chunk-FHQSPTPZ.js} +2 -2
  95. package/dist/{chunk-3GGUMRS4.js → chunk-FJ5B36V2.js} +2 -2
  96. package/dist/{chunk-5IEV3YBY.js → chunk-GAYZTUIF.js} +2 -2
  97. package/dist/{chunk-KH6PK4EQ.js → chunk-GBYCFJGV.js} +6 -6
  98. package/dist/{chunk-6VF3R3XQ.js → chunk-GCRGBE72.js} +2 -2
  99. package/dist/{chunk-6GUG4YNM.js → chunk-GGRRF4PZ.js} +2 -2
  100. package/dist/{chunk-ZUNNRGJX.js → chunk-GL4EC4RG.js} +8 -8
  101. package/dist/{chunk-UCKYTA2T.js → chunk-GTWHVXPA.js} +3 -3
  102. package/dist/{chunk-XSGUMQQQ.js → chunk-GVG3JYBI.js} +4 -4
  103. package/dist/{chunk-MY5EDR46.js → chunk-GY5WZBA6.js} +2 -2
  104. package/dist/{chunk-3GCK6ONU.js → chunk-HK32G473.js} +2 -2
  105. package/dist/{chunk-EWCNCQOU.js → chunk-HRICDLBE.js} +2 -2
  106. package/dist/{chunk-46ZPIGWI.js → chunk-HY55QQD7.js} +2 -2
  107. package/dist/{chunk-WMLEPWMO.js → chunk-I27RSQRR.js} +2 -2
  108. package/dist/{chunk-QIEUU4UK.js → chunk-I55KAVET.js} +2 -2
  109. package/dist/{chunk-XM24CDZX.js → chunk-IY2FVXM6.js} +3 -3
  110. package/dist/{chunk-CGJV2YIY.js → chunk-J5Q2YTOB.js} +2 -2
  111. package/dist/{chunk-N3ZOP7KC.js → chunk-JEIXTYVG.js} +2 -2
  112. package/dist/{chunk-ZO2AZIRT.js → chunk-JJPRWTOW.js} +2 -2
  113. package/dist/{chunk-ODW5GDFE.js → chunk-JT3EB7ZL.js} +2 -2
  114. package/dist/{chunk-OU4K7IFP.js → chunk-K5DSKAVF.js} +39 -39
  115. package/dist/{chunk-VDX2J7OX.js → chunk-KQAFEZQX.js} +2 -2
  116. package/dist/{chunk-3K7V3HE6.js → chunk-KXRX7YC2.js} +2 -2
  117. package/dist/{chunk-DDB3S53L.js → chunk-L5JP37BO.js} +7 -7
  118. package/dist/{chunk-227UFSEQ.js → chunk-LEPOP46W.js} +4 -4
  119. package/dist/{chunk-54WHLA65.js → chunk-LRICZIGN.js} +3 -3
  120. package/dist/{chunk-TVEONGBU.js → chunk-MFJBANPX.js} +2 -2
  121. package/dist/{chunk-OB3XMWX5.js → chunk-MKWKYHXJ.js} +4 -4
  122. package/dist/{chunk-HMKPFW7R.js → chunk-MPAJFFP3.js} +2 -2
  123. package/dist/{chunk-R7RTXEYG.js → chunk-MPYD657E.js} +2 -2
  124. package/dist/{chunk-V4ZBR7CW.js → chunk-N2CAORTC.js} +4 -4
  125. package/dist/{chunk-NLDVVWCL.js → chunk-NDNTNE3S.js} +2 -2
  126. package/dist/{chunk-JJ4XK25O.js → chunk-NEFKNR4V.js} +9 -9
  127. package/dist/{chunk-U6N5IBVY.js → chunk-NWWXSJX5.js} +2 -2
  128. package/dist/{chunk-QBC33MPY.js → chunk-NZXEK3UF.js} +2 -2
  129. package/dist/{chunk-JUC24CTX.js → chunk-P2QRMMVQ.js} +6 -1
  130. package/dist/chunk-P2QRMMVQ.js.map +1 -0
  131. package/dist/{chunk-EOQ6FSQP.js → chunk-PHNAB54Q.js} +2 -2
  132. package/dist/{chunk-BD7JTBYP.js → chunk-PSPABFN2.js} +4 -4
  133. package/dist/{chunk-RBCQVOVJ.js → chunk-PV36INNL.js} +3 -3
  134. package/dist/{chunk-E2P7TZTF.js → chunk-ROKKIMON.js} +2 -2
  135. package/dist/{chunk-OEYZXDQI.js → chunk-RSVEP77Y.js} +2 -2
  136. package/dist/{chunk-FQ7HAWWC.js → chunk-RZN4LQ5Y.js} +17 -2
  137. package/dist/{chunk-FQ7HAWWC.js.map → chunk-RZN4LQ5Y.js.map} +1 -1
  138. package/dist/{chunk-SV4Z2S67.js → chunk-S5G2LAL7.js} +4 -4
  139. package/dist/{chunk-AQ7SYDVO.js → chunk-S65WXHNK.js} +2 -2
  140. package/dist/{chunk-6XL73HQ4.js → chunk-SB6PSOP7.js} +1 -1
  141. package/dist/{chunk-JALOAKSZ.js → chunk-TLPZ6MKZ.js} +4 -4
  142. package/dist/{chunk-XTJC7CVX.js → chunk-TXMAF7FZ.js} +5 -5
  143. package/dist/{chunk-3NYTZE5G.js → chunk-UFDMVGUQ.js} +2 -2
  144. package/dist/{chunk-DFEODULB.js → chunk-V2HHAAPI.js} +2 -2
  145. package/dist/{chunk-KEF46KL2.js → chunk-V6EGNVUT.js} +3 -3
  146. package/dist/{chunk-ESNFSSO4.js → chunk-VGXM5B4H.js} +2 -2
  147. package/dist/{chunk-FHYVNJBN.js → chunk-VLLEWQIU.js} +4 -4
  148. package/dist/{chunk-MJUCDM3C.js → chunk-VLXBE57O.js} +2 -2
  149. package/dist/{chunk-4TKJGOCJ.js → chunk-VP67GZ7T.js} +2 -2
  150. package/dist/{chunk-RX3SC4C5.js → chunk-VT4MK674.js} +2 -2
  151. package/dist/{chunk-GHTSNGBZ.js → chunk-VZWXFXLX.js} +2 -2
  152. package/dist/{chunk-WJHGDE7X.js → chunk-W64HKJJM.js} +3 -3
  153. package/dist/{chunk-Y2MZGBOY.js → chunk-W7SECYCQ.js} +2 -2
  154. package/dist/{chunk-2L5FSNPC.js → chunk-X2NFFBTO.js} +7 -7
  155. package/dist/{chunk-DQEMWVMT.js → chunk-X7Y7WX73.js} +1 -1
  156. package/dist/{chunk-EGALNSZ4.js → chunk-XU6OEECT.js} +3 -3
  157. package/dist/{chunk-MZLV2OJE.js → chunk-XWSMJXIG.js} +53 -53
  158. package/dist/{chunk-THQTFTQS.js → chunk-Y3BGA7L5.js} +17 -17
  159. package/dist/{chunk-4FIH6MPS.js → chunk-YHLWPYHT.js} +3 -3
  160. package/dist/{chunk-PAZY2ZKP.js → chunk-YQAXP5AC.js} +2 -2
  161. package/dist/{chunk-JEC4DVM3.js → chunk-YUMDFDUA.js} +3 -3
  162. package/dist/{chunk-7HYPN2GC.js → chunk-ZG74PWRW.js} +2 -2
  163. package/dist/{chunk-VVX5PZFS.js → chunk-ZHXSOMYH.js} +2 -2
  164. package/dist/{chunk-TNSCIPBQ.js → chunk-ZNJSBIP4.js} +4 -4
  165. package/dist/{cli-DD0P-lu8.d.ts → cli-B_YwqoIr.d.ts} +1 -1
  166. package/dist/cli.d.ts +2 -2
  167. package/dist/cli.js +101 -101
  168. package/dist/coding/export-okf-codegraph.js +22 -22
  169. package/dist/compounding/engine.js +21 -21
  170. package/dist/config-discovery.d.ts +26 -0
  171. package/dist/config-discovery.js +11 -0
  172. package/dist/config-security.js +2 -2
  173. package/dist/config.js +8 -8
  174. package/dist/connectors/codex-materialize-runner.js +21 -21
  175. package/dist/connectors/codex-materialize.js +3 -3
  176. package/dist/connectors/index.js +24 -24
  177. package/dist/convergence-refresh.js +22 -22
  178. package/dist/conversation-index/backend.js +2 -2
  179. package/dist/corpus-watermark.js +22 -22
  180. package/dist/deep-recall-http-glue.d.ts +1 -1
  181. package/dist/deep-recall-http-glue.js +4 -4
  182. package/dist/deep-recall-mcp-tools.d.ts +1 -1
  183. package/dist/deep-recall-policy-llm.js +5 -5
  184. package/dist/deep-recall.js +2 -2
  185. package/dist/embedding-fallback.js +2 -2
  186. package/dist/emit-legacy-tools.js +3 -3
  187. package/dist/entity-retrieval.js +20 -20
  188. package/dist/external-wiki-access.d.ts +1 -1
  189. package/dist/external-wiki-access.js +58 -58
  190. package/dist/external-wiki-config.js +3 -3
  191. package/dist/external-wiki-mcp-tools.d.ts +1 -1
  192. package/dist/extraction-faithfulness.js +5 -5
  193. package/dist/extraction-judge.js +5 -5
  194. package/dist/extraction-source-grounding.js +3 -3
  195. package/dist/extraction.js +33 -33
  196. package/dist/fallback-llm.js +4 -4
  197. package/dist/harmonic-retrieval.js +1 -1
  198. package/dist/http-retry.d.ts +83 -0
  199. package/dist/http-retry.js +101 -0
  200. package/dist/http-retry.js.map +1 -0
  201. package/dist/importers/index.d.ts +21 -1
  202. package/dist/importers/index.js +3 -1
  203. package/dist/importers/test-utils.d.ts +24 -0
  204. package/dist/importers/test-utils.js +31 -0
  205. package/dist/importers/test-utils.js.map +1 -0
  206. package/dist/index.d.ts +683 -681
  207. package/dist/index.js +177 -166
  208. package/dist/lcm/engine.js +3 -3
  209. package/dist/lcm/index.js +6 -6
  210. package/dist/live-connectors-runner.js +5 -5
  211. package/dist/local-llm.js +3 -3
  212. package/dist/location/index.js +22 -22
  213. package/dist/maintenance/memory-governance.js +20 -20
  214. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +20 -20
  215. package/dist/maintenance/rebuild-memory-projection.js +21 -21
  216. package/dist/mcp-memory-inspector-app.d.ts +1 -1
  217. package/dist/memory-subject-cli.d.ts +1 -1
  218. package/dist/memory-subject.d.ts +1 -1
  219. package/dist/migrate/from-engram.js +2 -2
  220. package/dist/namespaces/migrate.js +21 -21
  221. package/dist/namespaces/search.js +12 -12
  222. package/dist/namespaces/storage.js +20 -20
  223. package/dist/offline-sync-impression-drain.js +6 -6
  224. package/dist/operator-doctor-corpus.js +23 -23
  225. package/dist/operator-toolkit.js +36 -36
  226. package/dist/opik-exporter.js +1 -1
  227. package/dist/orchestration/maintenance.js +31 -31
  228. package/dist/orchestrator.js +141 -140
  229. package/dist/provenance.js +2 -2
  230. package/dist/{public-http-C4i8Opxc.d.ts → public-http-D6d4W8x-.d.ts} +1 -1
  231. package/dist/qmd.js +5 -5
  232. package/dist/recall-planner-llm.js +4 -4
  233. package/dist/reconcile/manifest.js +1 -1
  234. package/dist/resolve-provider-secret.js +2 -2
  235. package/dist/resume-bundles.js +9 -9
  236. package/dist/runtime/env.d.ts +9 -1
  237. package/dist/runtime/env.js +3 -1
  238. package/dist/schemas.d.ts +176 -176
  239. package/dist/sdk-compat.js +1 -1
  240. package/dist/search/factory.js +11 -11
  241. package/dist/search/index.js +16 -16
  242. package/dist/search/lancedb-backend.js +2 -2
  243. package/dist/search/meilisearch-backend.js +2 -2
  244. package/dist/search/orama-backend.js +2 -2
  245. package/dist/semantic-consolidation.js +22 -22
  246. package/dist/semantic-rule-promotion.js +20 -20
  247. package/dist/semantic-rule-verifier.js +20 -20
  248. package/dist/shared-context/manager.d.ts +6 -6
  249. package/dist/shared-context/manager.js +3 -3
  250. package/dist/source-agent-qualifier.js +30 -30
  251. package/dist/standup/build.js +20 -20
  252. package/dist/{state-store-Z3EN56O5.js → state-store-I5HLZTZT.js} +4 -4
  253. package/dist/state-store-I5HLZTZT.js.map +1 -0
  254. package/dist/storage.js +19 -19
  255. package/dist/summarizer.js +7 -7
  256. package/dist/support-passport/index.d.ts +4 -4
  257. package/dist/support-passport/index.js +60 -60
  258. package/dist/tokens.js +2 -2
  259. package/dist/transfer/backup.js +2 -2
  260. package/dist/transfer/capsule-export.js +2 -2
  261. package/dist/transfer/capsule-import.js +2 -2
  262. package/dist/transfer/export-okf.js +21 -21
  263. package/dist/transfer/types.d.ts +78 -78
  264. package/dist/utils/path.js +2 -2
  265. package/dist/verified-recall.js +20 -20
  266. package/dist/who-knows-cli.d.ts +1 -1
  267. package/dist/who-knows-cli.js +21 -21
  268. package/dist/who-knows.d.ts +1 -1
  269. package/dist/who-knows.js +20 -20
  270. package/package.json +22 -2
  271. package/src/config-discovery.test.ts +63 -0
  272. package/src/config-discovery.ts +90 -0
  273. package/src/http-retry.test.ts +281 -0
  274. package/src/http-retry.ts +183 -0
  275. package/src/importers/base.ts +45 -0
  276. package/src/importers/index.test.ts +42 -0
  277. package/src/importers/index.ts +5 -0
  278. package/src/importers/test-utils.ts +44 -0
  279. package/src/index.ts +5 -0
  280. package/src/reconcile/manifest.ts +59 -50
  281. package/src/runtime/env.ts +11 -0
  282. package/dist/chunk-JUC24CTX.js.map +0 -1
  283. package/dist/chunk-TWF35IC6.js.map +0 -1
  284. package/dist/{access-service-DWdY9Mlk.d.ts → access-service-Cv8Rizo0.d.ts} +64 -64
  285. /package/dist/{auto-sync-WNGG2GC2.js.map → auto-sync-NSHLUAQI.js.map} +0 -0
  286. /package/dist/{capsule-crypto-YO5QJ6L3.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
  287. /package/dist/{chunk-GRCREL6Q.js.map → chunk-22JQEBN3.js.map} +0 -0
  288. /package/dist/{chunk-6LLLREDJ.js.map → chunk-2E3CG66I.js.map} +0 -0
  289. /package/dist/{chunk-OO42R444.js.map → chunk-2MFH376S.js.map} +0 -0
  290. /package/dist/{chunk-BXLOS5AJ.js.map → chunk-2NLLXCJG.js.map} +0 -0
  291. /package/dist/{chunk-NXH34IPL.js.map → chunk-353KGBKY.js.map} +0 -0
  292. /package/dist/{chunk-DZD3WGCD.js.map → chunk-3JVLGJCY.js.map} +0 -0
  293. /package/dist/{chunk-W24T5YMW.js.map → chunk-47DEYNMR.js.map} +0 -0
  294. /package/dist/{chunk-QOOBICJF.js.map → chunk-565C6ZFO.js.map} +0 -0
  295. /package/dist/{chunk-ZY4DSWZ5.js.map → chunk-5OOSADXP.js.map} +0 -0
  296. /package/dist/{chunk-EYIEWJNI.js.map → chunk-6KH5NLQS.js.map} +0 -0
  297. /package/dist/{chunk-EMDLM3LW.js.map → chunk-7IRZK6MM.js.map} +0 -0
  298. /package/dist/{chunk-TVVEYCNW.js.map → chunk-7K5Q6COX.js.map} +0 -0
  299. /package/dist/{chunk-6CVNSDCZ.js.map → chunk-7VJXIDOC.js.map} +0 -0
  300. /package/dist/{chunk-SO4IYSGT.js.map → chunk-A5JPK3MZ.js.map} +0 -0
  301. /package/dist/{chunk-IVKIODHO.js.map → chunk-A7XEPMQ6.js.map} +0 -0
  302. /package/dist/{chunk-K6MV3TRQ.js.map → chunk-ADXCCZL2.js.map} +0 -0
  303. /package/dist/{chunk-SJDQ5RSN.js.map → chunk-AOCP6JA7.js.map} +0 -0
  304. /package/dist/{chunk-JBPKEARU.js.map → chunk-AU7Q3LSC.js.map} +0 -0
  305. /package/dist/{chunk-GNMELJGM.js.map → chunk-AYAIV5V5.js.map} +0 -0
  306. /package/dist/{chunk-ND6IQGSZ.js.map → chunk-BA6WOZOT.js.map} +0 -0
  307. /package/dist/{chunk-JI7U6AS3.js.map → chunk-C6FQJ52H.js.map} +0 -0
  308. /package/dist/{chunk-IN673LEP.js.map → chunk-CARRTDKC.js.map} +0 -0
  309. /package/dist/{chunk-6NXSYYGP.js.map → chunk-CBCNKKZD.js.map} +0 -0
  310. /package/dist/{chunk-DXFG2VGN.js.map → chunk-CGC5UQCF.js.map} +0 -0
  311. /package/dist/{chunk-QBH7M7Q4.js.map → chunk-CLALC6ZB.js.map} +0 -0
  312. /package/dist/{chunk-YSSAGB2O.js.map → chunk-CLLPJ6QT.js.map} +0 -0
  313. /package/dist/{chunk-KAXCYM66.js.map → chunk-D5LORF7A.js.map} +0 -0
  314. /package/dist/{chunk-CEH2AFXG.js.map → chunk-DBQWVT2H.js.map} +0 -0
  315. /package/dist/{chunk-XSTNGNJP.js.map → chunk-DCJ3YFIC.js.map} +0 -0
  316. /package/dist/{chunk-MWN6QEI2.js.map → chunk-DITMGZOL.js.map} +0 -0
  317. /package/dist/{chunk-LVE64P5Y.js.map → chunk-E2ZHGBAK.js.map} +0 -0
  318. /package/dist/{chunk-2EKJDQZB.js.map → chunk-EZZV7OQL.js.map} +0 -0
  319. /package/dist/{chunk-N3SS45OW.js.map → chunk-FCSZ4K2X.js.map} +0 -0
  320. /package/dist/{chunk-5ATKSPEQ.js.map → chunk-FGGYSN4P.js.map} +0 -0
  321. /package/dist/{chunk-2Z4GS5E6.js.map → chunk-FHQSPTPZ.js.map} +0 -0
  322. /package/dist/{chunk-3GGUMRS4.js.map → chunk-FJ5B36V2.js.map} +0 -0
  323. /package/dist/{chunk-5IEV3YBY.js.map → chunk-GAYZTUIF.js.map} +0 -0
  324. /package/dist/{chunk-KH6PK4EQ.js.map → chunk-GBYCFJGV.js.map} +0 -0
  325. /package/dist/{chunk-6VF3R3XQ.js.map → chunk-GCRGBE72.js.map} +0 -0
  326. /package/dist/{chunk-6GUG4YNM.js.map → chunk-GGRRF4PZ.js.map} +0 -0
  327. /package/dist/{chunk-ZUNNRGJX.js.map → chunk-GL4EC4RG.js.map} +0 -0
  328. /package/dist/{chunk-UCKYTA2T.js.map → chunk-GTWHVXPA.js.map} +0 -0
  329. /package/dist/{chunk-XSGUMQQQ.js.map → chunk-GVG3JYBI.js.map} +0 -0
  330. /package/dist/{chunk-MY5EDR46.js.map → chunk-GY5WZBA6.js.map} +0 -0
  331. /package/dist/{chunk-3GCK6ONU.js.map → chunk-HK32G473.js.map} +0 -0
  332. /package/dist/{chunk-EWCNCQOU.js.map → chunk-HRICDLBE.js.map} +0 -0
  333. /package/dist/{chunk-46ZPIGWI.js.map → chunk-HY55QQD7.js.map} +0 -0
  334. /package/dist/{chunk-WMLEPWMO.js.map → chunk-I27RSQRR.js.map} +0 -0
  335. /package/dist/{chunk-QIEUU4UK.js.map → chunk-I55KAVET.js.map} +0 -0
  336. /package/dist/{chunk-XM24CDZX.js.map → chunk-IY2FVXM6.js.map} +0 -0
  337. /package/dist/{chunk-CGJV2YIY.js.map → chunk-J5Q2YTOB.js.map} +0 -0
  338. /package/dist/{chunk-N3ZOP7KC.js.map → chunk-JEIXTYVG.js.map} +0 -0
  339. /package/dist/{chunk-ZO2AZIRT.js.map → chunk-JJPRWTOW.js.map} +0 -0
  340. /package/dist/{chunk-ODW5GDFE.js.map → chunk-JT3EB7ZL.js.map} +0 -0
  341. /package/dist/{chunk-OU4K7IFP.js.map → chunk-K5DSKAVF.js.map} +0 -0
  342. /package/dist/{chunk-VDX2J7OX.js.map → chunk-KQAFEZQX.js.map} +0 -0
  343. /package/dist/{chunk-3K7V3HE6.js.map → chunk-KXRX7YC2.js.map} +0 -0
  344. /package/dist/{chunk-DDB3S53L.js.map → chunk-L5JP37BO.js.map} +0 -0
  345. /package/dist/{chunk-227UFSEQ.js.map → chunk-LEPOP46W.js.map} +0 -0
  346. /package/dist/{chunk-54WHLA65.js.map → chunk-LRICZIGN.js.map} +0 -0
  347. /package/dist/{chunk-TVEONGBU.js.map → chunk-MFJBANPX.js.map} +0 -0
  348. /package/dist/{chunk-OB3XMWX5.js.map → chunk-MKWKYHXJ.js.map} +0 -0
  349. /package/dist/{chunk-HMKPFW7R.js.map → chunk-MPAJFFP3.js.map} +0 -0
  350. /package/dist/{chunk-R7RTXEYG.js.map → chunk-MPYD657E.js.map} +0 -0
  351. /package/dist/{chunk-V4ZBR7CW.js.map → chunk-N2CAORTC.js.map} +0 -0
  352. /package/dist/{chunk-NLDVVWCL.js.map → chunk-NDNTNE3S.js.map} +0 -0
  353. /package/dist/{chunk-JJ4XK25O.js.map → chunk-NEFKNR4V.js.map} +0 -0
  354. /package/dist/{chunk-U6N5IBVY.js.map → chunk-NWWXSJX5.js.map} +0 -0
  355. /package/dist/{chunk-QBC33MPY.js.map → chunk-NZXEK3UF.js.map} +0 -0
  356. /package/dist/{chunk-EOQ6FSQP.js.map → chunk-PHNAB54Q.js.map} +0 -0
  357. /package/dist/{chunk-BD7JTBYP.js.map → chunk-PSPABFN2.js.map} +0 -0
  358. /package/dist/{chunk-RBCQVOVJ.js.map → chunk-PV36INNL.js.map} +0 -0
  359. /package/dist/{chunk-E2P7TZTF.js.map → chunk-ROKKIMON.js.map} +0 -0
  360. /package/dist/{chunk-OEYZXDQI.js.map → chunk-RSVEP77Y.js.map} +0 -0
  361. /package/dist/{chunk-SV4Z2S67.js.map → chunk-S5G2LAL7.js.map} +0 -0
  362. /package/dist/{chunk-AQ7SYDVO.js.map → chunk-S65WXHNK.js.map} +0 -0
  363. /package/dist/{chunk-6XL73HQ4.js.map → chunk-SB6PSOP7.js.map} +0 -0
  364. /package/dist/{chunk-JALOAKSZ.js.map → chunk-TLPZ6MKZ.js.map} +0 -0
  365. /package/dist/{chunk-XTJC7CVX.js.map → chunk-TXMAF7FZ.js.map} +0 -0
  366. /package/dist/{chunk-3NYTZE5G.js.map → chunk-UFDMVGUQ.js.map} +0 -0
  367. /package/dist/{chunk-DFEODULB.js.map → chunk-V2HHAAPI.js.map} +0 -0
  368. /package/dist/{chunk-KEF46KL2.js.map → chunk-V6EGNVUT.js.map} +0 -0
  369. /package/dist/{chunk-ESNFSSO4.js.map → chunk-VGXM5B4H.js.map} +0 -0
  370. /package/dist/{chunk-FHYVNJBN.js.map → chunk-VLLEWQIU.js.map} +0 -0
  371. /package/dist/{chunk-MJUCDM3C.js.map → chunk-VLXBE57O.js.map} +0 -0
  372. /package/dist/{chunk-4TKJGOCJ.js.map → chunk-VP67GZ7T.js.map} +0 -0
  373. /package/dist/{chunk-RX3SC4C5.js.map → chunk-VT4MK674.js.map} +0 -0
  374. /package/dist/{chunk-GHTSNGBZ.js.map → chunk-VZWXFXLX.js.map} +0 -0
  375. /package/dist/{chunk-WJHGDE7X.js.map → chunk-W64HKJJM.js.map} +0 -0
  376. /package/dist/{chunk-Y2MZGBOY.js.map → chunk-W7SECYCQ.js.map} +0 -0
  377. /package/dist/{chunk-2L5FSNPC.js.map → chunk-X2NFFBTO.js.map} +0 -0
  378. /package/dist/{chunk-DQEMWVMT.js.map → chunk-X7Y7WX73.js.map} +0 -0
  379. /package/dist/{chunk-EGALNSZ4.js.map → chunk-XU6OEECT.js.map} +0 -0
  380. /package/dist/{chunk-MZLV2OJE.js.map → chunk-XWSMJXIG.js.map} +0 -0
  381. /package/dist/{chunk-THQTFTQS.js.map → chunk-Y3BGA7L5.js.map} +0 -0
  382. /package/dist/{chunk-4FIH6MPS.js.map → chunk-YHLWPYHT.js.map} +0 -0
  383. /package/dist/{chunk-PAZY2ZKP.js.map → chunk-YQAXP5AC.js.map} +0 -0
  384. /package/dist/{chunk-JEC4DVM3.js.map → chunk-YUMDFDUA.js.map} +0 -0
  385. /package/dist/{chunk-7HYPN2GC.js.map → chunk-ZG74PWRW.js.map} +0 -0
  386. /package/dist/{chunk-VVX5PZFS.js.map → chunk-ZHXSOMYH.js.map} +0 -0
  387. /package/dist/{chunk-TNSCIPBQ.js.map → chunk-ZNJSBIP4.js.map} +0 -0
  388. /package/dist/{state-store-Z3EN56O5.js.map → config-discovery.js.map} +0 -0
@@ -4,26 +4,26 @@ import {
4
4
  renderWhoKnows,
5
5
  renderWhoKnowsJson,
6
6
  renderWhoKnowsText
7
- } from "./chunk-U6N5IBVY.js";
8
- import "./chunk-2EKJDQZB.js";
9
- import "./chunk-XSGUMQQQ.js";
7
+ } from "./chunk-NWWXSJX5.js";
8
+ import "./chunk-EZZV7OQL.js";
9
+ import "./chunk-GVG3JYBI.js";
10
10
  import "./chunk-UHVXE24Y.js";
11
11
  import "./chunk-46WM6JX2.js";
12
12
  import "./chunk-D5F7TKMH.js";
13
- import "./chunk-2Z4GS5E6.js";
14
- import "./chunk-6CVNSDCZ.js";
15
- import "./chunk-BD7JTBYP.js";
16
- import "./chunk-OB3XMWX5.js";
17
- import "./chunk-CYEPCZN5.js";
18
- import "./chunk-TNSCIPBQ.js";
13
+ import "./chunk-FHQSPTPZ.js";
14
+ import "./chunk-7VJXIDOC.js";
19
15
  import "./chunk-YQNNHLCG.js";
20
- import "./chunk-4O6WRBGE.js";
21
16
  import "./chunk-6KTXE6A3.js";
17
+ import "./chunk-PSPABFN2.js";
18
+ import "./chunk-MKWKYHXJ.js";
19
+ import "./chunk-CYEPCZN5.js";
20
+ import "./chunk-ZNJSBIP4.js";
22
21
  import "./chunk-GUMZC2BO.js";
23
- import "./chunk-227UFSEQ.js";
24
- import "./chunk-ET356KSB.js";
22
+ import "./chunk-4O6WRBGE.js";
23
+ import "./chunk-LEPOP46W.js";
25
24
  import "./chunk-72A4L5JJ.js";
26
25
  import "./chunk-A7Q43EUZ.js";
26
+ import "./chunk-ET356KSB.js";
27
27
  import "./chunk-S2V7RUCL.js";
28
28
  import "./chunk-SO7SV523.js";
29
29
  import "./chunk-SCU65EZI.js";
@@ -31,11 +31,11 @@ import "./chunk-MRPOZBJC.js";
31
31
  import "./chunk-S2HLHAZ4.js";
32
32
  import "./chunk-DM2T26WE.js";
33
33
  import "./chunk-LDXUBPMO.js";
34
- import "./chunk-XSTNGNJP.js";
34
+ import "./chunk-DCJ3YFIC.js";
35
35
  import "./chunk-AAD2ZS6P.js";
36
36
  import "./chunk-H272ZPQ3.js";
37
- import "./chunk-YXZG5TVN.js";
38
37
  import "./chunk-3ONXXHQO.js";
38
+ import "./chunk-YXZG5TVN.js";
39
39
  import "./chunk-5GINB5LC.js";
40
40
  import "./chunk-3WU7XOFN.js";
41
41
  import "./chunk-G7D6GZ5J.js";
@@ -45,21 +45,21 @@ import "./chunk-RBOJCG4T.js";
45
45
  import "./chunk-R7QY5ZVB.js";
46
46
  import "./chunk-5WITETWU.js";
47
47
  import "./chunk-6CIAGZ6X.js";
48
- import "./chunk-CEH2AFXG.js";
48
+ import "./chunk-DBQWVT2H.js";
49
49
  import "./chunk-JXN77SGO.js";
50
- import "./chunk-IUM3VSHI.js";
51
50
  import "./chunk-ZLQ37WJX.js";
51
+ import "./chunk-IUM3VSHI.js";
52
52
  import "./chunk-3QQTXYZ6.js";
53
53
  import "./chunk-BT7NVCML.js";
54
54
  import "./chunk-C64XATK7.js";
55
55
  import "./chunk-42JKGUFJ.js";
56
- import "./chunk-JALOAKSZ.js";
57
- import "./chunk-QIEUU4UK.js";
56
+ import "./chunk-TLPZ6MKZ.js";
57
+ import "./chunk-I55KAVET.js";
58
58
  import "./chunk-L2EXJQJP.js";
59
59
  import "./chunk-45GF7Y3V.js";
60
60
  import "./chunk-RGMVMVMF.js";
61
61
  import "./chunk-N7RWREIQ.js";
62
- import "./chunk-NXH34IPL.js";
62
+ import "./chunk-353KGBKY.js";
63
63
  import "./chunk-ZIKENA2C.js";
64
64
  import "./chunk-VYCOJKSX.js";
65
65
  import "./chunk-6Q3ZTEF6.js";
@@ -90,8 +90,8 @@ import "./chunk-P7FMDTKL.js";
90
90
  import "./chunk-VUFL7X3H.js";
91
91
  import "./chunk-JUOZ62Y7.js";
92
92
  import "./chunk-O75CRYGF.js";
93
- import "./chunk-EYIEWJNI.js";
94
- import "./chunk-JUC24CTX.js";
93
+ import "./chunk-6KH5NLQS.js";
94
+ import "./chunk-P2QRMMVQ.js";
95
95
  import "./chunk-2Z24E5W2.js";
96
96
  import "./chunk-BTTPKDIL.js";
97
97
  import "./chunk-FF4KLI5W.js";
@@ -1,4 +1,4 @@
1
- export { bA as WHO_KNOWS_AUTHORSHIP_BONUS, bB as WHO_KNOWS_DEFAULT_LIMIT, bC as WHO_KNOWS_MAX_EVIDENCE, bD as WHO_KNOWS_MAX_LIMIT, bE as WHO_KNOWS_MCP_TOOLS, bF as WhoKnowsEntity, bG as WhoKnowsEvidence, bH as WhoKnowsHit, bI as WhoKnowsHttpOutcome, W as WhoKnowsResult, bJ as WhoKnowsStorage, bT as computeWhoKnows, bZ as handleWhoKnowsHttpQuery, c2 as loadWhoKnowsEntities, c9 as tokenizeTopic, ca as validateWhoKnowsInput } from './access-service-DWdY9Mlk.js';
1
+ export { bA as WHO_KNOWS_AUTHORSHIP_BONUS, bB as WHO_KNOWS_DEFAULT_LIMIT, bC as WHO_KNOWS_MAX_EVIDENCE, bD as WHO_KNOWS_MAX_LIMIT, bE as WHO_KNOWS_MCP_TOOLS, bF as WhoKnowsEntity, bG as WhoKnowsEvidence, bH as WhoKnowsHit, bI as WhoKnowsHttpOutcome, W as WhoKnowsResult, bJ as WhoKnowsStorage, bT as computeWhoKnows, bZ as handleWhoKnowsHttpQuery, c2 as loadWhoKnowsEntities, c9 as tokenizeTopic, ca as validateWhoKnowsInput } from './access-service-Cv8Rizo0.js';
2
2
  import './types-YY-eKKU7.js';
3
3
  import './orchestrator-DgyvFfPR.js';
4
4
  import './recall-state.js';
package/dist/who-knows.js CHANGED
@@ -9,25 +9,25 @@ import {
9
9
  loadWhoKnowsEntities,
10
10
  tokenizeTopic,
11
11
  validateWhoKnowsInput
12
- } from "./chunk-2EKJDQZB.js";
13
- import "./chunk-XSGUMQQQ.js";
12
+ } from "./chunk-EZZV7OQL.js";
13
+ import "./chunk-GVG3JYBI.js";
14
14
  import "./chunk-UHVXE24Y.js";
15
15
  import "./chunk-46WM6JX2.js";
16
16
  import "./chunk-D5F7TKMH.js";
17
- import "./chunk-2Z4GS5E6.js";
18
- import "./chunk-6CVNSDCZ.js";
19
- import "./chunk-BD7JTBYP.js";
20
- import "./chunk-OB3XMWX5.js";
21
- import "./chunk-CYEPCZN5.js";
22
- import "./chunk-TNSCIPBQ.js";
17
+ import "./chunk-FHQSPTPZ.js";
18
+ import "./chunk-7VJXIDOC.js";
23
19
  import "./chunk-YQNNHLCG.js";
24
- import "./chunk-4O6WRBGE.js";
25
20
  import "./chunk-6KTXE6A3.js";
21
+ import "./chunk-PSPABFN2.js";
22
+ import "./chunk-MKWKYHXJ.js";
23
+ import "./chunk-CYEPCZN5.js";
24
+ import "./chunk-ZNJSBIP4.js";
26
25
  import "./chunk-GUMZC2BO.js";
27
- import "./chunk-227UFSEQ.js";
28
- import "./chunk-ET356KSB.js";
26
+ import "./chunk-4O6WRBGE.js";
27
+ import "./chunk-LEPOP46W.js";
29
28
  import "./chunk-72A4L5JJ.js";
30
29
  import "./chunk-A7Q43EUZ.js";
30
+ import "./chunk-ET356KSB.js";
31
31
  import "./chunk-S2V7RUCL.js";
32
32
  import "./chunk-SO7SV523.js";
33
33
  import "./chunk-SCU65EZI.js";
@@ -35,11 +35,11 @@ import "./chunk-MRPOZBJC.js";
35
35
  import "./chunk-S2HLHAZ4.js";
36
36
  import "./chunk-DM2T26WE.js";
37
37
  import "./chunk-LDXUBPMO.js";
38
- import "./chunk-XSTNGNJP.js";
38
+ import "./chunk-DCJ3YFIC.js";
39
39
  import "./chunk-AAD2ZS6P.js";
40
40
  import "./chunk-H272ZPQ3.js";
41
- import "./chunk-YXZG5TVN.js";
42
41
  import "./chunk-3ONXXHQO.js";
42
+ import "./chunk-YXZG5TVN.js";
43
43
  import "./chunk-5GINB5LC.js";
44
44
  import "./chunk-3WU7XOFN.js";
45
45
  import "./chunk-G7D6GZ5J.js";
@@ -49,21 +49,21 @@ import "./chunk-RBOJCG4T.js";
49
49
  import "./chunk-R7QY5ZVB.js";
50
50
  import "./chunk-5WITETWU.js";
51
51
  import "./chunk-6CIAGZ6X.js";
52
- import "./chunk-CEH2AFXG.js";
52
+ import "./chunk-DBQWVT2H.js";
53
53
  import "./chunk-JXN77SGO.js";
54
- import "./chunk-IUM3VSHI.js";
55
54
  import "./chunk-ZLQ37WJX.js";
55
+ import "./chunk-IUM3VSHI.js";
56
56
  import "./chunk-3QQTXYZ6.js";
57
57
  import "./chunk-BT7NVCML.js";
58
58
  import "./chunk-C64XATK7.js";
59
59
  import "./chunk-42JKGUFJ.js";
60
- import "./chunk-JALOAKSZ.js";
61
- import "./chunk-QIEUU4UK.js";
60
+ import "./chunk-TLPZ6MKZ.js";
61
+ import "./chunk-I55KAVET.js";
62
62
  import "./chunk-L2EXJQJP.js";
63
63
  import "./chunk-45GF7Y3V.js";
64
64
  import "./chunk-RGMVMVMF.js";
65
65
  import "./chunk-N7RWREIQ.js";
66
- import "./chunk-NXH34IPL.js";
66
+ import "./chunk-353KGBKY.js";
67
67
  import "./chunk-ZIKENA2C.js";
68
68
  import "./chunk-VYCOJKSX.js";
69
69
  import "./chunk-6Q3ZTEF6.js";
@@ -94,8 +94,8 @@ import "./chunk-P7FMDTKL.js";
94
94
  import "./chunk-VUFL7X3H.js";
95
95
  import "./chunk-JUOZ62Y7.js";
96
96
  import "./chunk-O75CRYGF.js";
97
- import "./chunk-EYIEWJNI.js";
98
- import "./chunk-JUC24CTX.js";
97
+ import "./chunk-6KH5NLQS.js";
98
+ import "./chunk-P2QRMMVQ.js";
99
99
  import "./chunk-2Z24E5W2.js";
100
100
  import "./chunk-BTTPKDIL.js";
101
101
  import "./chunk-FF4KLI5W.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.69.27",
3
+ "version": "9.69.29",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,6 +31,16 @@
31
31
  "remnic-source": "./src/salvage-envelope.ts",
32
32
  "import": "./dist/salvage-envelope.js"
33
33
  },
34
+ "./http-retry": {
35
+ "types": "./dist/http-retry.d.ts",
36
+ "remnic-source": "./src/http-retry.ts",
37
+ "import": "./dist/http-retry.js"
38
+ },
39
+ "./http-retry.js": {
40
+ "types": "./dist/http-retry.d.ts",
41
+ "remnic-source": "./src/http-retry.ts",
42
+ "import": "./dist/http-retry.js"
43
+ },
34
44
  "./abort-error.js": {
35
45
  "types": "./dist/abort-error.d.ts",
36
46
  "remnic-source": "./src/abort-error.ts",
@@ -1215,6 +1225,16 @@
1215
1225
  "remnic-source": "./src/importers/index.ts",
1216
1226
  "import": "./dist/importers/index.js"
1217
1227
  },
1228
+ "./importers/test-utils": {
1229
+ "types": "./dist/importers/test-utils.d.ts",
1230
+ "remnic-source": "./src/importers/test-utils.ts",
1231
+ "import": "./dist/importers/test-utils.js"
1232
+ },
1233
+ "./importers/test-utils.js": {
1234
+ "types": "./dist/importers/test-utils.d.ts",
1235
+ "remnic-source": "./src/importers/test-utils.ts",
1236
+ "import": "./dist/importers/test-utils.js"
1237
+ },
1218
1238
  "./intent": {
1219
1239
  "types": "./dist/intent.d.ts",
1220
1240
  "remnic-source": "./src/intent.ts",
@@ -3227,7 +3247,7 @@
3227
3247
  "core"
3228
3248
  ],
3229
3249
  "peerDependencies": {
3230
- "@remnic/coding-graph": "^9.69.27"
3250
+ "@remnic/coding-graph": "^9.69.29"
3231
3251
  },
3232
3252
  "peerDependenciesMeta": {
3233
3253
  "@remnic/coding-graph": {
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Shared config discovery (issue #2796).
3
+ *
4
+ * The server and CLI resolve their config through `discoverConfigPath`; the
5
+ * OpenClaw bridge probes `configPathCandidates` directly. These tests pin the
6
+ * identity the P1 fix restored: for every home-reference form, both surfaces
7
+ * must land on the same file.
8
+ */
9
+ import assert from "node:assert/strict";
10
+ import { mkdtemp, rm } from "node:fs/promises";
11
+ import os from "node:os";
12
+ import path from "node:path";
13
+ import test from "node:test";
14
+
15
+ import { configPathCandidates, discoverConfigPath } from "./config-discovery.js";
16
+
17
+ const ORIGINAL_ENV = {
18
+ HOME: process.env.HOME,
19
+ REMNIC_CONFIG_PATH: process.env.REMNIC_CONFIG_PATH,
20
+ ENGRAM_CONFIG_PATH: process.env.ENGRAM_CONFIG_PATH,
21
+ };
22
+
23
+ function restoreEnv(): void {
24
+ for (const [key, value] of Object.entries(ORIGINAL_ENV)) {
25
+ if (value === undefined) {
26
+ delete process.env[key];
27
+ } else {
28
+ process.env[key] = value;
29
+ }
30
+ }
31
+ }
32
+
33
+ test("env config paths expand every home-reference form on both surfaces", async () => {
34
+ const home = await mkdtemp(path.join(os.tmpdir(), "remnic-discovery-home-"));
35
+ try {
36
+ process.env.HOME = home;
37
+ delete process.env.ENGRAM_CONFIG_PATH;
38
+ const expected = path.join(home, "opt", "remnic.json");
39
+ for (const form of ["$HOME/opt/remnic.json", "${HOME}/opt/remnic.json", "~/opt/remnic.json"]) {
40
+ process.env.REMNIC_CONFIG_PATH = form;
41
+ // The bridge probes candidates[0]; the server/CLI resolver returns the
42
+ // explicit path. Same form in, same file out — a daemon the server can
43
+ // discover is never invisible to the bridge.
44
+ assert.equal(configPathCandidates()[0], expected, `configPathCandidates: ${form}`);
45
+ assert.equal(discoverConfigPath().path, expected, `discoverConfigPath: ${form}`);
46
+ assert.equal(discoverConfigPath().explicit, true, `explicit: ${form}`);
47
+ }
48
+ } finally {
49
+ restoreEnv();
50
+ await rm(home, { recursive: true, force: true });
51
+ }
52
+ });
53
+ test("no env override leaves auto-discovery candidates only", () => {
54
+ try {
55
+ delete process.env.REMNIC_CONFIG_PATH;
56
+ delete process.env.ENGRAM_CONFIG_PATH;
57
+ const candidates = configPathCandidates();
58
+ assert.equal(candidates[0], path.join(process.cwd(), "remnic.config.json"));
59
+ assert.ok(!candidates[0].includes("$HOME"));
60
+ } finally {
61
+ restoreEnv();
62
+ }
63
+ });
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Shared Remnic config-file discovery (issue #2796).
3
+ *
4
+ * One implementation of the candidate order every surface uses: explicit
5
+ * `--config` path, then `REMNIC_CONFIG_PATH`/`ENGRAM_CONFIG_PATH`, then the
6
+ * first existing candidate under cwd, then the home default. The standalone
7
+ * server boots from this order and the CLI resolves `--config`-less commands
8
+ * through it, so the two can never drift onto different files.
9
+ */
10
+
11
+ import fs from "node:fs";
12
+ import path from "node:path";
13
+
14
+ import { readCompatEnv, resolveHomeDir } from "./runtime/env.js";
15
+
16
+ export interface DiscoveredConfigPath {
17
+ path: string;
18
+ explicit: boolean;
19
+ source: string;
20
+ }
21
+
22
+ /**
23
+ * Expand a leading home reference — `~`, `~\`, `$HOME`, or `${HOME}` — to the
24
+ * resolved home directory. Union of the historical server (tilde only) and
25
+ * CLI (tilde plus `$HOME` forms) behaviors; every other path passes through
26
+ * unchanged.
27
+ */
28
+ function expandHomeReference(p: string): string {
29
+ if (p === "~" || p.startsWith("~/") || p.startsWith("~\\")) {
30
+ return resolveHomeDir() + p.slice(1);
31
+ }
32
+ const home = resolveHomeDir();
33
+ if (p === "$HOME" || p.startsWith("$HOME/") || p.startsWith("$HOME\\")) {
34
+ return home + p.slice(5);
35
+ }
36
+ if (p === "${HOME}" || p.startsWith("${HOME}/") || p.startsWith("${HOME}\\")) {
37
+ return home + p.slice(7);
38
+ }
39
+ return p;
40
+ }
41
+
42
+ /**
43
+ * The ordered candidates every probing surface walks: the expanded
44
+ * `REMNIC_CONFIG_PATH`/`ENGRAM_CONFIG_PATH` value (if set), then the cwd
45
+ * files, then the home defaults. The standalone server and the CLI resolve to
46
+ * the single file `discoverConfigPath` picks; the OpenClaw bridge probes each
47
+ * candidate's endpoint. One list, so a daemon the server can discover is never
48
+ * invisible to the bridge.
49
+ */
50
+ export function configPathCandidates(): string[] {
51
+ const envPath = readCompatEnv("REMNIC_CONFIG_PATH", "ENGRAM_CONFIG_PATH");
52
+ return [
53
+ ...(envPath ? [path.resolve(expandHomeReference(envPath))] : []),
54
+ ...autoDiscoveryCandidates(),
55
+ ];
56
+ }
57
+
58
+ function autoDiscoveryCandidates(): string[] {
59
+ const homeDir = resolveHomeDir();
60
+ return [
61
+ path.join(process.cwd(), "remnic.config.json"),
62
+ path.join(process.cwd(), "engram.config.json"),
63
+ path.join(homeDir, ".config", "remnic", "config.json"),
64
+ path.join(homeDir, ".config", "engram", "config.json"),
65
+ ];
66
+ }
67
+
68
+ export function discoverConfigPath(cliPath?: string): DiscoveredConfigPath {
69
+ if (cliPath) {
70
+ return { path: path.resolve(expandHomeReference(cliPath)), explicit: true, source: "--config" };
71
+ }
72
+
73
+ const envPath = readCompatEnv("REMNIC_CONFIG_PATH", "ENGRAM_CONFIG_PATH");
74
+ if (envPath) {
75
+ return {
76
+ path: path.resolve(expandHomeReference(envPath)),
77
+ explicit: true,
78
+ source: "REMNIC_CONFIG_PATH/ENGRAM_CONFIG_PATH",
79
+ };
80
+ }
81
+
82
+ const candidates = autoDiscoveryCandidates();
83
+ for (const candidate of candidates) {
84
+ if (fs.existsSync(candidate) && fs.statSync(candidate).isFile()) {
85
+ return { path: candidate, explicit: false, source: "auto-discovery" };
86
+ }
87
+ }
88
+
89
+ return { path: candidates[2], explicit: false, source: "auto-discovery" };
90
+ }
@@ -0,0 +1,281 @@
1
+ import assert from "node:assert/strict";
2
+ import { test } from "node:test";
3
+
4
+ import {
5
+ ConnectorApiError,
6
+ describeNetworkError,
7
+ discardResponseBody,
8
+ retryAfterHeaderMs,
9
+ retryingFetch,
10
+ stripTrailingSlashes,
11
+ } from "./http-retry.js";
12
+
13
+ function jsonResponse(body: unknown, status = 200, headers: Record<string, string> = {}): Response {
14
+ return new Response(JSON.stringify(body), { status, headers });
15
+ }
16
+
17
+ function scriptFetch(script: Array<() => Response | Promise<Response>>): {
18
+ fetchImpl: typeof fetch;
19
+ calls: () => number;
20
+ } {
21
+ let calls = 0;
22
+ return {
23
+ fetchImpl: (async () => {
24
+ const step = script[Math.min(calls, script.length - 1)];
25
+ calls += 1;
26
+ return step();
27
+ }) as typeof fetch,
28
+ calls: () => calls,
29
+ };
30
+ }
31
+
32
+ test("retries 5xx with exponential backoff, then returns the success response", async () => {
33
+ const sleeps: number[] = [];
34
+ const { fetchImpl, calls } = scriptFetch([
35
+ () => jsonResponse({}, 502),
36
+ () => jsonResponse({}, 503),
37
+ () => jsonResponse({ ok: true }),
38
+ ]);
39
+ const response = await retryingFetch("https://api.example.invalid/v1", {
40
+ init: { method: "GET" },
41
+ fetchImpl,
42
+ sleep: async (ms) => {
43
+ sleeps.push(ms);
44
+ },
45
+ networkError: () => new ConnectorApiError("network"),
46
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
47
+ });
48
+ assert.equal(response.status, 200);
49
+ assert.deepEqual(await response.json(), { ok: true });
50
+ assert.equal(calls(), 3);
51
+ assert.deepEqual(sleeps, [1_000, 2_000]);
52
+ });
53
+
54
+ test("exhausted retries on 5xx throw the vendor retryable error", async () => {
55
+ const sleeps: number[] = [];
56
+ const { fetchImpl, calls } = scriptFetch([() => jsonResponse({}, 503)]);
57
+ await assert.rejects(
58
+ retryingFetch("https://api.example.invalid", {
59
+ fetchImpl,
60
+ sleep: async (ms) => {
61
+ sleeps.push(ms);
62
+ },
63
+ networkError: () => new ConnectorApiError("network"),
64
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
65
+ }),
66
+ (err: unknown) => err instanceof ConnectorApiError && err.status === 503,
67
+ );
68
+ assert.equal(calls(), 4);
69
+ assert.deepEqual(sleeps, [1_000, 2_000, 4_000]);
70
+ });
71
+
72
+ test("exhausted network failures call networkError with attempt count and timeout flag", async () => {
73
+ const pathy = new Error("connect ECONNREFUSED /home/user/.cache/loader.js");
74
+ (pathy as NodeJS.ErrnoException).code = "ECONNREFUSED";
75
+ const { fetchImpl } = scriptFetch([
76
+ () => Promise.reject(pathy),
77
+ ]);
78
+ let seen: { attempts: number; timedOut: boolean } | undefined;
79
+ await assert.rejects(
80
+ retryingFetch("https://api.example.invalid", {
81
+ fetchImpl,
82
+ sleep: async () => {},
83
+ networkError: (err, attempts, context) => {
84
+ seen = { attempts, ...context };
85
+ return new ConnectorApiError(`failed after ${attempts}: ${describeNetworkError(err)}`);
86
+ },
87
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
88
+ }),
89
+ (err: unknown) =>
90
+ err instanceof ConnectorApiError && err.message === "failed after 4: Error (ECONNREFUSED)",
91
+ );
92
+ assert.deepEqual(seen, { attempts: 4, timedOut: false });
93
+ });
94
+
95
+ test("a caller abort mid-flight rethrows the raw error without retrying", async () => {
96
+ const controller = new AbortController();
97
+ let calls = 0;
98
+ const { promise, reject } = Promise.withResolvers<never>();
99
+ const fetchImpl = (async (_url: string | URL | Request, init?: RequestInit) => {
100
+ calls += 1;
101
+ init?.signal?.addEventListener("abort", () =>
102
+ reject(new DOMException("This operation was aborted", "AbortError")),
103
+ );
104
+ return promise;
105
+ }) as typeof fetch;
106
+ const pending = retryingFetch("https://api.example.invalid", {
107
+ fetchImpl,
108
+ signal: controller.signal,
109
+ sleep: async () => {
110
+ throw new Error("must not sleep after a caller abort");
111
+ },
112
+ networkError: () => new ConnectorApiError("network"),
113
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
114
+ });
115
+ const finished = assert.rejects(
116
+ pending,
117
+ (err: unknown) => err instanceof DOMException && err.name === "AbortError",
118
+ );
119
+ controller.abort();
120
+ await finished;
121
+ assert.equal(calls, 1);
122
+ });
123
+
124
+ test("Retry-After seconds and HTTP-date override the exponential backoff, capped", async () => {
125
+ const sleeps: number[] = [];
126
+ const options = {
127
+ sleep: async (ms: number) => {
128
+ sleeps.push(ms);
129
+ },
130
+ networkError: () => new ConnectorApiError("network"),
131
+ retryableError: (r: Response) => new ConnectorApiError(`responded ${r.status}`, r.status),
132
+ };
133
+ {
134
+ const { fetchImpl } = scriptFetch([
135
+ () => jsonResponse({}, 429, { "retry-after": "7" }),
136
+ () => jsonResponse([]),
137
+ ]);
138
+ await retryingFetch("https://api.example.invalid", { fetchImpl, ...options });
139
+ assert.deepEqual(sleeps, [7_000]);
140
+ }
141
+ {
142
+ sleeps.length = 0;
143
+ const { fetchImpl } = scriptFetch([
144
+ () => jsonResponse({}, 429, { "retry-after": "120" }),
145
+ () => jsonResponse([]),
146
+ ]);
147
+ await retryingFetch("https://api.example.invalid", { fetchImpl, ...options });
148
+ assert.deepEqual(sleeps, [30_000], "hostile Retry-After is capped at maxRetryDelayMs");
149
+ }
150
+ {
151
+ sleeps.length = 0;
152
+ const soon = new Date(Date.now() + 3_000).toUTCString();
153
+ const { fetchImpl } = scriptFetch([
154
+ () => jsonResponse({}, 429, { "retry-after": soon }),
155
+ () => jsonResponse([]),
156
+ ]);
157
+ await retryingFetch("https://api.example.invalid", { fetchImpl, ...options });
158
+ assert.ok(sleeps[0] !== undefined && sleeps[0] > 2_000 && sleeps[0] <= 3_000, `HTTP-date delay, got ${sleeps[0]}`);
159
+ }
160
+ });
161
+
162
+ test("a vendor retryAfterMs override wins over the header; null falls back", async () => {
163
+ const sleeps: number[] = [];
164
+ const { fetchImpl } = scriptFetch([
165
+ () => jsonResponse({ retryAfter: "2" }, 429),
166
+ () => jsonResponse([]),
167
+ ]);
168
+ await retryingFetch("https://api.example.invalid", {
169
+ fetchImpl,
170
+ sleep: async (ms) => {
171
+ sleeps.push(ms);
172
+ },
173
+ retryAfterMs: async (response) => {
174
+ const body = (await response.clone().json()) as { retryAfter?: unknown };
175
+ const parsed = Number(body?.retryAfter);
176
+ return Number.isFinite(parsed) && parsed > 0 ? parsed * 1_000 : null;
177
+ },
178
+ networkError: () => new ConnectorApiError("network"),
179
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
180
+ });
181
+ assert.deepEqual(sleeps, [2_000]);
182
+ });
183
+
184
+ test("non-retryable statuses are returned to the caller untouched", async () => {
185
+ const { fetchImpl, calls } = scriptFetch([() => jsonResponse({ error: "nope" }, 404)]);
186
+ const response = await retryingFetch("https://api.example.invalid", {
187
+ fetchImpl,
188
+ sleep: async () => {},
189
+ networkError: () => new ConnectorApiError("network"),
190
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
191
+ });
192
+ assert.equal(response.status, 404);
193
+ assert.equal(calls(), 1);
194
+ });
195
+
196
+ test("buildInit runs once; retries reuse the same init", async () => {
197
+ const tokens: string[] = [];
198
+ const { fetchImpl } = scriptFetch([
199
+ () => jsonResponse({}, 429),
200
+ () => jsonResponse([]),
201
+ ]);
202
+ const seenAuth: (string | null)[] = [];
203
+ const fetchSpy = (async (url: string | URL | Request, init?: RequestInit) => {
204
+ seenAuth.push(new Headers(init?.headers).get("authorization"));
205
+ return fetchImpl(url, init);
206
+ }) as typeof fetch;
207
+ await retryingFetch("https://api.example.invalid", {
208
+ fetchImpl: fetchSpy,
209
+ sleep: async () => {},
210
+ buildInit: async () => {
211
+ const token = `tok-${tokens.length}`;
212
+ tokens.push(token);
213
+ return {
214
+ method: "POST",
215
+ headers: { Authorization: `Bearer ${token}` },
216
+ body: "{}",
217
+ };
218
+ },
219
+ networkError: () => new ConnectorApiError("network"),
220
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
221
+ });
222
+ assert.deepEqual(seenAuth, ["Bearer tok-0", "Bearer tok-0"]);
223
+ assert.equal(tokens.length, 1);
224
+ });
225
+
226
+ test("buildInit failures run once, propagate unwrapped, and never fetch", async () => {
227
+ const failure = new ConnectorApiError("grant revoked: re-authorize");
228
+ let builds = 0;
229
+ const { fetchImpl, calls } = scriptFetch([]);
230
+ await assert.rejects(
231
+ retryingFetch("https://api.example.invalid", {
232
+ fetchImpl,
233
+ sleep: async () => {},
234
+ buildInit: async () => {
235
+ builds += 1;
236
+ throw failure;
237
+ },
238
+ networkError: (err, attempts) =>
239
+ new ConnectorApiError(`network after ${attempts}: ${String(err)}`),
240
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
241
+ }),
242
+ (err: unknown) => err === failure,
243
+ );
244
+ assert.equal(builds, 1);
245
+ assert.equal(calls(), 0);
246
+ });
247
+
248
+ test("backoffBaseMs, maxRetries, and maxRetryDelayMs are honored", async () => {
249
+ const sleeps: number[] = [];
250
+ const { fetchImpl } = scriptFetch([() => jsonResponse({}, 500)]);
251
+ await assert.rejects(
252
+ retryingFetch("https://api.example.invalid", {
253
+ fetchImpl,
254
+ sleep: async (ms) => {
255
+ sleeps.push(ms);
256
+ },
257
+ maxRetries: 2,
258
+ backoffBaseMs: 500,
259
+ maxRetryDelayMs: 8_000,
260
+ networkError: () => new ConnectorApiError("network"),
261
+ retryableError: (r) => new ConnectorApiError(`responded ${r.status}`, r.status),
262
+ }),
263
+ ConnectorApiError,
264
+ );
265
+ assert.deepEqual(sleeps, [500, 1_000]);
266
+ });
267
+
268
+ test("retryAfterHeaderMs parses seconds and rejects garbage", () => {
269
+ assert.equal(retryAfterHeaderMs(jsonResponse({}, 429, { "retry-after": "1.5" }), 30_000), 1_500);
270
+ assert.equal(retryAfterHeaderMs(jsonResponse({}, 429, { "retry-after": "" }), 30_000), undefined);
271
+ assert.equal(retryAfterHeaderMs(jsonResponse({}, 429, { "retry-after": "soon" }), 30_000), undefined);
272
+ assert.equal(retryAfterHeaderMs(jsonResponse({}, 429), 30_000), undefined);
273
+ });
274
+
275
+ test("stripTrailingSlashes and discardResponseBody behave as documented", async () => {
276
+ assert.equal(stripTrailingSlashes("https://api.example.invalid///"), "https://api.example.invalid");
277
+ assert.equal(stripTrailingSlashes("/"), "");
278
+ const response = jsonResponse({ b: 1 }, 429);
279
+ discardResponseBody(response);
280
+ await response.body?.cancel();
281
+ });