@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
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  NamespaceStorageRouter
3
- } from "./chunk-E2P7TZTF.js";
3
+ } from "./chunk-ROKKIMON.js";
4
4
  import {
5
5
  namespaceCollectionName
6
- } from "./chunk-2Z4GS5E6.js";
6
+ } from "./chunk-FHQSPTPZ.js";
7
7
  import {
8
8
  isSafeRouteNamespace
9
9
  } from "./chunk-PCXDUHQH.js";
@@ -213,4 +213,4 @@ export {
213
213
  verifyNamespaces,
214
214
  runNamespaceMigration
215
215
  };
216
- //# sourceMappingURL=chunk-RBCQVOVJ.js.map
216
+ //# sourceMappingURL=chunk-PV36INNL.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-XSGUMQQQ.js";
3
+ } from "./chunk-GVG3JYBI.js";
4
4
  import {
5
5
  MutationSerializer
6
6
  } from "./chunk-FFAZ2XFU.js";
@@ -412,4 +412,4 @@ export {
412
412
  resolveNamespaceStorageRoot,
413
413
  NamespaceStorageRouter
414
414
  };
415
- //# sourceMappingURL=chunk-E2P7TZTF.js.map
415
+ //# sourceMappingURL=chunk-ROKKIMON.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-XSGUMQQQ.js";
3
+ } from "./chunk-GVG3JYBI.js";
4
4
  import {
5
5
  composeMemoryEnvelope
6
6
  } from "./chunk-3QQTXYZ6.js";
@@ -546,4 +546,4 @@ export {
546
546
  setSemanticRulePromotionTestHooks,
547
547
  promoteSemanticRuleFromMemory
548
548
  };
549
- //# sourceMappingURL=chunk-OEYZXDQI.js.map
549
+ //# sourceMappingURL=chunk-RSVEP77Y.js.map
@@ -158,6 +158,20 @@ async function defaultWriteMemoriesToOrchestrator(target, memories) {
158
158
  await target.ingestBulkImportBatch(turns);
159
159
  return { memoriesIngested: memories.length };
160
160
  }
161
+ function defineFileImporterAdapter(definition) {
162
+ return {
163
+ name: definition.name,
164
+ sourceLabel: definition.sourceLabel,
165
+ parse(input, options) {
166
+ return definition.parse(input, {
167
+ ...options?.strict !== void 0 ? { strict: options.strict } : {},
168
+ ...options?.filePath !== void 0 ? { filePath: options.filePath } : {}
169
+ });
170
+ },
171
+ transform: (parsed, options) => definition.transform(parsed, options),
172
+ writeTo: defaultWriteMemoriesToOrchestrator
173
+ };
174
+ }
161
175
 
