@remnic/core 1.0.1 → 1.0.3

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 (347) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +48 -0
  3. package/dist/access-cli.d.ts +13 -3
  4. package/dist/access-cli.js +90 -75
  5. package/dist/access-cli.js.map +1 -1
  6. package/dist/access-http.d.ts +10 -3
  7. package/dist/access-http.js +25 -18
  8. package/dist/access-mcp.d.ts +30 -3
  9. package/dist/access-mcp.js +16 -1
  10. package/dist/access-schema.d.ts +46 -46
  11. package/dist/access-schema.js +1 -1
  12. package/dist/access-service.d.ts +65 -4
  13. package/dist/access-service.js +21 -15
  14. package/dist/active-memory-bridge.d.ts +66 -0
  15. package/dist/active-memory-bridge.js +11 -0
  16. package/dist/active-recall.d.ts +96 -0
  17. package/dist/active-recall.js +308 -0
  18. package/dist/active-recall.js.map +1 -0
  19. package/dist/behavior-learner.js +1 -1
  20. package/dist/bootstrap.d.ts +6 -3
  21. package/dist/bootstrap.js +2 -2
  22. package/dist/boxes.js +2 -2
  23. package/dist/briefing.d.ts +169 -0
  24. package/dist/briefing.js +52 -0
  25. package/dist/briefing.js.map +1 -0
  26. package/dist/buffer.d.ts +19 -5
  27. package/dist/buffer.js +2 -2
  28. package/dist/calibration.js +6 -6
  29. package/dist/causal-behavior.js +5 -5
  30. package/dist/causal-chain.js +3 -3
  31. package/dist/causal-consolidation.d.ts +22 -2
  32. package/dist/causal-consolidation.js +36 -9
  33. package/dist/causal-consolidation.js.map +1 -1
  34. package/dist/causal-retrieval.js +6 -6
  35. package/dist/causal-trajectory-graph.js +1 -1
  36. package/dist/causal-trajectory.d.ts +14 -1
  37. package/dist/causal-trajectory.js +5 -1
  38. package/dist/{chunk-KWBU5S5U.js → chunk-2ODBA7MQ.js} +9 -3
  39. package/dist/chunk-2ODBA7MQ.js.map +1 -0
  40. package/dist/{chunk-6UJQNRIO.js → chunk-2VFW5K5U.js} +93 -36
  41. package/dist/chunk-2VFW5K5U.js.map +1 -0
  42. package/dist/chunk-3PG3H5TD.js +7 -0
  43. package/dist/chunk-3PG3H5TD.js.map +1 -0
  44. package/dist/{chunk-NTTLPF7F.js → chunk-3QFQGRHO.js} +5 -5
  45. package/dist/chunk-4DJQYKMN.js +187 -0
  46. package/dist/chunk-4DJQYKMN.js.map +1 -0
  47. package/dist/chunk-4KAN3GZ3.js +225 -0
  48. package/dist/chunk-4KAN3GZ3.js.map +1 -0
  49. package/dist/{chunk-ORZMT74A.js → chunk-4NRAJUDS.js} +11 -1
  50. package/dist/chunk-4NRAJUDS.js.map +1 -0
  51. package/dist/{chunk-B7LOFDVE.js → chunk-4WMCPJWX.js} +8 -3
  52. package/dist/chunk-4WMCPJWX.js.map +1 -0
  53. package/dist/{chunk-G3AG3KZN.js → chunk-5IZL4DCV.js} +2 -2
  54. package/dist/{chunk-BRK4ODMI.js → chunk-5NPGSAVB.js} +2 -2
  55. package/dist/chunk-6MKAMLQL.js +16 -0
  56. package/dist/chunk-6MKAMLQL.js.map +1 -0
  57. package/dist/{chunk-ESSMF2FR.js → chunk-6PFRXT4K.js} +15 -6
  58. package/dist/chunk-6PFRXT4K.js.map +1 -0
  59. package/dist/chunk-6ZH4TU6I.js +245 -0
  60. package/dist/chunk-6ZH4TU6I.js.map +1 -0
  61. package/dist/{chunk-V4YC4LUK.js → chunk-74JR4N5J.js} +175 -63
  62. package/dist/chunk-74JR4N5J.js.map +1 -0
  63. package/dist/{chunk-L5RPWGFK.js → chunk-7DHTMOND.js} +2 -2
  64. package/dist/{chunk-TVVVQQAK.js → chunk-7PA4OZEU.js} +53 -11
  65. package/dist/chunk-7PA4OZEU.js.map +1 -0
  66. package/dist/{chunk-Q6FETXJA.js → chunk-7SEAZFFB.js} +2 -2
  67. package/dist/chunk-ALXMCZEU.js +332 -0
  68. package/dist/chunk-ALXMCZEU.js.map +1 -0
  69. package/dist/{chunk-QANCTXQF.js → chunk-AYPYCLR7.js} +3 -3
  70. package/dist/{chunk-WWIQTB2Y.js → chunk-BKQJBXXX.js} +9 -2
  71. package/dist/chunk-BKQJBXXX.js.map +1 -0
  72. package/dist/{chunk-LP47L3ZX.js → chunk-BTY5RRRF.js} +7 -7
  73. package/dist/{chunk-SCHEKPYH.js → chunk-C2EFFULQ.js} +1 -1
  74. package/dist/{chunk-GJR6D6KC.js → chunk-D654IBA6.js} +2 -2
  75. package/dist/{chunk-UV2FO7J4.js → chunk-E6K4NIEU.js} +2 -2
  76. package/dist/{chunk-T4WRIV2C.js → chunk-EABGC2TL.js} +2 -2
  77. package/dist/chunk-ECKDIK5F.js +813 -0
  78. package/dist/chunk-ECKDIK5F.js.map +1 -0
  79. package/dist/chunk-EJI5XIBB.js +232 -0
  80. package/dist/chunk-EJI5XIBB.js.map +1 -0
  81. package/dist/{chunk-ONRU4L2N.js → chunk-FEMOX5AD.js} +2 -2
  82. package/dist/{chunk-IFFFR3MR.js → chunk-FSFEQI74.js} +3 -3
  83. package/dist/chunk-G4SK7DSQ.js +121 -0
  84. package/dist/chunk-G4SK7DSQ.js.map +1 -0
  85. package/dist/{chunk-UIYZ5T3I.js → chunk-GJQPH5G3.js} +8 -8
  86. package/dist/{chunk-2PO5ZRKV.js → chunk-GZCUW5IC.js} +16 -3
  87. package/dist/chunk-GZCUW5IC.js.map +1 -0
  88. package/dist/{chunk-IZME7KW2.js → chunk-HITJFT7E.js} +24 -10
  89. package/dist/{chunk-IZME7KW2.js.map → chunk-HITJFT7E.js.map} +1 -1
  90. package/dist/chunk-IQT3XTKW.js +121 -0
  91. package/dist/chunk-IQT3XTKW.js.map +1 -0
  92. package/dist/{chunk-BDFZXRSO.js → chunk-J4IYOZZ5.js} +15 -2
  93. package/dist/chunk-J4IYOZZ5.js.map +1 -0
  94. package/dist/{chunk-ZKYI7UVO.js → chunk-JR4ZC3G4.js} +2 -2
  95. package/dist/{chunk-UCYSTFZR.js → chunk-JRNQ3RNA.js} +2 -2
  96. package/dist/{chunk-UYSKNO6E.js → chunk-JROGC36Y.js} +15 -4
  97. package/dist/chunk-JROGC36Y.js.map +1 -0
  98. package/dist/{chunk-GPGBSNKM.js → chunk-K4FLSOR5.js} +2 -2
  99. package/dist/{chunk-M5ZBBBJI.js → chunk-KEG4GNGI.js} +2 -2
  100. package/dist/chunk-KVE7R4CG.js +320 -0
  101. package/dist/chunk-KVE7R4CG.js.map +1 -0
  102. package/dist/{chunk-L7WO3MZ4.js → chunk-KWP7T3DP.js} +2 -2
  103. package/dist/chunk-LAYN4LDC.js +267 -0
  104. package/dist/chunk-LAYN4LDC.js.map +1 -0
  105. package/dist/{chunk-PGK3VUHN.js → chunk-MTLYEMJB.js} +3 -2
  106. package/dist/chunk-MTLYEMJB.js.map +1 -0
  107. package/dist/{chunk-J47FNDR7.js → chunk-MYQWXITD.js} +7 -7
  108. package/dist/{chunk-YNI4S5WT.js → chunk-N53K2EXC.js} +2 -2
  109. package/dist/{chunk-763GUIOU.js → chunk-NBNN5GOB.js} +2 -2
  110. package/dist/{chunk-CXWFUJR2.js → chunk-NSB3WSYS.js} +125 -6
  111. package/dist/chunk-NSB3WSYS.js.map +1 -0
  112. package/dist/{chunk-KL4CP4SB.js → chunk-O5ETUNBT.js} +17 -5
  113. package/dist/chunk-O5ETUNBT.js.map +1 -0
  114. package/dist/{chunk-OOSWAUYB.js → chunk-ODWDQNRE.js} +2 -2
  115. package/dist/{chunk-ISY75RLM.js → chunk-OJFGVJS6.js} +288 -7
  116. package/dist/chunk-OJFGVJS6.js.map +1 -0
  117. package/dist/{chunk-HLBYLYRD.js → chunk-PAORGQRI.js} +70 -13
  118. package/dist/chunk-PAORGQRI.js.map +1 -0
  119. package/dist/{chunk-ZJLY4QSU.js → chunk-PMB3WGDL.js} +69 -6
  120. package/dist/chunk-PMB3WGDL.js.map +1 -0
  121. package/dist/{chunk-J3BT33K7.js → chunk-POBPGDWI.js} +5 -5
  122. package/dist/{chunk-QWUUMMIK.js → chunk-POMSFKTB.js} +1351 -76
  123. package/dist/chunk-POMSFKTB.js.map +1 -0
  124. package/dist/{chunk-OTAVQCSF.js → chunk-PYXS46O7.js} +2 -2
  125. package/dist/chunk-QDW3E4RD.js +108 -0
  126. package/dist/chunk-QDW3E4RD.js.map +1 -0
  127. package/dist/{chunk-YNCQ7E4M.js → chunk-QDYXG4CS.js} +4 -3
  128. package/dist/chunk-QDYXG4CS.js.map +1 -0
  129. package/dist/{chunk-XUHI52HK.js → chunk-QKAH5B6E.js} +4 -4
  130. package/dist/{chunk-HLXVTBF3.js → chunk-QNJMBKFK.js} +3 -2
  131. package/dist/chunk-QNJMBKFK.js.map +1 -0
  132. package/dist/chunk-RCICHSHL.js +789 -0
  133. package/dist/chunk-RCICHSHL.js.map +1 -0
  134. package/dist/{chunk-HG2NKWR2.js → chunk-S4LX5EBI.js} +2 -2
  135. package/dist/{chunk-4A24LIM2.js → chunk-S75M5ZRK.js} +2 -2
  136. package/dist/{chunk-QCCCQT3O.js → chunk-TBBDFYXW.js} +2 -2
  137. package/dist/chunk-TBBDFYXW.js.map +1 -0
  138. package/dist/{chunk-U4PV25RD.js → chunk-U2IQTSBY.js} +1 -1
  139. package/dist/chunk-U2IQTSBY.js.map +1 -0
  140. package/dist/chunk-U66YHYC7.js +31 -0
  141. package/dist/chunk-U66YHYC7.js.map +1 -0
  142. package/dist/{chunk-MWGVGUIS.js → chunk-UEYA6UC7.js} +36 -4
  143. package/dist/chunk-UEYA6UC7.js.map +1 -0
  144. package/dist/{chunk-MDDAA2AO.js → chunk-UPMD5XND.js} +2 -2
  145. package/dist/{chunk-M5KEYE5E.js → chunk-URB2WSKZ.js} +2 -2
  146. package/dist/chunk-UVJFDP7P.js +202 -0
  147. package/dist/chunk-UVJFDP7P.js.map +1 -0
  148. package/dist/{chunk-QY2BHY5O.js → chunk-V7XCAHIB.js} +265 -25
  149. package/dist/chunk-V7XCAHIB.js.map +1 -0
  150. package/dist/chunk-W6SL7OFG.js +180 -0
  151. package/dist/chunk-W6SL7OFG.js.map +1 -0
  152. package/dist/{chunk-QDOSNLB4.js → chunk-X4WESCKA.js} +17 -15
  153. package/dist/chunk-X4WESCKA.js.map +1 -0
  154. package/dist/{chunk-OTFNI3OO.js → chunk-XMGSSBFX.js} +1738 -383
  155. package/dist/chunk-XMGSSBFX.js.map +1 -0
  156. package/dist/chunk-YDBIWGNI.js +298 -0
  157. package/dist/chunk-YDBIWGNI.js.map +1 -0
  158. package/dist/chunk-YFYL2SIJ.js +7857 -0
  159. package/dist/chunk-YFYL2SIJ.js.map +1 -0
  160. package/dist/chunking.js +1 -1
  161. package/dist/citations.d.ts +67 -0
  162. package/dist/citations.js +13 -0
  163. package/dist/citations.js.map +1 -0
  164. package/dist/cli-DwIBnp2g.d.ts +1240 -0
  165. package/dist/cli.d.ts +31 -1147
  166. package/dist/cli.js +149 -7092
  167. package/dist/cli.js.map +1 -1
  168. package/dist/codex-materialize-CQlLTzke.d.ts +139 -0
  169. package/dist/codex-thread-key.d.ts +3 -0
  170. package/dist/codex-thread-key.js +7 -0
  171. package/dist/codex-thread-key.js.map +1 -0
  172. package/dist/config.js +3 -2
  173. package/dist/connectors/codex/instructions.md +160 -0
  174. package/dist/connectors/codex/resources/namespace-cheatsheet.md +48 -0
  175. package/dist/day-summary.d.ts +7 -2
  176. package/dist/day-summary.js +5 -2
  177. package/dist/embedding-fallback.d.ts +96 -2
  178. package/dist/embedding-fallback.js +6 -4
  179. package/dist/{engine-2A6J4XEX.js → engine-X7X3AAG3.js} +10 -7
  180. package/dist/engine-X7X3AAG3.js.map +1 -0
  181. package/dist/entity-retrieval.d.ts +3 -2
  182. package/dist/entity-retrieval.js +10 -7
  183. package/dist/entity-schema.d.ts +11 -0
  184. package/dist/entity-schema.js +19 -0
  185. package/dist/entity-schema.js.map +1 -0
  186. package/dist/explicit-capture.d.ts +6 -3
  187. package/dist/explicit-capture.js +2 -2
  188. package/dist/extraction-judge.d.ts +66 -0
  189. package/dist/extraction-judge.js +18 -0
  190. package/dist/extraction-judge.js.map +1 -0
  191. package/dist/extraction.d.ts +1 -0
  192. package/dist/extraction.js +12 -10
  193. package/dist/fallback-llm.js +4 -4
  194. package/dist/graph.js +1 -1
  195. package/dist/importance.d.ts +11 -1
  196. package/dist/importance.js +3 -1
  197. package/dist/index.d.ts +1140 -8
  198. package/dist/index.js +3350 -333
  199. package/dist/index.js.map +1 -1
  200. package/dist/intent.d.ts +2 -1
  201. package/dist/intent.js +3 -1
  202. package/dist/lifecycle.js +1 -1
  203. package/dist/local-llm.js +2 -2
  204. package/dist/logger.d.ts +1 -1
  205. package/dist/logger.js +1 -1
  206. package/dist/memory-cache.d.ts +2 -2
  207. package/dist/memory-cache.js +1 -1
  208. package/dist/{memory-projection-store-NxMkbocT.d.ts → memory-projection-store-DeSXPh1j.d.ts} +1 -1
  209. package/dist/memory-projection-store.d.ts +1 -1
  210. package/dist/model-registry.js +2 -2
  211. package/dist/models-json.js +2 -2
  212. package/dist/native-knowledge.js +2 -2
  213. package/dist/negative.js +2 -2
  214. package/dist/operator-toolkit.js +20 -16
  215. package/dist/{orchestrator-CIvLFHx3.d.ts → orchestrator-B9kwlCep.d.ts} +254 -9
  216. package/dist/orchestrator.d.ts +6 -3
  217. package/dist/orchestrator.js +70 -58
  218. package/dist/page-versioning.d.ts +77 -0
  219. package/dist/page-versioning.js +15 -0
  220. package/dist/page-versioning.js.map +1 -0
  221. package/dist/plugin-id.d.ts +37 -0
  222. package/dist/plugin-id.js +11 -0
  223. package/dist/plugin-id.js.map +1 -0
  224. package/dist/policy-runtime.js +2 -2
  225. package/dist/profiling.js +2 -2
  226. package/dist/qmd.d.ts +5 -2
  227. package/dist/qmd.js +3 -3
  228. package/dist/recall-audit.d.ts +20 -0
  229. package/dist/recall-audit.js +50 -0
  230. package/dist/recall-audit.js.map +1 -0
  231. package/dist/recall-mmr.d.ts +152 -0
  232. package/dist/recall-mmr.js +17 -0
  233. package/dist/recall-mmr.js.map +1 -0
  234. package/dist/recall-qos.js +2 -2
  235. package/dist/recall-state.js +2 -2
  236. package/dist/relevance.js +2 -2
  237. package/dist/resolve-provider-secret.js +2 -2
  238. package/dist/resume-bundles.js +5 -4
  239. package/dist/retrieval-agents.js +2 -2
  240. package/dist/retrieval.js +2 -2
  241. package/dist/schemas.d.ts +422 -64
  242. package/dist/schemas.js +3 -1
  243. package/dist/sdk-compat.d.ts +2 -0
  244. package/dist/sdk-compat.js +6 -3
  245. package/dist/sdk-compat.js.map +1 -1
  246. package/dist/semantic-chunking.d.ts +87 -0
  247. package/dist/semantic-chunking.js +20 -0
  248. package/dist/semantic-chunking.js.map +1 -0
  249. package/dist/semantic-consolidation-DrvSYRdB.d.ts +119 -0
  250. package/dist/semantic-consolidation.d.ts +4 -42
  251. package/dist/semantic-consolidation.js +23 -2
  252. package/dist/semantic-rule-promotion.js +9 -6
  253. package/dist/semantic-rule-verifier.js +10 -7
  254. package/dist/session-observer-state.js +2 -2
  255. package/dist/session-toggles.d.ts +22 -0
  256. package/dist/session-toggles.js +116 -0
  257. package/dist/session-toggles.js.map +1 -0
  258. package/dist/skills-registry.d.ts +47 -0
  259. package/dist/skills-registry.js +48 -0
  260. package/dist/skills-registry.js.map +1 -0
  261. package/dist/source-attribution.d.ts +169 -0
  262. package/dist/source-attribution.js +27 -0
  263. package/dist/source-attribution.js.map +1 -0
  264. package/dist/storage.d.ts +171 -10
  265. package/dist/storage.js +16 -5
  266. package/dist/summarizer.js +7 -7
  267. package/dist/temporal-supersession.d.ts +127 -0
  268. package/dist/temporal-supersession.js +20 -0
  269. package/dist/temporal-supersession.js.map +1 -0
  270. package/dist/threading.js +2 -2
  271. package/dist/tier-migration.d.ts +2 -1
  272. package/dist/tier-routing.js +2 -2
  273. package/dist/tokens.d.ts +21 -1
  274. package/dist/tokens.js +5 -1
  275. package/dist/transcript.js +2 -2
  276. package/dist/types.d.ts +497 -3
  277. package/dist/types.js +1 -1
  278. package/dist/utility-learner.js +2 -2
  279. package/dist/utility-runtime.js +3 -3
  280. package/dist/verified-recall.js +11 -8
  281. package/dist/whitespace.d.ts +4 -0
  282. package/dist/whitespace.js +9 -0
  283. package/dist/whitespace.js.map +1 -0
  284. package/package.json +14 -8
  285. package/dist/chunk-2CJCWDMR.js +0 -87
  286. package/dist/chunk-2CJCWDMR.js.map +0 -1
  287. package/dist/chunk-2PO5ZRKV.js.map +0 -1
  288. package/dist/chunk-6UJQNRIO.js.map +0 -1
  289. package/dist/chunk-B7LOFDVE.js.map +0 -1
  290. package/dist/chunk-BDFZXRSO.js.map +0 -1
  291. package/dist/chunk-CXWFUJR2.js.map +0 -1
  292. package/dist/chunk-DORBM6OB.js +0 -81
  293. package/dist/chunk-DORBM6OB.js.map +0 -1
  294. package/dist/chunk-ESSMF2FR.js.map +0 -1
  295. package/dist/chunk-HLBYLYRD.js.map +0 -1
  296. package/dist/chunk-HLXVTBF3.js.map +0 -1
  297. package/dist/chunk-ISY75RLM.js.map +0 -1
  298. package/dist/chunk-KL4CP4SB.js.map +0 -1
  299. package/dist/chunk-KWBU5S5U.js.map +0 -1
  300. package/dist/chunk-MWGVGUIS.js.map +0 -1
  301. package/dist/chunk-ORZMT74A.js.map +0 -1
  302. package/dist/chunk-OTFNI3OO.js.map +0 -1
  303. package/dist/chunk-PGK3VUHN.js.map +0 -1
  304. package/dist/chunk-QCCCQT3O.js.map +0 -1
  305. package/dist/chunk-QDOSNLB4.js.map +0 -1
  306. package/dist/chunk-QPKFPHOO.js +0 -178
  307. package/dist/chunk-QPKFPHOO.js.map +0 -1
  308. package/dist/chunk-QWUUMMIK.js.map +0 -1
  309. package/dist/chunk-QY2BHY5O.js.map +0 -1
  310. package/dist/chunk-TVVVQQAK.js.map +0 -1
  311. package/dist/chunk-U4PV25RD.js.map +0 -1
  312. package/dist/chunk-UYSKNO6E.js.map +0 -1
  313. package/dist/chunk-V4YC4LUK.js.map +0 -1
  314. package/dist/chunk-WWIQTB2Y.js.map +0 -1
  315. package/dist/chunk-YNCQ7E4M.js.map +0 -1
  316. package/dist/chunk-ZJLY4QSU.js.map +0 -1
  317. /package/dist/{engine-2A6J4XEX.js.map → active-memory-bridge.js.map} +0 -0
  318. /package/dist/{chunk-NTTLPF7F.js.map → chunk-3QFQGRHO.js.map} +0 -0
  319. /package/dist/{chunk-G3AG3KZN.js.map → chunk-5IZL4DCV.js.map} +0 -0
  320. /package/dist/{chunk-BRK4ODMI.js.map → chunk-5NPGSAVB.js.map} +0 -0
  321. /package/dist/{chunk-L5RPWGFK.js.map → chunk-7DHTMOND.js.map} +0 -0
  322. /package/dist/{chunk-Q6FETXJA.js.map → chunk-7SEAZFFB.js.map} +0 -0
  323. /package/dist/{chunk-QANCTXQF.js.map → chunk-AYPYCLR7.js.map} +0 -0
  324. /package/dist/{chunk-LP47L3ZX.js.map → chunk-BTY5RRRF.js.map} +0 -0
  325. /package/dist/{chunk-SCHEKPYH.js.map → chunk-C2EFFULQ.js.map} +0 -0
  326. /package/dist/{chunk-GJR6D6KC.js.map → chunk-D654IBA6.js.map} +0 -0
  327. /package/dist/{chunk-UV2FO7J4.js.map → chunk-E6K4NIEU.js.map} +0 -0
  328. /package/dist/{chunk-T4WRIV2C.js.map → chunk-EABGC2TL.js.map} +0 -0
  329. /package/dist/{chunk-ONRU4L2N.js.map → chunk-FEMOX5AD.js.map} +0 -0
  330. /package/dist/{chunk-IFFFR3MR.js.map → chunk-FSFEQI74.js.map} +0 -0
  331. /package/dist/{chunk-UIYZ5T3I.js.map → chunk-GJQPH5G3.js.map} +0 -0
  332. /package/dist/{chunk-ZKYI7UVO.js.map → chunk-JR4ZC3G4.js.map} +0 -0
  333. /package/dist/{chunk-UCYSTFZR.js.map → chunk-JRNQ3RNA.js.map} +0 -0
  334. /package/dist/{chunk-GPGBSNKM.js.map → chunk-K4FLSOR5.js.map} +0 -0
  335. /package/dist/{chunk-M5ZBBBJI.js.map → chunk-KEG4GNGI.js.map} +0 -0
  336. /package/dist/{chunk-L7WO3MZ4.js.map → chunk-KWP7T3DP.js.map} +0 -0
  337. /package/dist/{chunk-J47FNDR7.js.map → chunk-MYQWXITD.js.map} +0 -0
  338. /package/dist/{chunk-YNI4S5WT.js.map → chunk-N53K2EXC.js.map} +0 -0
  339. /package/dist/{chunk-763GUIOU.js.map → chunk-NBNN5GOB.js.map} +0 -0
  340. /package/dist/{chunk-OOSWAUYB.js.map → chunk-ODWDQNRE.js.map} +0 -0
  341. /package/dist/{chunk-J3BT33K7.js.map → chunk-POBPGDWI.js.map} +0 -0
  342. /package/dist/{chunk-OTAVQCSF.js.map → chunk-PYXS46O7.js.map} +0 -0
  343. /package/dist/{chunk-XUHI52HK.js.map → chunk-QKAH5B6E.js.map} +0 -0
  344. /package/dist/{chunk-HG2NKWR2.js.map → chunk-S4LX5EBI.js.map} +0 -0
  345. /package/dist/{chunk-4A24LIM2.js.map → chunk-S75M5ZRK.js.map} +0 -0
  346. /package/dist/{chunk-MDDAA2AO.js.map → chunk-UPMD5XND.js.map} +0 -0
  347. /package/dist/{chunk-M5KEYE5E.js.map → chunk-URB2WSKZ.js.map} +0 -0
@@ -0,0 +1,139 @@
1
+ import { MemoryFile } from './types.js';
2
+
3
+ /**
4
+ * codex-materialize.ts — Codex CLI native memory artifact materialization (#378)
5
+ *
6
+ * Periodically writes Remnic memories into the file layout that Codex CLI's
7
+ * phase-2 consolidation reads directly under `<codex_home>/memories/`:
8
+ *
9
+ * memory_summary.md — always-loaded at session start (tight budget)
10
+ * MEMORY.md — searchable handbook (task-group schema)
11
+ * raw_memories.md — mechanical merge of raw memories, latest first
12
+ * rollout_summaries/<slug>.md — per-session recaps
13
+ *
14
+ * Codex's own read path is agnostic to which producer wrote these files — it
15
+ * tags reads by `memory_md` / `memory_summary` / `raw_memories` /
16
+ * `rollout_summaries` / `skills`. By materializing Remnic content into this
17
+ * exact layout we let Codex pick up Remnic memories without a single MCP call.
18
+ *
19
+ * Safety invariants
20
+ * ─────────────────
21
+ * - **Atomic writes.** Every file is rendered under `.remnic-tmp/` and then
22
+ * `rename()`d into place so Codex never observes a half-written file.
23
+ * - **Sentinel-based opt-in.** If `<codex_home>/memories/.remnic-managed` is
24
+ * missing, we SKIP materialization entirely and log a warning. This honors
25
+ * user hand-edits to the directory — a user who manually curated their
26
+ * Codex memory layout will never have those edits overwritten.
27
+ * - **Schema validation.** `MEMORY.md` content is validated against the
28
+ * task-group schema before write. Invalid content throws and nothing is
29
+ * written.
30
+ * - **Idempotent no-ops.** A content hash is written into the sentinel. If
31
+ * the re-rendered hash matches the previous run, we skip writes entirely.
32
+ * - **Token budget.** `memory_summary.md` is truncated to fit under the
33
+ * configured token budget (whitespace-tokenized approximation), leaving
34
+ * headroom under Codex's 5000-token summary cap.
35
+ *
36
+ * Privacy
37
+ * ───────
38
+ * This module does not persist any user content outside `<codex_home>/memories`
39
+ * — it only mirrors the memories that Remnic already wrote. It does not log
40
+ * memory content to stdout; it logs file names, counts, and hashes.
41
+ */
42
+
43
+ /**
44
+ * Input for {@link materializeForNamespace}. Prefer passing pre-loaded
45
+ * `memories` so this module stays I/O-agnostic and trivially testable.
46
+ */
47
+ interface MaterializeOptions {
48
+ /** Pre-loaded Remnic memories for this namespace (required). */
49
+ memories: MemoryFile[];
50
+ /** Override `<codex_home>`. Defaults to `$CODEX_HOME` or `~/.codex`. */
51
+ codexHome?: string;
52
+ /** Maximum whitespace-tokenized size of memory_summary.md. Default 4500. */
53
+ maxSummaryTokens?: number;
54
+ /** Maximum age of rollout_summaries/*.md in days. Default 30. */
55
+ rolloutRetentionDays?: number;
56
+ /** Per-session rollout summaries to render. */
57
+ rolloutSummaries?: RolloutSummaryInput[];
58
+ /** Current time, injected for deterministic tests. */
59
+ now?: Date;
60
+ /** Optional logger override for tests. */
61
+ logger?: {
62
+ info: (msg: string) => void;
63
+ warn: (msg: string) => void;
64
+ debug?: (msg: string) => void;
65
+ };
66
+ }
67
+ /** Input describing one Codex rollout summary file. */
68
+ interface RolloutSummaryInput {
69
+ /** Stable slug for the file (becomes `<slug>.md`). */
70
+ slug: string;
71
+ /** Working directory used during the rollout. */
72
+ cwd?: string;
73
+ /** Path to the raw Codex rollout log, if known. */
74
+ rolloutPath?: string;
75
+ /** ISO-8601 timestamp of the last update. */
76
+ updatedAt?: string;
77
+ /** Opaque thread / session id. */
78
+ threadId?: string;
79
+ /** Markdown body for the recap. */
80
+ body: string;
81
+ /** Freeform keywords / search hints. */
82
+ keywords?: string[];
83
+ }
84
+ /** Result of a materialization run. */
85
+ interface MaterializeResult {
86
+ /** Namespace that was materialized. */
87
+ namespace: string;
88
+ /** `<codex_home>/memories` path this run targeted. */
89
+ memoriesDir: string;
90
+ /** Was anything actually written (vs. skipped / idempotent no-op)? */
91
+ wrote: boolean;
92
+ /** True if the sentinel was missing and we skipped with a warning. */
93
+ skippedNoSentinel: boolean;
94
+ /** True if the hash matched the previous run and we short-circuited. */
95
+ skippedIdempotent: boolean;
96
+ /** Files that were written this run (relative to `memoriesDir`). */
97
+ filesWritten: string[];
98
+ /** Content hash computed for this run. */
99
+ contentHash: string;
100
+ }
101
+ /** On-disk shape of the `.remnic-managed` sentinel. */
102
+ interface SentinelFile {
103
+ version: number;
104
+ namespace: string;
105
+ updated_at: string;
106
+ content_hash: string;
107
+ }
108
+ /** Bump when the on-disk layout or semantics change. */
109
+ declare const MATERIALIZE_VERSION = 1;
110
+ /** Sentinel file name at the root of the materialized memories dir. */
111
+ declare const SENTINEL_FILE = ".remnic-managed";
112
+ /**
113
+ * Materialize a Remnic namespace into Codex's native memory layout.
114
+ *
115
+ * Returns a {@link MaterializeResult} describing what happened. Callers
116
+ * should treat "skipped" as success — the sentinel / idempotent cases are
117
+ * expected and intentional.
118
+ *
119
+ * @throws if `MEMORY.md` fails schema validation (we do not write garbage).
120
+ */
121
+ declare function materializeForNamespace(namespace: string, options: MaterializeOptions): MaterializeResult;
122
+ /**
123
+ * Create (or refresh) the `.remnic-managed` sentinel. Callers must do this
124
+ * explicitly the first time they want Remnic to start managing a directory —
125
+ * we never write it implicitly, because its presence is the user's opt-in.
126
+ */
127
+ declare function ensureSentinel(memoriesDir: string, namespace: string, now?: Date): void;
128
+ /**
129
+ * Return basic stats about a materialized memories dir. Useful for tests and
130
+ * debug CLI output. Returns `null` if the dir does not exist.
131
+ */
132
+ declare function describeMemoriesDir(memoriesDir: string): {
133
+ exists: boolean;
134
+ hasSentinel: boolean;
135
+ files: string[];
136
+ sentinel: SentinelFile | null;
137
+ } | null;
138
+
139
+ export { type MaterializeResult as M, type RolloutSummaryInput as R, SENTINEL_FILE as S, MATERIALIZE_VERSION as a, type MaterializeOptions as b, describeMemoriesDir as d, ensureSentinel as e, materializeForNamespace as m };
@@ -0,0 +1,3 @@
1
+ declare const CODEX_THREAD_KEY_PREFIX = "codex-thread:";
2
+
3
+ export { CODEX_THREAD_KEY_PREFIX };
@@ -0,0 +1,7 @@
1
+ import {
2
+ CODEX_THREAD_KEY_PREFIX
3
+ } from "./chunk-3PG3H5TD.js";
4
+ export {
5
+ CODEX_THREAD_KEY_PREFIX
6
+ };
7
+ //# sourceMappingURL=codex-thread-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/config.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  VALID_MEMORY_CATEGORIES,
3
3
  parseConfig