162
176
  export {
163
177
  DEFAULT_IMPORT_BATCH_SIZE,
@@ -165,6 +179,7 @@ export {
165
179
  validateImportRateLimit,
166
180
  importedMemoryToTurn,
167
181
  runImporter,
168
- defaultWriteMemoriesToOrchestrator
182
+ defaultWriteMemoriesToOrchestrator,
183
+ defineFileImporterAdapter
169
184
  };
170
- //# sourceMappingURL=chunk-FQ7HAWWC.js.map
185
+ //# sourceMappingURL=chunk-RZN4LQ5Y.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/importers/base.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Shared importer base (issue #568)\n// ---------------------------------------------------------------------------\n//\n// The importer adapters defined by issue #568 (`@remnic/import-chatgpt`,\n// `@remnic/import-claude`, `@remnic/import-gemini`, `@remnic/import-mem0`) all\n// follow the same three-step shape:\n//\n// 1. parse(input) — turn a raw file / API payload into a\n// source-specific intermediate structure.\n// 2. transform(parsed) — flatten that structure into a uniform list of\n// `ImportedMemory` records with provenance\n// attached (sourceLabel, importedFromPath,\n// importedAt).\n// 3. writeTo(orchestrator) — hand each memory to the orchestrator via\n// `ingestBulkImportBatch`. Dry-run mode stops\n// after transform() and never calls writeTo().\n//\n// This file defines the shared `ImporterAdapter` interface plus a thin\n// `runImporter` helper that handles batching, dry-run plan reporting, and\n// progress callbacks so every adapter does not reimplement the same loop.\n//\n// The existing lower-level `BulkImportSourceAdapter` (weclone-shaped: produces\n// turn-structured transcripts) remains untouched and continues to drive\n// `runBulkImportCliCommand`. Importer adapters are the higher-level surface\n// intended for the four memory sources in #568 — they emit *memories*\n// (intent-level content) rather than raw conversation turns.\n\nimport { validateImportTurn, type ImportTurn } from \"../bulk-import/types.js\";\n\n/**\n * A single imported memory record with provenance.\n *\n * Every importer MUST attach a truthful `sourceLabel` (e.g. `\"chatgpt\"`,\n * `\"claude\"`, `\"gemini\"`, `\"mem0\"`) and MAY attach the export's origin path or\n * URL in `importedFromPath`. `importedAt` is always set by `runImporter` so\n * adapters do not need to timestamp records themselves.\n */\nexport interface ImportedMemory {\n /**\n * The user-facing memory content. This is the string that will eventually\n * land in the memory store (after extraction / orchestrator processing).\n */\n content: string;\n /**\n * Source-specific identifier for idempotent re-imports. Optional — when\n * present, adapters SHOULD use the source's stable id (e.g. ChatGPT memory\n * uuid); when absent, the orchestrator's own content hashing provides dedup.\n */\n sourceId?: string;\n /**\n * Source-specific timestamp at which the memory was originally created or\n * last updated. ISO 8601. Optional — adapters fall back to `importedAt`\n * when the source does not expose a creation timestamp.\n */\n sourceTimestamp?: string;\n /**\n * Human-readable short label identifying the origin platform\n * (`\"chatgpt\"`, `\"claude\"`, `\"gemini\"`, `\"mem0\"`). Required so the\n * orchestrator can attribute recalled memories correctly.\n */\n sourceLabel: string;\n /**\n * Path to the export file the memory was parsed from, OR the endpoint URL\n * for API-based imports. Optional but strongly recommended so users can\n * trace a memory back to the file they imported.\n */\n importedFromPath?: string;\n /**\n * ISO 8601 timestamp set by `runImporter` immediately before writeTo().\n * Adapters MAY populate this themselves; `runImporter` will fill in the\n * current wall-clock time when absent.\n */\n importedAt?: string;\n /**\n * Adapter-specific raw metadata preserved for debugging / future rehydration\n * (e.g. conversation id, thread id, tags). Must be JSON-serializable;\n * adapters MUST NOT stash functions or circular references here.\n */\n metadata?: Record<string, unknown>;\n}\n\n/**\n * Options threaded through every importer run. Adapters receive this object\n * from `runImporter`; the top-level CLI populates it from `--dry-run`,\n * `--batch-size`, and `--rate-limit` flags.\n */\nexport interface RunImportOptions {\n /**\n * When true, parse + transform but skip writeTo(). `runImporter` prints a\n * summary of what WOULD have been imported and returns early.\n */\n dryRun?: boolean;\n /**\n * Target batch size for writeTo(). Adapters that chunk memories into\n * smaller orchestrator calls should honor this. Defaults to\n * `DEFAULT_IMPORT_BATCH_SIZE` when undefined. Values outside the valid\n * range throw from `validateImportBatchSize`.\n */\n batchSize?: number;\n /**\n * Optional rate limit for API-backed importers (mem0). Expressed as\n * requests-per-second. Adapters that do not hit an external API may ignore\n * this. When provided, `validateImportRateLimit` enforces the positive-\n * finite contract.\n */\n rateLimit?: number;\n /**\n * Invoked after every chunk of memories is processed. `total` is the full\n * count of memories produced by `transform`; `processed` counts memories\n * already ingested (or skipped in dry-run mode). Adapters SHOULD call this\n * incrementally — `runImporter` itself calls it once per batch.\n */\n onProgress?: (progress: ImportProgress) => void;\n}\n\nexport interface ImportProgress {\n processed: number;\n total: number;\n /** Current phase for human-readable logging. */\n phase: \"parse\" | \"transform\" | \"write\" | \"dry-run\";\n}\n\n/**\n * Interface every importer package implements.\n *\n * The three-method surface intentionally mirrors the issue #568 spec:\n *\n * - `parse(input)`: raw payload → intermediate representation.\n * - `transform(parsed)`: intermediate representation → `ImportedMemory[]`.\n * - `writeTo(target, memories, options)`: actually commit to the\n * orchestrator (or whatever target the host provides).\n *\n * Adapters MAY keep `parse` and `transform` separate (e.g. ChatGPT conversions\n * that need to split saved-memories from conversation summaries) or collapse\n * them into a single operation — what matters is that the combined pipeline\n * produces an array of `ImportedMemory` records with correct provenance.\n *\n * `Parsed` is generic so strongly-typed intermediate shapes survive through\n * the adapter's own code without leaking to callers of `runImporter`.\n */\nexport interface ImporterAdapter<Parsed = unknown> {\n /** Short stable name used by `remnic import --adapter <name>`. */\n name: string;\n /** Human-readable label surfaced in CLI output and source attribution. */\n sourceLabel: string;\n\n /**\n * Parse a raw payload (file contents, API response, etc.) into the adapter\n * intermediate representation. Pure — MUST NOT call the orchestrator.\n */\n parse(input: unknown, options?: ImporterParseOptions): Parsed | Promise<Parsed>;\n\n /**\n * Flatten parsed input into an array of importable memories. Pure — MUST\n * NOT call the orchestrator. Provenance fields (`sourceLabel`,\n * `importedFromPath`) should be populated here.\n */\n transform(parsed: Parsed, options?: ImporterTransformOptions): ImportedMemory[] | Promise<ImportedMemory[]>;\n\n /**\n * Commit the transformed memories to the orchestrator (or equivalent\n * target). `runImporter` only invokes this when dryRun is false.\n *\n * Adapters typically call `orchestrator.ingestBulkImportBatch` once per\n * batch after converting `ImportedMemory` records into `ImportTurn` shapes.\n */\n writeTo(\n target: ImporterWriteTarget,\n memories: ImportedMemory[],\n options: RunImportOptions,\n ): Promise<ImporterWriteResult>;\n}\n\n/**\n * Shape of the \"target\" passed to `writeTo`.\n *\n * This is intentionally narrower than the full `Orchestrator` class: importer\n * adapters only need to push `ImportTurn[]` batches and read the active\n * bulk-import namespace. Narrowing keeps test doubles simple (the slice-1\n * integration test uses a pure in-memory mock) and prevents adapters from\n * reaching into orchestrator internals that would make them harder to move\n * between host environments.\n */\nexport interface ImporterWriteTarget {\n ingestBulkImportBatch(\n turns: ImportTurn[],\n options?: { deadlineMs?: number },\n ): Promise<unknown>;\n bulkImportWriteNamespace?(): string;\n}\n\nexport interface ImporterWriteResult {\n memoriesIngested: number;\n /** Optional: adapter-surfaced duplicates or skipped entries. */\n skipped?: number;\n}\n\n/** Options forwarded to `parse`. Adapter-specific; additive by design. */\nexport interface ImporterParseOptions {\n strict?: boolean;\n /** Source path passed through for provenance. */\n filePath?: string;\n /**\n * Requests-per-second throttle, forwarded from the top-level\n * `RunImportOptions.rateLimit`. Only meaningful for API-backed importers\n * (mem0) — file-based adapters ignore it. `runImporter` copies this\n * through automatically so CLI users never have to stash it on\n * `parseOptions` themselves. Cursor review on PR #602.\n */\n rateLimit?: number;\n}\n\n/** Options forwarded to `transform`. */\nexport interface ImporterTransformOptions {\n /** When true, adapters that normally skip bulk conversations should include them. */\n includeConversations?: boolean;\n /** Maximum number of memories to emit. Primarily for tests. */\n maxMemories?: number;\n /** Adapter-specific minimum source text length for importers that filter tiny prompts. */\n minPromptLength?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Validation helpers\n// ---------------------------------------------------------------------------\n\nexport const DEFAULT_IMPORT_BATCH_SIZE = 25;\nconst MIN_IMPORT_BATCH_SIZE = 1;\nconst MAX_IMPORT_BATCH_SIZE = 500;\n\n/**\n * Coerce and validate the caller-supplied batch size. CLAUDE.md rule 14/51:\n * reject invalid CLI input rather than silently defaulting.\n */\nexport function validateImportBatchSize(value: number | undefined): number {\n if (value === undefined) return DEFAULT_IMPORT_BATCH_SIZE;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new Error(\n `batchSize must be a finite number, received ${String(value)}`,\n );\n }\n if (!Number.isInteger(value)) {\n throw new Error(`batchSize must be an integer, received ${value}`);\n }\n if (value < MIN_IMPORT_BATCH_SIZE || value > MAX_IMPORT_BATCH_SIZE) {\n throw new Error(\n `batchSize must be between ${MIN_IMPORT_BATCH_SIZE} and ${MAX_IMPORT_BATCH_SIZE}, ` +\n `received ${value}`,\n );\n }\n return value;\n}\n\n/**\n * Validate the `--rate-limit` (requests per second) value used by API\n * importers. Zero / negative / non-finite values throw — the CLI must reject\n * them rather than silently import at unlimited speed.\n */\nexport function validateImportRateLimit(value: number | undefined): number | undefined {\n if (value === undefined) return undefined;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new Error(\n `rateLimit must be a finite number (requests per second), received ${String(value)}`,\n );\n }\n if (value <= 0) {\n throw new Error(\n `rateLimit must be greater than 0 (requests per second), received ${value}`,\n );\n }\n return value;\n}\n\n// ---------------------------------------------------------------------------\n// Orchestration helpers\n// ---------------------------------------------------------------------------\n\n/**\n * Convert an `ImportedMemory` into an `ImportTurn` suitable for\n * `orchestrator.ingestBulkImportBatch`. The resulting turn is always\n * `role=\"user\"` because every downstream source (saved memories, personal\n * context, mem0 entries) represents a first-person statement rather than an\n * assistant response.\n *\n * Keeps provenance on the turn via `participantName` so the extraction\n * pipeline's transcript renderer labels the speaker with the source platform.\n */\nexport function importedMemoryToTurn(memory: ImportedMemory): ImportTurn {\n const timestamp =\n typeof memory.sourceTimestamp === \"string\" && memory.sourceTimestamp.length > 0\n ? memory.sourceTimestamp\n : (memory.importedAt ?? new Date().toISOString());\n return {\n role: \"user\",\n content: memory.content,\n timestamp,\n participantName: memory.sourceLabel,\n ...(memory.sourceId !== undefined ? { participantId: memory.sourceId } : {}),\n importProvenance: {\n sourceLabel: memory.sourceLabel,\n ...(memory.sourceId !== undefined ? { sourceId: memory.sourceId } : {}),\n ...(memory.sourceTimestamp !== undefined ? { sourceTimestamp: memory.sourceTimestamp } : {}),\n ...(memory.importedFromPath !== undefined ? { importedFromPath: memory.importedFromPath } : {}),\n ...(memory.importedAt !== undefined ? { importedAt: memory.importedAt } : {}),\n ...(memory.metadata !== undefined ? { metadata: memory.metadata } : {}),\n },\n };\n}\n\nfunction invalidImportedMemoryError(\n adapterName: string,\n index: number,\n issues: string[],\n): Error {\n return new Error(\n `Importer '${adapterName}' produced invalid memory at index ${index}: ${issues.join(\"; \")}`,\n );\n}\n\nfunction validateImportedMemory(\n memory: ImportedMemory,\n adapterName: string,\n index: number,\n): void {\n const issues: string[] = [];\n if (typeof memory.sourceLabel !== \"string\" || memory.sourceLabel.trim().length === 0) {\n issues.push(\"sourceLabel must be a non-empty string\");\n }\n issues.push(\n ...validateImportTurn(importedMemoryToTurn(memory), index).map(\n (issue) => issue.message,\n ),\n );\n if (issues.length > 0) {\n throw invalidImportedMemoryError(adapterName, index, issues);\n }\n}\n\nexport interface RunImporterResult {\n adapter: string;\n sourceLabel: string;\n /**\n * Total memories produced by `transform`. In dry-run mode this is the same\n * as the number of memories that WOULD have been written.\n */\n memoriesPlanned: number;\n /**\n * Number of memories actually handed to writeTo(). Always zero in dry-run\n * mode.\n */\n memoriesWritten: number;\n batchesProcessed: number;\n dryRun: boolean;\n /** Mirrors the importedAt stamped on every memory. */\n importedAt: string;\n}\n\n/**\n * Orchestrate `parse → transform → writeTo` for an adapter. This is the\n * default pipeline used by the CLI; adapters are free to implement their own\n * orchestration when they need per-record rate-limiting or streaming parses\n * that would not fit in the \"produce full array before writing\" shape.\n *\n * Mutates the supplied memory records by filling in `importedAt` when the\n * adapter did not set it (CLAUDE.md rule 38: records are written in insertion\n * order to keep the provenance log stable).\n */\nexport async function runImporter<Parsed>(\n adapter: ImporterAdapter<Parsed>,\n input: unknown,\n target: ImporterWriteTarget,\n options: RunImportOptions & {\n parseOptions?: ImporterParseOptions;\n transformOptions?: ImporterTransformOptions;\n } = {},\n): Promise<RunImporterResult> {\n const batchSize = validateImportBatchSize(options.batchSize);\n validateImportRateLimit(options.rateLimit);\n\n const importedAt = new Date().toISOString();\n const dryRun = options.dryRun === true;\n const onProgress = options.onProgress;\n\n // Phase 1 — parse. Forward the validated rateLimit so API-backed adapters\n // (mem0) can throttle their own fetches. Caller-supplied parseOptions\n // takes precedence so tests can still override.\n onProgress?.({ processed: 0, total: 0, phase: \"parse\" });\n const parseOptions: ImporterParseOptions = {\n ...(options.rateLimit !== undefined ? { rateLimit: options.rateLimit } : {}),\n ...(options.parseOptions ?? {}),\n };\n const parsed = await adapter.parse(input, parseOptions);\n\n // Phase 2 — transform\n onProgress?.({ processed: 0, total: 0, phase: \"transform\" });\n const memoriesRaw = await adapter.transform(parsed, options.transformOptions);\n if (!Array.isArray(memoriesRaw)) {\n throw new Error(\n `Importer '${adapter.name}' transform() returned a non-array. ` +\n \"Adapters must produce ImportedMemory[].\",\n );\n }\n const memories = memoriesRaw.map((memory, index) => {\n if (memory === null || typeof memory !== \"object\") {\n throw invalidImportedMemoryError(adapter.name, index, [\n \"memory must be an object\",\n ]);\n }\n const record = memory as ImportedMemory;\n const sourceLabel =\n typeof record.sourceLabel === \"string\" && record.sourceLabel.trim().length > 0\n ? record.sourceLabel.trim()\n : adapter.sourceLabel.trim();\n return {\n ...record,\n sourceLabel,\n importedAt: record.importedAt ?? importedAt,\n };\n });\n memories.forEach((memory, index) => validateImportedMemory(memory, adapter.name, index));\n\n // Phase 3 — write (or dry-run plan)\n if (dryRun) {\n onProgress?.({\n processed: memories.length,\n total: memories.length,\n phase: \"dry-run\",\n });\n return {\n adapter: adapter.name,\n sourceLabel: adapter.sourceLabel,\n memoriesPlanned: memories.length,\n memoriesWritten: 0,\n batchesProcessed: 0,\n dryRun: true,\n importedAt,\n };\n }\n\n let batchesProcessed = 0;\n let memoriesWritten = 0;\n for (let i = 0; i < memories.length; i += batchSize) {\n const batch = memories.slice(i, i + batchSize);\n const result = await adapter.writeTo(target, batch, options);\n memoriesWritten += result.memoriesIngested;\n batchesProcessed += 1;\n onProgress?.({\n processed: Math.min(i + batch.length, memories.length),\n total: memories.length,\n phase: \"write\",\n });\n }\n\n return {\n adapter: adapter.name,\n sourceLabel: adapter.sourceLabel,\n memoriesPlanned: memories.length,\n memoriesWritten,\n batchesProcessed,\n dryRun: false,\n importedAt,\n };\n}\n\n/**\n * Default `writeTo` implementation for importers that want to hand every\n * memory to `orchestrator.ingestBulkImportBatch` without custom routing.\n * Adapters that need per-record rate-limiting or conversation-thread linking\n * are free to implement their own `writeTo`.\n */\nexport async function defaultWriteMemoriesToOrchestrator(\n target: ImporterWriteTarget,\n memories: ImportedMemory[],\n): Promise<ImporterWriteResult> {\n if (memories.length === 0) {\n return { memoriesIngested: 0 };\n }\n memories.forEach((memory, index) =>\n validateImportedMemory(memory, \"defaultWriteMemoriesToOrchestrator\", index),\n );\n const turns = memories.map(importedMemoryToTurn);\n await target.ingestBulkImportBatch(turns);\n return { memoriesIngested: memories.length };\n}\n"],"mappings":";;;;;AAmOO,IAAM,4BAA4B;AACzC,IAAM,wBAAwB;AAC9B,IAAM,wBAAwB;AAMvB,SAAS,wBAAwB,OAAmC;AACzE,MAAI,UAAU,OAAW,QAAO;AAChC,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG;AACxD,UAAM,IAAI;AAAA,MACR,+CAA+C,OAAO,KAAK,CAAC;AAAA,IAC9D;AAAA,EACF;AACA,MAAI,CAAC,OAAO,UAAU,KAAK,GAAG;AAC5B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,SAAS,QAAQ;AAAA,IACjB,aAAa,QAAQ;AAAA,IACrB,iBAAiB,SAAS;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,EACF;AACF;AAQA,eAAsB,mCACpB,QACA,UAC8B;AAC9B,MAAI,SAAS,WAAW,GAAG;AACzB,WAAO,EAAE,kBAAkB,EAAE;AAAA,EAC/B;AACA,WAAS;AAAA,IAAQ,CAAC,QAAQ,UACxB,uBAAuB,QAAQ,sCAAsC,KAAK;AAAA,EAC5E;AACA,QAAM,QAAQ,SAAS,IAAI,oBAAoB;AAC/C,QAAM,OAAO,sBAAsB,KAAK;AACxC,SAAO,EAAE,kBAAkB,SAAS,OAAO;AAC7C;","names":[]}
1
+ {"version":3,"sources":["../src/importers/base.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Shared importer base (issue #568)\n// ---------------------------------------------------------------------------\n//\n// The importer adapters defined by issue #568 (`@remnic/import-chatgpt`,\n// `@remnic/import-claude`, `@remnic/import-gemini`, `@remnic/import-mem0`) all\n// follow the same three-step shape:\n//\n// 1. parse(input) — turn a raw file / API payload into a\n// source-specific intermediate structure.\n// 2. transform(parsed) — flatten that structure into a uniform list of\n// `ImportedMemory` records with provenance\n// attached (sourceLabel, importedFromPath,\n// importedAt).\n// 3. writeTo(orchestrator) — hand each memory to the orchestrator via\n// `ingestBulkImportBatch`. Dry-run mode stops\n// after transform() and never calls writeTo().\n//\n// This file defines the shared `ImporterAdapter` interface plus a thin\n// `runImporter` helper that handles batching, dry-run plan reporting, and\n// progress callbacks so every adapter does not reimplement the same loop.\n//\n// The existing lower-level `BulkImportSourceAdapter` (weclone-shaped: produces\n// turn-structured transcripts) remains untouched and continues to drive\n// `runBulkImportCliCommand`. Importer adapters are the higher-level surface\n// intended for the four memory sources in #568 — they emit *memories*\n// (intent-level content) rather than raw conversation turns.\n\nimport { validateImportTurn, type ImportTurn } from \"../bulk-import/types.js\";\n\n/**\n * A single imported memory record with provenance.\n *\n * Every importer MUST attach a truthful `sourceLabel` (e.g. `\"chatgpt\"`,\n * `\"claude\"`, `\"gemini\"`, `\"mem0\"`) and MAY attach the export's origin path or\n * URL in `importedFromPath`. `importedAt` is always set by `runImporter` so\n * adapters do not need to timestamp records themselves.\n */\nexport interface ImportedMemory {\n /**\n * The user-facing memory content. This is the string that will eventually\n * land in the memory store (after extraction / orchestrator processing).\n */\n content: string;\n /**\n * Source-specific identifier for idempotent re-imports. Optional — when\n * present, adapters SHOULD use the source's stable id (e.g. ChatGPT memory\n * uuid); when absent, the orchestrator's own content hashing provides dedup.\n */\n sourceId?: string;\n /**\n * Source-specific timestamp at which the memory was originally created or\n * last updated. ISO 8601. Optional — adapters fall back to `importedAt`\n * when the source does not expose a creation timestamp.\n */\n sourceTimestamp?: string;\n /**\n * Human-readable short label identifying the origin platform\n * (`\"chatgpt\"`, `\"claude\"`, `\"gemini\"`, `\"mem0\"`). Required so the\n * orchestrator can attribute recalled memories correctly.\n */\n sourceLabel: string;\n /**\n * Path to the export file the memory was parsed from, OR the endpoint URL\n * for API-based imports. Optional but strongly recommended so users can\n * trace a memory back to the file they imported.\n */\n importedFromPath?: string;\n /**\n * ISO 8601 timestamp set by `runImporter` immediately before writeTo().\n * Adapters MAY populate this themselves; `runImporter` will fill in the\n * current wall-clock time when absent.\n */\n importedAt?: string;\n /**\n * Adapter-specific raw metadata preserved for debugging / future rehydration\n * (e.g. conversation id, thread id, tags). Must be JSON-serializable;\n * adapters MUST NOT stash functions or circular references here.\n */\n metadata?: Record<string, unknown>;\n}\n\n/**\n * Options threaded through every importer run. Adapters receive this object\n * from `runImporter`; the top-level CLI populates it from `--dry-run`,\n * `--batch-size`, and `--rate-limit` flags.\n */\nexport interface RunImportOptions {\n /**\n * When true, parse + transform but skip writeTo(). `runImporter` prints a\n * summary of what WOULD have been imported and returns early.\n */\n dryRun?: boolean;\n /**\n * Target batch size for writeTo(). Adapters that chunk memories into\n * smaller orchestrator calls should honor this. Defaults to\n * `DEFAULT_IMPORT_BATCH_SIZE` when undefined. Values outside the valid\n * range throw from `validateImportBatchSize`.\n */\n batchSize?: number;\n /**\n * Optional rate limit for API-backed importers (mem0). Expressed as\n * requests-per-second. Adapters that do not hit an external API may ignore\n * this. When provided, `validateImportRateLimit` enforces the positive-\n * finite contract.\n */\n rateLimit?: number;\n /**\n * Invoked after every chunk of memories is processed. `total` is the full\n * count of memories produced by `transform`; `processed` counts memories\n * already ingested (or skipped in dry-run mode). Adapters SHOULD call this\n * incrementally — `runImporter` itself calls it once per batch.\n */\n onProgress?: (progress: ImportProgress) => void;\n}\n\nexport interface ImportProgress {\n processed: number;\n total: number;\n /** Current phase for human-readable logging. */\n phase: \"parse\" | \"transform\" | \"write\" | \"dry-run\";\n}\n\n/**\n * Interface every importer package implements.\n *\n * The three-method surface intentionally mirrors the issue #568 spec:\n *\n * - `parse(input)`: raw payload → intermediate representation.\n * - `transform(parsed)`: intermediate representation → `ImportedMemory[]`.\n * - `writeTo(target, memories, options)`: actually commit to the\n * orchestrator (or whatever target the host provides).\n *\n * Adapters MAY keep `parse` and `transform` separate (e.g. ChatGPT conversions\n * that need to split saved-memories from conversation summaries) or collapse\n * them into a single operation — what matters is that the combined pipeline\n * produces an array of `ImportedMemory` records with correct provenance.\n *\n * `Parsed` is generic so strongly-typed intermediate shapes survive through\n * the adapter's own code without leaking to callers of `runImporter`.\n */\nexport interface ImporterAdapter<Parsed = unknown> {\n /** Short stable name used by `remnic import --adapter <name>`. */\n name: string;\n /** Human-readable label surfaced in CLI output and source attribution. */\n sourceLabel: string;\n\n /**\n * Parse a raw payload (file contents, API response, etc.) into the adapter\n * intermediate representation. Pure — MUST NOT call the orchestrator.\n */\n parse(input: unknown, options?: ImporterParseOptions): Parsed | Promise<Parsed>;\n\n /**\n * Flatten parsed input into an array of importable memories. Pure — MUST\n * NOT call the orchestrator. Provenance fields (`sourceLabel`,\n * `importedFromPath`) should be populated here.\n */\n transform(parsed: Parsed, options?: ImporterTransformOptions): ImportedMemory[] | Promise<ImportedMemory[]>;\n\n /**\n * Commit the transformed memories to the orchestrator (or equivalent\n * target). `runImporter` only invokes this when dryRun is false.\n *\n * Adapters typically call `orchestrator.ingestBulkImportBatch` once per\n * batch after converting `ImportedMemory` records into `ImportTurn` shapes.\n */\n writeTo(\n target: ImporterWriteTarget,\n memories: ImportedMemory[],\n options: RunImportOptions,\n ): Promise<ImporterWriteResult>;\n}\n\n/**\n * Shape of the \"target\" passed to `writeTo`.\n *\n * This is intentionally narrower than the full `Orchestrator` class: importer\n * adapters only need to push `ImportTurn[]` batches and read the active\n * bulk-import namespace. Narrowing keeps test doubles simple (the slice-1\n * integration test uses a pure in-memory mock) and prevents adapters from\n * reaching into orchestrator internals that would make them harder to move\n * between host environments.\n */\nexport interface ImporterWriteTarget {\n ingestBulkImportBatch(\n turns: ImportTurn[],\n options?: { deadlineMs?: number },\n ): Promise<unknown>;\n bulkImportWriteNamespace?(): string;\n}\n\nexport interface ImporterWriteResult {\n memoriesIngested: number;\n /** Optional: adapter-surfaced duplicates or skipped entries. */\n skipped?: number;\n}\n\n/** Options forwarded to `parse`. Adapter-specific; additive by design. */\nexport interface ImporterParseOptions {\n strict?: boolean;\n /** Source path passed through for provenance. */\n filePath?: string;\n /**\n * Requests-per-second throttle, forwarded from the top-level\n * `RunImportOptions.rateLimit`. Only meaningful for API-backed importers\n * (mem0) — file-based adapters ignore it. `runImporter` copies this\n * through automatically so CLI users never have to stash it on\n * `parseOptions` themselves. Cursor review on PR #602.\n */\n rateLimit?: number;\n}\n\n/** Options forwarded to `transform`. */\nexport interface ImporterTransformOptions {\n /** When true, adapters that normally skip bulk conversations should include them. */\n includeConversations?: boolean;\n /** Maximum number of memories to emit. Primarily for tests. */\n maxMemories?: number;\n /** Adapter-specific minimum source text length for importers that filter tiny prompts. */\n minPromptLength?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Validation helpers\n// ---------------------------------------------------------------------------\n\nexport const DEFAULT_IMPORT_BATCH_SIZE = 25;\nconst MIN_IMPORT_BATCH_SIZE = 1;\nconst MAX_IMPORT_BATCH_SIZE = 500;\n\n/**\n * Coerce and validate the caller-supplied batch size. CLAUDE.md rule 14/51:\n * reject invalid CLI input rather than silently defaulting.\n */\nexport function validateImportBatchSize(value: number | undefined): number {\n if (value === undefined) return DEFAULT_IMPORT_BATCH_SIZE;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new Error(\n `batchSize must be a finite number, received ${String(value)}`,\n );\n }\n if (!Number.isInteger(value)) {\n throw new Error(`batchSize must be an integer, received ${value}`);\n }\n if (value < MIN_IMPORT_BATCH_SIZE || value > MAX_IMPORT_BATCH_SIZE) {\n throw new Error(\n `batchSize must be between ${MIN_IMPORT_BATCH_SIZE} and ${MAX_IMPORT_BATCH_SIZE}, ` +\n `received ${value}`,\n );\n }\n return value;\n}\n\n/**\n * Validate the `--rate-limit` (requests per second) value used by API\n * importers. Zero / negative / non-finite values throw — the CLI must reject\n * them rather than silently import at unlimited speed.\n */\nexport function validateImportRateLimit(value: number | undefined): number | undefined {\n if (value === undefined) return undefined;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new Error(\n `rateLimit must be a finite number (requests per second), received ${String(value)}`,\n );\n }\n if (value <= 0) {\n throw new Error(\n `rateLimit must be greater than 0 (requests per second), received ${value}`,\n );\n }\n return value;\n}\n\n// ---------------------------------------------------------------------------\n// Orchestration helpers\n// ---------------------------------------------------------------------------\n\n/**\n * Convert an `ImportedMemory` into an `ImportTurn` suitable for\n * `orchestrator.ingestBulkImportBatch`. The resulting turn is always\n * `role=\"user\"` because every downstream source (saved memories, personal\n * context, mem0 entries) represents a first-person statement rather than an\n * assistant response.\n *\n * Keeps provenance on the turn via `participantName` so the extraction\n * pipeline's transcript renderer labels the speaker with the source platform.\n */\nexport function importedMemoryToTurn(memory: ImportedMemory): ImportTurn {\n const timestamp =\n typeof memory.sourceTimestamp === \"string\" && memory.sourceTimestamp.length > 0\n ? memory.sourceTimestamp\n : (memory.importedAt ?? new Date().toISOString());\n return {\n role: \"user\",\n content: memory.content,\n timestamp,\n participantName: memory.sourceLabel,\n ...(memory.sourceId !== undefined ? { participantId: memory.sourceId } : {}),\n importProvenance: {\n sourceLabel: memory.sourceLabel,\n ...(memory.sourceId !== undefined ? { sourceId: memory.sourceId } : {}),\n ...(memory.sourceTimestamp !== undefined ? { sourceTimestamp: memory.sourceTimestamp } : {}),\n ...(memory.importedFromPath !== undefined ? { importedFromPath: memory.importedFromPath } : {}),\n ...(memory.importedAt !== undefined ? { importedAt: memory.importedAt } : {}),\n ...(memory.metadata !== undefined ? { metadata: memory.metadata } : {}),\n },\n };\n}\n\nfunction invalidImportedMemoryError(\n adapterName: string,\n index: number,\n issues: string[],\n): Error {\n return new Error(\n `Importer '${adapterName}' produced invalid memory at index ${index}: ${issues.join(\"; \")}`,\n );\n}\n\nfunction validateImportedMemory(\n memory: ImportedMemory,\n adapterName: string,\n index: number,\n): void {\n const issues: string[] = [];\n if (typeof memory.sourceLabel !== \"string\" || memory.sourceLabel.trim().length === 0) {\n issues.push(\"sourceLabel must be a non-empty string\");\n }\n issues.push(\n ...validateImportTurn(importedMemoryToTurn(memory), index).map(\n (issue) => issue.message,\n ),\n );\n if (issues.length > 0) {\n throw invalidImportedMemoryError(adapterName, index, issues);\n }\n}\n\nexport interface RunImporterResult {\n adapter: string;\n sourceLabel: string;\n /**\n * Total memories produced by `transform`. In dry-run mode this is the same\n * as the number of memories that WOULD have been written.\n */\n memoriesPlanned: number;\n /**\n * Number of memories actually handed to writeTo(). Always zero in dry-run\n * mode.\n */\n memoriesWritten: number;\n batchesProcessed: number;\n dryRun: boolean;\n /** Mirrors the importedAt stamped on every memory. */\n importedAt: string;\n}\n\n/**\n * Orchestrate `parse → transform → writeTo` for an adapter. This is the\n * default pipeline used by the CLI; adapters are free to implement their own\n * orchestration when they need per-record rate-limiting or streaming parses\n * that would not fit in the \"produce full array before writing\" shape.\n *\n * Mutates the supplied memory records by filling in `importedAt` when the\n * adapter did not set it (CLAUDE.md rule 38: records are written in insertion\n * order to keep the provenance log stable).\n */\nexport async function runImporter<Parsed>(\n adapter: ImporterAdapter<Parsed>,\n input: unknown,\n target: ImporterWriteTarget,\n options: RunImportOptions & {\n parseOptions?: ImporterParseOptions;\n transformOptions?: ImporterTransformOptions;\n } = {},\n): Promise<RunImporterResult> {\n const batchSize = validateImportBatchSize(options.batchSize);\n validateImportRateLimit(options.rateLimit);\n\n const importedAt = new Date().toISOString();\n const dryRun = options.dryRun === true;\n const onProgress = options.onProgress;\n\n // Phase 1 — parse. Forward the validated rateLimit so API-backed adapters\n // (mem0) can throttle their own fetches. Caller-supplied parseOptions\n // takes precedence so tests can still override.\n onProgress?.({ processed: 0, total: 0, phase: \"parse\" });\n const parseOptions: ImporterParseOptions = {\n ...(options.rateLimit !== undefined ? { rateLimit: options.rateLimit } : {}),\n ...(options.parseOptions ?? {}),\n };\n const parsed = await adapter.parse(input, parseOptions);\n\n // Phase 2 — transform\n onProgress?.({ processed: 0, total: 0, phase: \"transform\" });\n const memoriesRaw = await adapter.transform(parsed, options.transformOptions);\n if (!Array.isArray(memoriesRaw)) {\n throw new Error(\n `Importer '${adapter.name}' transform() returned a non-array. ` +\n \"Adapters must produce ImportedMemory[].\",\n );\n }\n const memories = memoriesRaw.map((memory, index) => {\n if (memory === null || typeof memory !== \"object\") {\n throw invalidImportedMemoryError(adapter.name, index, [\n \"memory must be an object\",\n ]);\n }\n const record = memory as ImportedMemory;\n const sourceLabel =\n typeof record.sourceLabel === \"string\" && record.sourceLabel.trim().length > 0\n ? record.sourceLabel.trim()\n : adapter.sourceLabel.trim();\n return {\n ...record,\n sourceLabel,\n importedAt: record.importedAt ?? importedAt,\n };\n });\n memories.forEach((memory, index) => validateImportedMemory(memory, adapter.name, index));\n\n // Phase 3 — write (or dry-run plan)\n if (dryRun) {\n onProgress?.({\n processed: memories.length,\n total: memories.length,\n phase: \"dry-run\",\n });\n return {\n adapter: adapter.name,\n sourceLabel: adapter.sourceLabel,\n memoriesPlanned: memories.length,\n memoriesWritten: 0,\n batchesProcessed: 0,\n dryRun: true,\n importedAt,\n };\n }\n\n let batchesProcessed = 0;\n let memoriesWritten = 0;\n for (let i = 0; i < memories.length; i += batchSize) {\n const batch = memories.slice(i, i + batchSize);\n const result = await adapter.writeTo(target, batch, options);\n memoriesWritten += result.memoriesIngested;\n batchesProcessed += 1;\n onProgress?.({\n processed: Math.min(i + batch.length, memories.length),\n total: memories.length,\n phase: \"write\",\n });\n }\n\n return {\n adapter: adapter.name,\n sourceLabel: adapter.sourceLabel,\n memoriesPlanned: memories.length,\n memoriesWritten,\n batchesProcessed,\n dryRun: false,\n importedAt,\n };\n}\n\n/**\n * Default `writeTo` implementation for importers that want to hand every\n * memory to `orchestrator.ingestBulkImportBatch` without custom routing.\n * Adapters that need per-record rate-limiting or conversation-thread linking\n * are free to implement their own `writeTo`.\n */\nexport async function defaultWriteMemoriesToOrchestrator(\n target: ImporterWriteTarget,\n memories: ImportedMemory[],\n): Promise<ImporterWriteResult> {\n if (memories.length === 0) {\n return { memoriesIngested: 0 };\n }\n memories.forEach((memory, index) =>\n validateImportedMemory(memory, \"defaultWriteMemoriesToOrchestrator\", index),\n );\n const turns = memories.map(importedMemoryToTurn);\n await target.ingestBulkImportBatch(turns);\n return { memoriesIngested: memories.length };\n}\n\n// ---------------------------------------------------------------------------\n// File-importer factory (issue #2794)\n// ---------------------------------------------------------------------------\n\n/** Parse args `defineFileImporterAdapter` forwards — the keys file adapters use. */\nexport interface FileImporterParseArgs {\n strict?: boolean;\n filePath?: string;\n}\n\n/** Per-package config consumed by `defineFileImporterAdapter`. */\nexport interface FileImporterDefinition<Parsed> {\n name: string;\n sourceLabel: string;\n /** Decode the raw export file. Receives only `strict` / `filePath`. */\n parse(input: unknown, options: FileImporterParseArgs): Parsed | Promise<Parsed>;\n /** Flatten the parsed export into `ImportedMemory[]` with provenance. */\n transform(\n parsed: Parsed,\n options: ImporterTransformOptions | undefined,\n ): ImportedMemory[] | Promise<ImportedMemory[]>;\n}\n\n/**\n * Build the standard file-importer `ImporterAdapter`: parse with the\n * `strict`/`filePath` spread, a package-specific `transform`, and `writeTo`\n * delegating to `defaultWriteMemoriesToOrchestrator` (issue #2794).\n */\nexport function defineFileImporterAdapter<Parsed>(\n definition: FileImporterDefinition<Parsed>,\n): ImporterAdapter<Parsed> {\n return {\n name: definition.name,\n sourceLabel: definition.sourceLabel,\n parse(input, options) {\n return definition.parse(input, {\n ...(options?.strict !== undefined ? { strict: options.strict } : {}),\n ...(options?.filePath !== undefined ? { filePath: options.filePath } : {}),\n });\n },\n transform: (parsed, options) => definition.transform(parsed, options),\n writeTo: defaultWriteMemoriesToOrchestrator,\n };\n}\n"],"mappings":";;;;;AAmOO,IAAM,4BAA4B;AACzC,IAAM,wBAAwB;AAC9B,IAAM,wBAAwB;AAMvB,SAAS,wBAAwB,OAAmC;AACzE,MAAI,UAAU,OAAW,QAAO;AAChC,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG;AACxD,UAAM,IAAI;AAAA,MACR,+CAA+C,OAAO,KAAK,CAAC;AAAA,IAC9D;AAAA,EACF;AACA,MAAI,CAAC,OAAO,UAAU,KAAK,GAAG;AAC5B,UAAM,IAAI,MAAM,0CAA0C,KAAK,EAAE;AAAA,EACnE;AACA,MAAI,QAAQ,yBAAyB,QAAQ,uBAAuB;AAClE,UAAM,IAAI;AAAA,MACR,6BAA6B,qBAAqB,QAAQ,qBAAqB,cACjE,KAAK;AAAA,IACrB;AAAA,EACF;AACA,SAAO;AACT;AAOO,SAAS,wBAAwB,OAA+C;AACrF,MAAI,UAAU,OAAW,QAAO;AAChC,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG;AACxD,UAAM,IAAI;AAAA,MACR,qEAAqE,OAAO,KAAK,CAAC;AAAA,IACpF;AAAA,EACF;AACA,MAAI,SAAS,GAAG;AACd,UAAM,IAAI;AAAA,MACR,oEAAoE,KAAK;AAAA,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;AACzB,SAAO;AAAA,IACL,MAAM,WAAW;AAAA,IACjB,aAAa,WAAW;AAAA,IACxB,MAAM,OAAO,SAAS;AACpB,aAAO,WAAW,MAAM,OAAO;AAAA,QAC7B,GAAI,SAAS,WAAW,SAAY,EAAE,QAAQ,QAAQ,OAAO,IAAI,CAAC;AAAA,QAClE,GAAI,SAAS,aAAa,SAAY,EAAE,UAAU,QAAQ,SAAS,IAAI,CAAC;AAAA,MAC1E,CAAC;AAAA,IACH;AAAA,IACA,WAAW,CAAC,QAAQ,YAAY,WAAW,UAAU,QAAQ,OAAO;AAAA,IACpE,SAAS;AAAA,EACX;AACF;","names":[]}
@@ -1,12 +1,12 @@
1
+ import {
2
+ rankDeepRecallFrontier
3
+ } from "./chunk-HRATODNO.js";
1
4
  import {
2
5
  validateRefineRewrite
3
6
  } from "./chunk-WTWQA7BB.js";
4
7
  import {
5
8
  selectExpandNodeIds
6
9
  } from "./chunk-VZIAVM72.js";
7
- import {
8
- rankDeepRecallFrontier
9
- } from "./chunk-HRATODNO.js";
10
10
  import {
11
11
  extractJsonCandidates,
12
12
  stripCodeFences
@@ -351,4 +351,4 @@ async function runBudgetedDeepRecall(deps, query) {
351
351
  export {
352
352
  runBudgetedDeepRecall
353
353
  };
354
- //# sourceMappingURL=chunk-SV4Z2S67.js.map
354
+ //# sourceMappingURL=chunk-S5G2LAL7.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listNamespaces
3
- } from "./chunk-RBCQVOVJ.js";
3
+ } from "./chunk-PV36INNL.js";
4
4
  import {
5
5
  capabilityAllowsNamespace
6
6
  } from "./chunk-MZWSOLMT.js";
@@ -282,4 +282,4 @@ export {
282
282
  computeServiceCorpusWatermarks,
283
283
  computeServiceCorpusCensus
284
284
  };
285
- //# sourceMappingURL=chunk-AQ7SYDVO.js.map
285
+ //# sourceMappingURL=chunk-S65WXHNK.js.map
@@ -318,4 +318,4 @@ export {
318
318
  readProjectedHarmonicGraph,
319
319
  searchHarmonicRetrieval
320
320
  };
321
- //# sourceMappingURL=chunk-6XL73HQ4.js.map
321
+ //# sourceMappingURL=chunk-SB6PSOP7.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getGatewayRuntimeAuthForModel,
3
3
  resolveProviderApiKey
4
- } from "./chunk-QIEUU4UK.js";
4
+ } from "./chunk-I55KAVET.js";
5
5
  import {
6
6
  buildChatCompletionTemperature,
7
7
  buildChatCompletionTokenLimit,
@@ -18,10 +18,10 @@ import {
18
18
  } from "./chunk-N7RWREIQ.js";
19
19
  import {
20
20
  expandTildePath
21
- } from "./chunk-EYIEWJNI.js";
21
+ } from "./chunk-6KH5NLQS.js";
22
22
  import {
23
23
  resolveHomeDir
24
- } from "./chunk-JUC24CTX.js";
24
+ } from "./chunk-P2QRMMVQ.js";
25
25
  import {
26
26
  log
27
27
  } from "./chunk-3WCASNQZ.js";
@@ -788,4 +788,4 @@ export {
788
788
  fallbackLlmRuntimeContextFromConfig,
789
789
  FallbackLlmClient
790
790
  };
791
- //# sourceMappingURL=chunk-JALOAKSZ.js.map
791
+ //# sourceMappingURL=chunk-TLPZ6MKZ.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  applyExtractionSourceGrounding
3
- } from "./chunk-HMKPFW7R.js";
3
+ } from "./chunk-MPAJFFP3.js";
4
4
  import {
5
5
  CONNECTOR_LABEL_MAX_LENGTH,
6
6
  knownConnectorIds
7
- } from "./chunk-3GCK6ONU.js";
7
+ } from "./chunk-HK32G473.js";
8
8
  import {
9
9
  isValidConnectorId
10
- } from "./chunk-YSSAGB2O.js";
10
+ } from "./chunk-CLLPJ6QT.js";
11
11
  import {
12
12
  deriveSourceConnector
13
- } from "./chunk-FHYVNJBN.js";
13
+ } from "./chunk-VLLEWQIU.js";
14
14
  import {
15
15
  resolvePipelineProcessingCapabilities
16
16
  } from "./chunk-JUOZ62Y7.js";
@@ -108,4 +108,4 @@ export {
108
108
  renderExtractionConversation,
109
109
  applyGroundingWithConnector
110
110
  };