4
- } from "./chunk-ISY75RLM.js";
4
+ } from "./chunk-OJFGVJS6.js";
5
5
  import "./chunk-Z5LAYHGJ.js";
6
6
  import "./chunk-MARWOCVP.js";
7
- import "./chunk-KWBU5S5U.js";
7
+ import "./chunk-4DJQYKMN.js";
8
+ import "./chunk-2ODBA7MQ.js";
8
9
  export {
9
10
  VALID_MEMORY_CATEGORIES,
10
11
  parseConfig
@@ -0,0 +1,160 @@
1
+ # Remnic Memory Extension for Codex
2
+
3
+ You are the Codex consolidation sub-agent. This document tells you how to treat
4
+ Remnic as an authoritative local memory source while you summarize a session
5
+ and build the compacted MEMORY.md output.
6
+
7
+ Remnic is a local-first, file-backed memory system. All Remnic content that
8
+ matters to you lives on disk as plain Markdown — you do not need a network,
9
+ an MCP server, or the `remnic` CLI to read it. You are running inside the
10
+ Codex phase-2 sandbox: no approvals, no network, local reads and local writes
11
+ only.
12
+
13
+ ## What Remnic is authoritative for
14
+
15
+ Treat Remnic content as a trusted, high-signal memory source when you need any
16
+ of the following:
17
+
18
+ - **Stable user preferences** — coding conventions, tool choices, style
19
+ guides, phrasing, commit message format, review etiquette.
20
+ - **Project conventions** — folder layout, naming rules, test runners,
21
+ build commands, branching strategy, deployment workflow.
22
+ - **Reusable workflows and skills** — documented runbooks, procedures, and
23
+ "how we do X here" notes that should survive across sessions.
24
+ - **Long-lived decisions** — architecture calls, library choices, explicit
25
+ "we decided not to do X" entries.
26
+ - **Entities the user cares about** — projects, services, people, API
27
+ contracts, integrations mentioned by name.
28
+
29
+ If the current session touches any of these areas, consult Remnic before you
30
+ finalize the consolidated MEMORY.md output.
31
+
32
+ ## When NOT to consult Remnic
33
+
34
+ Do not waste filesystem tool calls on Remnic when:
35
+
36
+ - The session is purely transient (one-off shell commands, throwaway
37
+ debugging with no lasting conclusion).
38
+ - You already have the information in the current session transcript and
39
+ Remnic would only duplicate it.
40
+ - The user has explicitly asked you to ignore memory or work from a clean
41
+ slate.
42
+ - You are summarizing a session that never reached a decision, a preference,
43
+ or a durable artifact worth recording.
44
+
45
+ Prefer a single targeted read over broad directory walks.
46
+
47
+ ## Where Remnic content lives on disk
48
+
49
+ Resolve the Remnic memory base in this order:
50
+
51
+ 1. If the environment variable `REMNIC_HOME` is set, use
52
+ `$REMNIC_HOME/memories/`.
53
+ 2. Otherwise use `~/.remnic/memories/`.
54
+
55
+ Under that base, memories are organized by **namespace**:
56
+
57
+ ```
58
+ <remnic-home>/memories/<namespace>/
59
+ ├── MEMORY.md # compact top-of-mind memory
60
+ ├── memory_summary.md # optional longer human-readable summary
61
+ ├── skills/
62
+ │ └── <skill-name>/
63
+ │ └── SKILL.md # reusable workflow
64
+ └── rollout_summaries/
65
+ └── *.md # per-session rollup notes
66
+ ```
67
+
68
+ Canonical files you should prefer, in order:
69
+
70
+ 1. `MEMORY.md` — the current compact memory. Read this first.
71
+ 2. `memory_summary.md` — longer-form summary if it exists.
72
+ 3. `skills/<name>/SKILL.md` — for reusable procedures relevant to the task.
73
+ 4. `rollout_summaries/*.md` — recent session notes, newest first.
74
+
75
+ If none of the above exist for the resolved namespace, Remnic simply has
76
+ nothing to contribute — move on without error.
77
+
78
+ ## Resolving the namespace
79
+
80
+ Remnic uses **cwd-derived namespaces** by default. Apply this rule when
81
+ choosing which namespace directory to read:
82
+
83
+ 1. Start from the session's working directory (the `cwd` Codex used for the
84
+ session you are consolidating).
85
+ 2. Walk upward looking for a project anchor: `.git`, `package.json`,
86
+ `pyproject.toml`, `Cargo.toml`, `go.mod`, or an explicit
87
+ `.remnic/namespace` file.
88
+ 3. The namespace is the basename of that anchor directory, lowercased and
89
+ with spaces replaced by `-`.
90
+ 4. If you cannot find an anchor, fall back to the namespace `default`.
91
+ 5. In addition to the project namespace, always also check the `shared`
92
+ namespace for cross-project preferences (e.g.
93
+ `<remnic-home>/memories/shared/MEMORY.md`). If it exists, read it.
94
+
95
+ If a session explicitly mentions a different Remnic namespace (for example,
96
+ the user says "use the `work` namespace"), prefer that explicit value over
97
+ the cwd-derived one.
98
+
99
+ ## How to cite Remnic memories in your output
100
+
101
+ When a piece of the consolidated memory you are writing comes from a Remnic
102
+ file, cite it using the Codex memory citation block format so the user can
103
+ trace the source:
104
+
105
+ ```
106
+ <oai-mem-citation path="<path-relative-to-remnic-memory-base>" />
107
+ ```
108
+
109
+ The path must be **relative to the Remnic memory base** (the directory named
110
+ `memories/` under `<remnic-home>`), not absolute. Examples:
111
+
112
+ - `<oai-mem-citation path="default/MEMORY.md" />`
113
+ - `<oai-mem-citation path="my-project/skills/deploy/SKILL.md" />`
114
+ - `<oai-mem-citation path="shared/memory_summary.md" />`
115
+
116
+ Cite each distinct source once near the fact it supports. Do not invent
117
+ citations for files you have not actually read.
118
+
119
+ ## Sandboxing rules (hard constraints)
120
+
121
+ You are running in the Codex phase-2 consolidation sandbox. These rules are
122
+ non-negotiable:
123
+
124
+ - **No network.** Do not attempt HTTP calls, MCP connections, or anything
125
+ that reaches outside this machine.
126
+ - **No `remnic` CLI invocation.** Do not shell out to `remnic`, `engram`,
127
+ `qmd`, or any daemon. Use filesystem reads only.
128
+ - **No MCP tool calls.** You must not call `remnic.recall`,
129
+ `remnic.memory_store`, or any other MCP-backed tool. They are not
130
+ available in this sandbox.
131
+ - **Local writes are allowed** only where Codex's sandbox policy already
132
+ permits them (typically the Codex memories output folder). Do not write
133
+ into the Remnic memory directory — it is read-only from your perspective.
134
+ - **Respect missing files.** If a file does not exist, move on silently.
135
+ Never create placeholder Remnic files.
136
+
137
+ ## Failure handling
138
+
139
+ - Remnic base directory missing: no-op. Remnic has nothing for this session.
140
+ - Namespace directory missing: try the `shared` namespace, then give up.
141
+ - Malformed file: skip it and continue.
142
+ - Never block consolidation on a Remnic read error.
143
+
144
+ ## Quick recipe
145
+
146
+ For a typical consolidation run:
147
+
148
+ 1. Resolve `<remnic-home>` from `$REMNIC_HOME` or `~/.remnic`.
149
+ 2. Resolve `<namespace>` from the session cwd using the rule above.
150
+ 3. Read `<remnic-home>/memories/<namespace>/MEMORY.md` if present.
151
+ 4. Read `<remnic-home>/memories/shared/MEMORY.md` if present.
152
+ 5. If the session produced or used a named workflow, read
153
+ `<remnic-home>/memories/<namespace>/skills/<name>/SKILL.md`.
154
+ 6. If you need more context, peek at the newest file under
155
+ `<remnic-home>/memories/<namespace>/rollout_summaries/`.
156
+ 7. Fold confirmed facts and preferences into the consolidated output and
157
+ cite them with `<oai-mem-citation />`.
158
+
159
+ That is the whole extension. Keep it tight, cite your sources, and never
160
+ invent Remnic content you did not read.
@@ -0,0 +1,48 @@
1
+ # Remnic Namespace Cheatsheet
2
+
3
+ Remnic partitions memories into **namespaces** so multiple projects and
4
+ contexts can share a single Remnic home without bleeding into each other.
5
+ When the Codex consolidation sub-agent reads Remnic files, it has to pick
6
+ the right namespace directory for the session it is summarizing. This
7
+ cheatsheet documents the resolution rule.
8
+
9
+ ## Resolution rule (in order)
10
+
11
+ 1. **Explicit override in the session.** If the user or the transcript
12
+ explicitly names a Remnic namespace, use that value verbatim.
13
+ 2. **Project anchor walk.** Starting from the session's working directory,
14
+ walk upward until you find any of:
15
+ - `.git/`
16
+ - `.remnic/namespace` file (highest priority if present)
17
+ - `package.json`
18
+ - `pyproject.toml`
19
+ - `Cargo.toml`
20
+ - `go.mod`
21
+ Use the basename of the anchor directory, lowercased, with whitespace
22
+ replaced by `-`.
23
+ 3. **Fallback.** If nothing above matches, use the namespace `default`.
24
+ 4. **Shared overlay.** In addition to the resolved namespace, always also
25
+ check the `shared` namespace for cross-project content.
26
+
27
+ ## Examples
28
+
29
+ | Session cwd | Anchor | Namespace |
30
+ |------------------------------------------|----------------------|-----------------|
31
+ | `/home/user/code/my-app/src` | `/home/user/code/my-app/.git` | `my-app` |
32
+ | `/home/user/code/Data Pipeline` | `.git` | `data-pipeline` |
33
+ | `/tmp/scratch` | (none) | `default` |
34
+ | `/work/research/` (contains `.remnic/namespace` = `lab`) | `.remnic/namespace` | `lab` |
35
+
36
+ ## Why it matters
37
+
38
+ If the consolidation agent reads from the wrong namespace, it will either
39
+ miss relevant project-specific memories (false negative) or drag unrelated
40
+ content into the summary (false positive). Getting the namespace right keeps
41
+ Remnic's signal-to-noise ratio high.
42
+
43
+ ## What the extension does with this
44
+
45
+ The consolidation sub-agent reads `MEMORY.md`, `memory_summary.md`, any
46
+ relevant `skills/<name>/SKILL.md`, and newest `rollout_summaries/*.md`
47
+ under the resolved namespace, plus the `shared` namespace overlay. All
48
+ reads are filesystem-only — no CLI, no network, no MCP.
@@ -1,6 +1,11 @@
1
- import { MemoryFile } from './types.js';
1
+ import { PluginConfig, MemoryFile } from './types.js';
2
2
 