111
- //# sourceMappingURL=chunk-XTJC7CVX.js.map
111
+ //# sourceMappingURL=chunk-TXMAF7FZ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  getOperation,
4
4
  operationRequiresAuthorizedNamespace,
5
5
  operationUsesPrincipalNamespace
6
- } from "./chunk-OU4K7IFP.js";
6
+ } from "./chunk-K5DSKAVF.js";
7
7
  import {
8
8
  assertOperationAuthorizationAllowed
9
9
  } from "./chunk-MZWSOLMT.js";
@@ -60,4 +60,4 @@ export {
60
60
  authorizationProbeNamespaces,
61
61
  authorizationProbeRequiresPrincipalNamespace
62
62
  };
63
- //# sourceMappingURL=chunk-3NYTZE5G.js.map
63
+ //# sourceMappingURL=chunk-UFDMVGUQ.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-JUOZ62Y7.js";
10
10
  import {
11
11
  readEnvVar
12
- } from "./chunk-JUC24CTX.js";
12
+ } from "./chunk-P2QRMMVQ.js";
13
13
  import {
14
14
  log
15
15
  } from "./chunk-3WCASNQZ.js";
@@ -515,4 +515,4 @@ export {
515
515
  EmbeddingProviderUnavailableError,
516
516
  EmbeddingFallback
517
517
  };
518
- //# sourceMappingURL=chunk-DFEODULB.js.map
518
+ //# sourceMappingURL=chunk-V2HHAAPI.js.map
@@ -13,11 +13,11 @@ import {
13
13
  } from "./chunk-C7HJ3NEI.js";
14
14
  import {
15
15
  expandTildePath
16
- } from "./chunk-EYIEWJNI.js";
16
+ } from "./chunk-6KH5NLQS.js";
17
17
  import {
18
18
  readEnvVar,
19
19
  resolveHomeDir
20
- } from "./chunk-JUC24CTX.js";
20
+ } from "./chunk-P2QRMMVQ.js";
21
21
  import {
22
22
  log
23
23
  } from "./chunk-3WCASNQZ.js";
@@ -800,4 +800,4 @@ export {
800
800
  truncateToTokenBudget,
801
801
  describeMemoriesDir
802
802
  };
803
- //# sourceMappingURL=chunk-KEF46KL2.js.map
803
+ //# sourceMappingURL=chunk-V6EGNVUT.js.map
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  combineNamespaces,
17
17
  stableHash
18
- } from "./chunk-QBC33MPY.js";
18
+ } from "./chunk-NZXEK3UF.js";
19
19
 
20
20
  // src/namespaces/scope-profiles.ts
21
21
  import { createHash } from "crypto";