3
3
  declare function loadDaySummaryPrompt(): Promise<string>;
4
4
  declare function formatDaySummaryMemories(memories: string | MemoryFile[]): string;
5
+ /**
6
+ * Build a one-line extension footer for day-summary and summary-snapshot contexts.
7
+ * Returns "" when extensions are disabled or none are found.
8
+ */
9
+ declare function buildExtensionsFooterForSummary(config: PluginConfig): Promise<string>;
5
10
 
6
- export { formatDaySummaryMemories, loadDaySummaryPrompt };
11
+ export { buildExtensionsFooterForSummary, formatDaySummaryMemories, loadDaySummaryPrompt };
@@ -1,9 +1,12 @@
1
1
  import {
2
+ buildExtensionsFooterForSummary,
2
3
  formatDaySummaryMemories,
3
4
  loadDaySummaryPrompt
4
- } from "./chunk-2PO5ZRKV.js";
5
- import "./chunk-KWBU5S5U.js";
5
+ } from "./chunk-GZCUW5IC.js";
6
+ import "./chunk-EJI5XIBB.js";
7
+ import "./chunk-2ODBA7MQ.js";
6
8
  export {
9
+ buildExtensionsFooterForSummary,
7
10
  formatDaySummaryMemories,
8
11
  loadDaySummaryPrompt
9
12
  };