@@ -338,4 +338,4 @@ export {
338
338
  resolveScopeProfilePlan,
339
339
  expandScopeProfileReadNamespaces
340
340
  };
341
- //# sourceMappingURL=chunk-ESNFSSO4.js.map
341
+ //# sourceMappingURL=chunk-VGXM5B4H.js.map
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-OD4FM2U7.js";
11
11
  import {
12
12
  parseQmdExplain
13
- } from "./chunk-CEH2AFXG.js";
13
+ } from "./chunk-DBQWVT2H.js";
14
14
  import {
15
15
  classifyOrigin
16
16
  } from "./chunk-6Q3ZTEF6.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-TBBDFYXW.js";
20
20
  import {
21
21
  resolveScopeProfilePlan
22
- } from "./chunk-ESNFSSO4.js";
22
+ } from "./chunk-VGXM5B4H.js";
23
23
  import {
24
24
  parseFlexibleIsoTimestamp
25
25
  } from "./chunk-P7FMDTKL.js";
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-JUOZ62Y7.js";
34
34
  import {
35
35
  resolveCodingNamespaceOverlay
36
- } from "./chunk-QBC33MPY.js";
36
+ } from "./chunk-NZXEK3UF.js";
37
37
  import {
38
38
  abortError,
39
39
  throwIfAborted
@@ -1712,4 +1712,4 @@ export {
1712
1712
  ExtractionDeadlineError,
1713
1713
  ExtractionRunCoordinator
1714
1714
  };
1715
- //# sourceMappingURL=chunk-FHYVNJBN.js.map
1715
+ //# sourceMappingURL=chunk-VLLEWQIU.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  projectTagProjectId,
3
3
  resolveGitContext
4
- } from "./chunk-QBC33MPY.js";
4
+ } from "./chunk-NZXEK3UF.js";
5
5
 
6
6
  // src/access-coding-context-resolution.ts
7
7
  async function resolveCodingContextFromOptions(options) {
@@ -33,4 +33,4 @@ async function resolveCodingContextFromOptions(options) {
33
33
  export {
34
34
  resolveCodingContextFromOptions
35
35
  };
36
- //# sourceMappingURL=chunk-MJUCDM3C.js.map
36
+ //# sourceMappingURL=chunk-VLXBE57O.js.map
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-7ZNJN5WZ.js";
24
24
  import {
25
25
  compareEntityTimestamps
26
- } from "./chunk-XSGUMQQQ.js";
26
+ } from "./chunk-GVG3JYBI.js";
27
27
  import {
28
28
  normalizeEntityName
29
29
  } from "./chunk-YXZG5TVN.js";
@@ -918,4 +918,4 @@ export {
918
918
  entityIndexVersion,
919
919
  entityRecentTranscriptLookbackHours
920
920
  };
921
- //# sourceMappingURL=chunk-4TKJGOCJ.js.map
921
+ //# sourceMappingURL=chunk-VP67GZ7T.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-7T4TOGMS.js";
4
4
  import {
5
5
  defineOperation
6
- } from "./chunk-OU4K7IFP.js";
6
+ } from "./chunk-K5DSKAVF.js";
7
7
 