@@ -1,12 +1,106 @@
1
1
  import { PluginConfig } from './types.js';
2
2
 
3
+ /**
4
+ * Thrown by `EmbeddingFallback.search()` (via `embed()`) when the embedding
5
+ * backend is effectively unavailable on the lookup path — either because the
6
+ * HTTP fetch exceeded its deadline OR because the endpoint returned a non-2xx
7
+ * status code. Callers that need to distinguish a backend outage from "no
8
+ * candidates" can `instanceof`-check against this class.
9
+ *
10
+ * Round 9 fix (Finding UZqB): previously a timeout returned null from embed(),
11
+ * which caused search() to return [] silently. decideSemanticDedup then
12
+ * classified the result as no_candidates instead of backend_unavailable, so
13
+ * the per-batch batchBackendUnavailable short-circuit never activated and
14
+ * batches of N facts each paid a full timeout roundtrip.
15
+ *
16
+ * Round 10 fix (Findings Ui1J + Ui1L): search() now only re-throws this error
17
+ * when the caller explicitly passes `{ throwOnTimeout: true }`. Without that
18
+ * flag search() catches it and returns [] instead, preserving fail-open
19
+ * semantics for recall-path callers (searchEmbeddingFallback) that have no
20
+ * try/catch. Only the semantic-dedup path (semanticDedupLookup) passes the
21
+ * flag so it can still reach decideSemanticDedup's backend_unavailable branch.
22
+ *
23
+ * Round 11 fix (Finding Ur_J): `embed()` now also throws this error from the
24
+ * lookup path when the HTTP response is non-2xx (e.g. 429, 500, 503). Without
25
+ * this, repeated 5xx outages would each return null → [] → no_candidates and
26
+ * subsequent facts in the same batch would all pay full roundtrips instead of
27
+ * tripping the per-batch backend_unavailable short-circuit.
28
+ *
29
+ * The class name is kept for backward compatibility — `EmbeddingTimeoutError`
30
+ * now signals "lookup backend unavailable" rather than strictly "timed out".
31
+ */
32
+ declare class EmbeddingTimeoutError extends Error {
33
+ readonly name: "EmbeddingTimeoutError";
34
+ constructor(message: string);
35
+ }
36
+ /**
37
+ * Options for the low-level embed() call.
38
+ *
39
+ * `mode` selects the timeout profile:
40
+ * - "lookup" (default): bounded by the short lookup budget; fails open fast.
41
+ * - "index": bounded by a much longer budget so slow backends can still
42
+ * index newly persisted memories.
43
+ */
44
+ type EmbedMode = "lookup" | "index";
3
45
  declare class EmbeddingFallback {
4
46
  private readonly config;
5
47
  private readonly indexPath;
6
48
  private loaded;
7
49
  constructor(config: PluginConfig);
8
50
  isAvailable(): Promise<boolean>;
9
- search(query: string, limit: number): Promise<Array<{
51
+ /**
52
+ * Embed an array of texts and return their embedding vectors.
53
+ *
54
+ * This is the public batch-embed interface used by semantic chunking
55
+ * (Finding 1, PR #420 post-merge). Texts are grouped into batches of
56
+ * `embeddingBatchSize` (from `semanticChunkingConfig`, default 32) and
57
+ * each batch is dispatched concurrently via `Promise.all()`. This
58
+ * preserves the semantic intent of `embeddingBatchSize` — without batching,
59
+ * every text incurred a sequential HTTP round-trip, making the batch size
60
+ * config ineffective. (PR #439 post-merge Finding 2.)
61
+ *
62
+ * If the provider is unavailable or any single embedding fails, the method
63
+ * throws so the caller can fall back to recursive chunking.
64
+ */
65
+ embedTexts(texts: string[]): Promise<number[][]>;
66
+ /**
67
+ * Nearest-neighbor search against the embedding index.
68
+ *
69
+ * @param query The query string to embed and search for.
70
+ * @param limit Max number of hits to return.
71
+ * @param options Optional filters.
72
+ * - `pathPrefix` Restrict candidates to entries whose indexed `path`
73
+ * starts with this prefix (relative to `memoryDir`).
74
+ * Used by the semantic dedup guard to scope lookups
75
+ * to the target namespace so a high-similarity hit
76
+ * from a different namespace can't suppress a write
77
+ * in the target namespace. Default: no filter.
78
+ * - `pathExcludePrefixes`
79
+ * Exclude any entry whose indexed `path` starts with
80
+ * any of these prefixes. Used for the default
81
+ * namespace case: when the default namespace lives at
82
+ * `memoryDir` root (legacy layout) we still want to
83
+ * exclude `namespaces/<other>/…` entries.
84
+ */
85
+ search(query: string, limit: number, options?: {
86
+ pathPrefix?: string;
87
+ pathExcludePrefixes?: readonly string[];
88
+ /**
89
+ * When true, an `EmbeddingTimeoutError` from the embedding backend is
90
+ * re-thrown to the caller. Use this on the semantic-dedup path so
91
+ * `decideSemanticDedup`'s catch block can classify the result as
92
+ * `reason="backend_unavailable"` and activate the per-batch
93
+ * short-circuit.
94
+ *
95
+ * When false (the default), a timeout is caught here and search()
96
+ * returns [] instead — preserving fail-open semantics for the recall
97
+ * path (`searchEmbeddingFallback`) which has no surrounding try/catch.
98
+ * Without this gate a timed-out embedding request on the recall path
99
+ * would propagate as an unhandled rejection and abort recall entirely.
100
+ * (Round 10 fix, Findings Ui1J + Ui1L.)
101
+ */
102
+ throwOnTimeout?: boolean;
103
+ }): Promise<Array<{
10
104
  id: string;
11
105
  score: number;
12
106
  path: string;
@@ -19,4 +113,4 @@ declare class EmbeddingFallback {
19
113
  private saveIndex;
20
114
  }
21
115
 
22
- export { EmbeddingFallback };
116
+ export { type EmbedMode, EmbeddingFallback, EmbeddingTimeoutError };
@@ -1,8 +1,10 @@
1
1
  import {
2
- EmbeddingFallback
3
- } from "./chunk-QPKFPHOO.js";
4
- import "./chunk-KWBU5S5U.js";
2
+ EmbeddingFallback,
3
+ EmbeddingTimeoutError
4
+ } from "./chunk-ALXMCZEU.js";
5
+ import "./chunk-2ODBA7MQ.js";
5
6
  export {
6
- EmbeddingFallback
7
+ EmbeddingFallback,
8
+ EmbeddingTimeoutError
7
9
  };
8
10
  //# sourceMappingURL=embedding-fallback.js.map
@@ -1,19 +1,22 @@
1
1
  import {
2
2
  CompoundingEngine,
3
3
  defaultTierMigrationCycleBudget
4
- } from "./chunk-UYSKNO6E.js";
5
- import "./chunk-QWUUMMIK.js";
6
- import "./chunk-U4PV25RD.js";
7
- import "./chunk-ESSMF2FR.js";
4
+ } from "./chunk-JROGC36Y.js";
5
+ import "./chunk-POMSFKTB.js";
6
+ import "./chunk-U2IQTSBY.js";
7
+ import "./chunk-4KAN3GZ3.js";
8
+ import "./chunk-6ZH4TU6I.js";
9
+ import "./chunk-6PFRXT4K.js";
8
10
  import "./chunk-TP4FZJIZ.js";
9
11
  import "./chunk-SCU65EZI.js";
10
12
  import "./chunk-BOUYNNYD.js";
11
- import "./chunk-DM2T26WE.js";
12
13
  import "./chunk-QSVPYQPG.js";
14
+ import "./chunk-DM2T26WE.js";
13
15
  import "./chunk-M62O4P4T.js";
14
- import "./chunk-KWBU5S5U.js";
16
+ import "./chunk-4DJQYKMN.js";
17
+ import "./chunk-2ODBA7MQ.js";
15
18
  export {
16
19
  CompoundingEngine,
17
20
  defaultTierMigrationCycleBudget
18
21
  };
19
- //# sourceMappingURL=engine-2A6J4XEX.js.map
22
+ //# sourceMappingURL=engine-X7X3AAG3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,6 +1,7 @@
1
1
  import { StorageManager } from './storage.js';
2
2
  import { PluginConfig, TranscriptEntry } from './types.js';
3
- import './memory-projection-store-NxMkbocT.js';
3
+ import './page-versioning.js';
4
+ import './memory-projection-store-DeSXPh1j.js';
4
5
  import 'better-sqlite3';
5
6
 
6
7
  interface BuildEntityRecallSectionOptions {
@@ -17,7 +18,7 @@ interface BuildEntityRecallSectionOptions {
17
18
  }
18
19
  declare function buildEntityRecallSection(options: BuildEntityRecallSectionOptions): Promise<string | null>;
19
20
  declare function readRecentEntityTranscriptEntries(transcriptEntriesPromise: Promise<TranscriptEntry[]>, recentTurns: number): Promise<TranscriptEntry[]>;
20
- declare const entityIndexVersion = 1;
21
+ declare const entityIndexVersion = 3;
21
22
  declare const entityRecentTranscriptLookbackHours = 24;
22
23
 
23
24
  export { type BuildEntityRecallSectionOptions, buildEntityRecallSection, entityIndexVersion, entityRecentTranscriptLookbackHours, readRecentEntityTranscriptEntries };
@@ -3,18 +3,21 @@ import {
3
3
  entityIndexVersion,
4
4
  entityRecentTranscriptLookbackHours,
5
5
  readRecentEntityTranscriptEntries
6
- } from "./chunk-V4YC4LUK.js";
7
- import "./chunk-Q6FETXJA.js";
8
- import "./chunk-QWUUMMIK.js";
9
- import "./chunk-U4PV25RD.js";
10
- import "./chunk-ESSMF2FR.js";
6
+ } from "./chunk-74JR4N5J.js";
7
+ import "./chunk-7SEAZFFB.js";
8
+ import "./chunk-POMSFKTB.js";
9
+ import "./chunk-U2IQTSBY.js";
10
+ import "./chunk-4KAN3GZ3.js";
11
+ import "./chunk-6ZH4TU6I.js";
12
+ import "./chunk-6PFRXT4K.js";
11
13
  import "./chunk-TP4FZJIZ.js";
12
14
  import "./chunk-SCU65EZI.js";
13
15
  import "./chunk-BOUYNNYD.js";
14
- import "./chunk-DM2T26WE.js";
15
16
  import "./chunk-QSVPYQPG.js";
17
+ import "./chunk-DM2T26WE.js";
16
18
  import "./chunk-M62O4P4T.js";
17
- import "./chunk-KWBU5S5U.js";
19
+ import "./chunk-4DJQYKMN.js";
20
+ import "./chunk-2ODBA7MQ.js";
18
21
  export {
19
22
  buildEntityRecallSection,
20
23
  entityIndexVersion,
@@ -0,0 +1,11 @@
1
+ import { EntitySchemaDefinition, EntitySchemaSectionDefinition, EntityStructuredSection } from './types.js';
2
+
3
+ declare function normalizeEntityText(value: string): string;
4
+ declare function normalizeEntitySchemas(raw: unknown): Record<string, EntitySchemaDefinition> | undefined;
5
+ declare function getEntitySchema(entityType: string, entitySchemas?: Record<string, EntitySchemaDefinition>): EntitySchemaDefinition | undefined;
6
+ declare function matchEntitySchemaSection(entityType: string, title: string, entitySchemas?: Record<string, EntitySchemaDefinition>): EntitySchemaSectionDefinition | null;
7
+ declare function normalizeEntityStructuredSection(entityType: string, section: Pick<EntityStructuredSection, "key" | "title">, entitySchemas?: Record<string, EntitySchemaDefinition>): Pick<EntityStructuredSection, "key" | "title">;
8
+ declare function resolveRequestedEntitySectionKeys(query: string, entityType: string, availableSections: EntityStructuredSection[], entitySchemas?: Record<string, EntitySchemaDefinition>): string[];
9
+ declare function sortStructuredSectionsBySchema(entityType: string, sections: EntityStructuredSection[], entitySchemas?: Record<string, EntitySchemaDefinition>): EntityStructuredSection[];
10
+
11
+ export { getEntitySchema, matchEntitySchemaSection, normalizeEntitySchemas, normalizeEntityStructuredSection, normalizeEntityText, resolveRequestedEntitySectionKeys, sortStructuredSectionsBySchema };
@@ -0,0 +1,19 @@
1
+ import {
2
+ getEntitySchema,
3
+ matchEntitySchemaSection,
4
+ normalizeEntitySchemas,
5
+ normalizeEntityStructuredSection,
6
+ normalizeEntityText,
7
+ resolveRequestedEntitySectionKeys,
8
+ sortStructuredSectionsBySchema
9
+ } from "./chunk-4DJQYKMN.js";
10
+ export {
11
+ getEntitySchema,
12
+ matchEntitySchemaSection,
13
+ normalizeEntitySchemas,
14
+ normalizeEntityStructuredSection,
15
+ normalizeEntityText,
16
+ resolveRequestedEntitySectionKeys,
17
+ sortStructuredSectionsBySchema
18
+ };
19
+ //# sourceMappingURL=entity-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}