8
8
  // src/external-wiki-access.ts
9
9
  import { z } from "zod";
@@ -26,4 +26,4 @@ var externalWikiSearchOperation = defineOperation({
26
26
  export {
27
27
  externalWikiSearchOperation
28
28
  };
29
- //# sourceMappingURL=chunk-RX3SC4C5.js.map
29
+ //# sourceMappingURL=chunk-VT4MK674.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  deepRecallRequestSchema
3
- } from "./chunk-N3ZOP7KC.js";
3
+ } from "./chunk-JEIXTYVG.js";
4
4
  import {
5
5
  EngramAccessInputError
6
6
  } from "./chunk-2Z24E5W2.js";
@@ -39,4 +39,4 @@ async function respondDeepRecall(req, res, respondJson, readJsonBody, service, s
39
39
  export {
40
40
  respondDeepRecall
41
41
  };
42
- //# sourceMappingURL=chunk-GHTSNGBZ.js.map
42
+ //# sourceMappingURL=chunk-VZWXFXLX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-XSGUMQQQ.js";
3
+ } from "./chunk-GVG3JYBI.js";
4
4
  import {
5
5
  normalizeEntityName
6
6
  } from "./chunk-YXZG5TVN.js";
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  readEnvVar,
21
21
  resolveHomeDir
22
- } from "./chunk-JUC24CTX.js";
22
+ } from "./chunk-P2QRMMVQ.js";
23
23
  import {
24
24
  log
25
25
  } from "./chunk-3WCASNQZ.js";
@@ -957,4 +957,4 @@ export {
957
957
  resolveBriefingSaveDir,
958
958
  briefingFilename
959
959
  };
960
- //# sourceMappingURL=chunk-WJHGDE7X.js.map
960
+ //# sourceMappingURL=chunk-W64HKJJM.js.map
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-H3FZVNRN.js";
14
14
  import {
15
15
  ExtractionDeadlineError
16
- } from "./chunk-FHYVNJBN.js";
16
+ } from "./chunk-VLLEWQIU.js";
17
17
  import {
18
18
  resolvePrincipal
19
19
  } from "./chunk-MRV7VSQK.js";
@@ -798,4 +798,4 @@ var SmartBuffer = class {
798
798
  export {
799
799
  SmartBuffer
800
800
  };
801
- //# sourceMappingURL=chunk-Y2MZGBOY.js.map
801
+ //# sourceMappingURL=chunk-W7SECYCQ.js.map
@@ -1,3 +1,9 @@
1
+ import {
2
+ LcmWorkQueue
3
+ } from "./chunk-TPDBFYEG.js";
4
+ import {
5
+ assembleCompressedHistoryWithTrace
6
+ } from "./chunk-UXPUUL3G.js";
1
7
  import {
2
8
  ensureLcmStateDir,
3
9
  openLcmDatabase
@@ -11,12 +17,6 @@ import {
11
17
  import {
12
18
  LcmDag
13
19
  } from "./chunk-7N4KAIGN.js";
14
- import {
15
- LcmWorkQueue
16
- } from "./chunk-TPDBFYEG.js";
17
- import {
18
- assembleCompressedHistoryWithTrace
19
- } from "./chunk-UXPUUL3G.js";
20
20
  import {
21
21
  nativeBindingRecoveryHint
22
22
  } from "./chunk-LD72P4YS.js";
@@ -573,4 +573,4 @@ export {
573
573
  extractLcmConfig,
574
574
  LcmEngine
575
575
  };
576
- //# sourceMappingURL=chunk-2L5FSNPC.js.map
576
+ //# sourceMappingURL=chunk-X2NFFBTO.js.map
@@ -246,4 +246,4 @@ export {
246
246
  decryptCapsuleFile,
247
247
  decryptCapsuleFileInMemory
248
248
  };
249
- //# sourceMappingURL=chunk-DQEMWVMT.js.map
249
+ //# sourceMappingURL=chunk-X7Y7WX73.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  expandScopeProfileReadNamespaces,
3
3
  resolveScopeProfilePlan
4
- } from "./chunk-ESNFSSO4.js";
4
+ } from "./chunk-VGXM5B4H.js";
5
5
  import {
6
6
  canReadNamespace,
7
7
  canWriteNamespace,
@@ -22,7 +22,7 @@ import {
22
22
  combineNamespaces,
23
23
  lcmReadSessionIdsForNamespaces,
24
24
  resolveCodingNamespaceOverlay
25
- } from "./chunk-QBC33MPY.js";
25
+ } from "./chunk-NZXEK3UF.js";
26
26
 
27
27
  // src/scopes/scope-plan.ts
28
28
  import path from "path";
@@ -204,4 +204,4 @@ export {
204
204
  resolveWritableNamespaceValue,
205
205
  resolveScopedWritableNamespaceValue
206
206
  };
207
- //# sourceMappingURL=chunk-EGALNSZ4.js.map
207
+ //# sourceMappingURL=chunk-XU6OEECT.js.map