@nicia-ai/typegraph 0.46.2 → 0.48.0

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 (310) hide show
  1. package/README.md +20 -1
  2. package/dist/backend/drizzle/indexes.cjs +9 -9
  3. package/dist/backend/drizzle/indexes.d.cts +1 -1
  4. package/dist/backend/drizzle/indexes.d.ts +1 -1
  5. package/dist/backend/drizzle/indexes.js +5 -5
  6. package/dist/backend/index.cjs +58 -49
  7. package/dist/backend/index.d.cts +37 -55
  8. package/dist/backend/index.d.ts +37 -55
  9. package/dist/backend/index.js +11 -10
  10. package/dist/backend/postgres/index.cjs +27 -26
  11. package/dist/backend/postgres/index.d.cts +21 -7
  12. package/dist/backend/postgres/index.d.ts +21 -7
  13. package/dist/backend/postgres/index.js +14 -13
  14. package/dist/backend/postgres/pglite-store.cjs +34 -33
  15. package/dist/backend/postgres/pglite-store.cjs.map +1 -1
  16. package/dist/backend/postgres/pglite-store.d.cts +8 -8
  17. package/dist/backend/postgres/pglite-store.d.ts +8 -8
  18. package/dist/backend/postgres/pglite-store.js +30 -29
  19. package/dist/backend/postgres/pglite-store.js.map +1 -1
  20. package/dist/backend/postgres/pglite.cjs +16 -15
  21. package/dist/backend/postgres/pglite.d.cts +3 -3
  22. package/dist/backend/postgres/pglite.d.ts +3 -3
  23. package/dist/backend/postgres/pglite.js +15 -14
  24. package/dist/backend/sqlite/index.cjs +24 -23
  25. package/dist/backend/sqlite/index.d.cts +20 -7
  26. package/dist/backend/sqlite/index.d.ts +20 -7
  27. package/dist/backend/sqlite/index.js +12 -11
  28. package/dist/backend/sqlite/libsql.cjs +19 -18
  29. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  30. package/dist/backend/sqlite/libsql.d.cts +3 -3
  31. package/dist/backend/sqlite/libsql.d.ts +3 -3
  32. package/dist/backend/sqlite/libsql.js +14 -13
  33. package/dist/backend/sqlite/libsql.js.map +1 -1
  34. package/dist/backend/sqlite/local-store.cjs +35 -34
  35. package/dist/backend/sqlite/local-store.cjs.map +1 -1
  36. package/dist/backend/sqlite/local-store.d.cts +8 -8
  37. package/dist/backend/sqlite/local-store.d.ts +8 -8
  38. package/dist/backend/sqlite/local-store.js +31 -30
  39. package/dist/backend/sqlite/local-store.js.map +1 -1
  40. package/dist/backend/sqlite/local.cjs +17 -16
  41. package/dist/backend/sqlite/local.d.cts +3 -3
  42. package/dist/backend/sqlite/local.d.ts +3 -3
  43. package/dist/backend/sqlite/local.js +15 -14
  44. package/dist/{chunk-TCT66A7N.cjs → chunk-26YKDNUD.cjs} +10 -10
  45. package/dist/{chunk-TCT66A7N.cjs.map → chunk-26YKDNUD.cjs.map} +1 -1
  46. package/dist/{chunk-E4OSGBCM.cjs → chunk-2HIYYMWY.cjs} +139 -136
  47. package/dist/chunk-2HIYYMWY.cjs.map +1 -0
  48. package/dist/chunk-2QGYQBS2.cjs +161 -0
  49. package/dist/chunk-2QGYQBS2.cjs.map +1 -0
  50. package/dist/{chunk-GWXXHOLU.js → chunk-2SYZXD54.js} +21 -18
  51. package/dist/chunk-2SYZXD54.js.map +1 -0
  52. package/dist/{chunk-KA4L2NZ3.js → chunk-2TYSSBU5.js} +14 -14
  53. package/dist/{chunk-KA4L2NZ3.js.map → chunk-2TYSSBU5.js.map} +1 -1
  54. package/dist/{chunk-QOJ2L2AD.js → chunk-3DMMGT6S.js} +3 -3
  55. package/dist/{chunk-QOJ2L2AD.js.map → chunk-3DMMGT6S.js.map} +1 -1
  56. package/dist/{chunk-F36KZDFX.cjs → chunk-3FPR224C.cjs} +91 -91
  57. package/dist/{chunk-F36KZDFX.cjs.map → chunk-3FPR224C.cjs.map} +1 -1
  58. package/dist/{chunk-32UETY6S.cjs → chunk-3KOY4FH3.cjs} +207 -28
  59. package/dist/chunk-3KOY4FH3.cjs.map +1 -0
  60. package/dist/{chunk-QU7QLJA4.cjs → chunk-3U5ABFDW.cjs} +26 -26
  61. package/dist/{chunk-QU7QLJA4.cjs.map → chunk-3U5ABFDW.cjs.map} +1 -1
  62. package/dist/{chunk-RFDEYLIK.js → chunk-4WMMBDS5.js} +7 -7
  63. package/dist/chunk-4WMMBDS5.js.map +1 -0
  64. package/dist/{chunk-R7EWHKID.js → chunk-5K2BKEBD.js} +19 -145
  65. package/dist/chunk-5K2BKEBD.js.map +1 -0
  66. package/dist/chunk-5PRKMB24.cjs +124 -0
  67. package/dist/chunk-5PRKMB24.cjs.map +1 -0
  68. package/dist/chunk-6LN7FIVU.js +107 -0
  69. package/dist/chunk-6LN7FIVU.js.map +1 -0
  70. package/dist/{chunk-D6GCNNMK.cjs → chunk-6NGW27EO.cjs} +10 -10
  71. package/dist/{chunk-D6GCNNMK.cjs.map → chunk-6NGW27EO.cjs.map} +1 -1
  72. package/dist/{chunk-WHS2Y43J.js → chunk-6SWPJEYN.js} +5 -5
  73. package/dist/{chunk-WHS2Y43J.js.map → chunk-6SWPJEYN.js.map} +1 -1
  74. package/dist/{chunk-7TKNK32B.js → chunk-7SQSZN2J.js} +5 -5
  75. package/dist/{chunk-7TKNK32B.js.map → chunk-7SQSZN2J.js.map} +1 -1
  76. package/dist/{chunk-UTVQPZPN.cjs → chunk-7XUYFFR4.cjs} +20 -20
  77. package/dist/chunk-7XUYFFR4.cjs.map +1 -0
  78. package/dist/{chunk-KXSMF6PL.js → chunk-ACGSAMD3.js} +39 -34
  79. package/dist/chunk-ACGSAMD3.js.map +1 -0
  80. package/dist/{chunk-PYKF7UIL.cjs → chunk-AOSSQDVO.cjs} +13 -13
  81. package/dist/{chunk-PYKF7UIL.cjs.map → chunk-AOSSQDVO.cjs.map} +1 -1
  82. package/dist/{chunk-AT3MLMJV.js → chunk-AX6JGVTZ.js} +91 -20
  83. package/dist/chunk-AX6JGVTZ.js.map +1 -0
  84. package/dist/{chunk-WA64ZSCA.cjs → chunk-BFUOME67.cjs} +11 -11
  85. package/dist/{chunk-WA64ZSCA.cjs.map → chunk-BFUOME67.cjs.map} +1 -1
  86. package/dist/{chunk-YQ4JONWE.js → chunk-BRRP76WO.js} +401 -131
  87. package/dist/chunk-BRRP76WO.js.map +1 -0
  88. package/dist/{chunk-FCIZNUW5.js → chunk-CHAOFCHV.js} +3 -3
  89. package/dist/{chunk-FCIZNUW5.js.map → chunk-CHAOFCHV.js.map} +1 -1
  90. package/dist/chunk-CICO5GXD.cjs +12 -0
  91. package/dist/{chunk-73MWKDFK.cjs.map → chunk-CICO5GXD.cjs.map} +1 -1
  92. package/dist/{chunk-S3G5VLSW.js → chunk-CT3ZKTOF.js} +7 -6
  93. package/dist/chunk-CT3ZKTOF.js.map +1 -0
  94. package/dist/{chunk-SXWLLQ3D.js → chunk-D5R42W5D.js} +4 -4
  95. package/dist/{chunk-SXWLLQ3D.js.map → chunk-D5R42W5D.js.map} +1 -1
  96. package/dist/{chunk-BZZI7B43.cjs → chunk-DO7SAMEK.cjs} +47 -47
  97. package/dist/{chunk-BZZI7B43.cjs.map → chunk-DO7SAMEK.cjs.map} +1 -1
  98. package/dist/chunk-DZAICA5J.js +147 -0
  99. package/dist/chunk-DZAICA5J.js.map +1 -0
  100. package/dist/{chunk-2ZWM2RFH.cjs → chunk-EDN4Y4ZG.cjs} +9 -9
  101. package/dist/{chunk-2ZWM2RFH.cjs.map → chunk-EDN4Y4ZG.cjs.map} +1 -1
  102. package/dist/{chunk-A4R3H7RU.cjs → chunk-EZEEWCFJ.cjs} +264 -361
  103. package/dist/chunk-EZEEWCFJ.cjs.map +1 -0
  104. package/dist/{chunk-BEB4OFZF.cjs → chunk-FA2AFWLP.cjs} +51 -59
  105. package/dist/chunk-FA2AFWLP.cjs.map +1 -0
  106. package/dist/{chunk-ZBVZ7HXD.cjs → chunk-FQPEMEWX.cjs} +12 -12
  107. package/dist/{chunk-ZBVZ7HXD.cjs.map → chunk-FQPEMEWX.cjs.map} +1 -1
  108. package/dist/{chunk-LNIWCQR4.js → chunk-GLHXM7C4.js} +3 -3
  109. package/dist/{chunk-LNIWCQR4.js.map → chunk-GLHXM7C4.js.map} +1 -1
  110. package/dist/{chunk-6BD6ZBKT.cjs → chunk-GYEG3ZLZ.cjs} +10 -10
  111. package/dist/{chunk-6BD6ZBKT.cjs.map → chunk-GYEG3ZLZ.cjs.map} +1 -1
  112. package/dist/{chunk-A7NMUYEL.cjs → chunk-HDL2ARHX.cjs} +27 -27
  113. package/dist/{chunk-A7NMUYEL.cjs.map → chunk-HDL2ARHX.cjs.map} +1 -1
  114. package/dist/{chunk-5ZJOB5YS.js → chunk-HEV35TGT.js} +4 -4
  115. package/dist/{chunk-5ZJOB5YS.js.map → chunk-HEV35TGT.js.map} +1 -1
  116. package/dist/{chunk-LHYSY6SE.js → chunk-I4GAZH5Z.js} +186 -9
  117. package/dist/chunk-I4GAZH5Z.js.map +1 -0
  118. package/dist/{chunk-BQM5P2NO.cjs → chunk-JB6T4GLL.cjs} +260 -223
  119. package/dist/chunk-JB6T4GLL.cjs.map +1 -0
  120. package/dist/{chunk-QPOQX2DI.cjs → chunk-JFRT7S3B.cjs} +1026 -369
  121. package/dist/chunk-JFRT7S3B.cjs.map +1 -0
  122. package/dist/{chunk-JCNTKRAK.js → chunk-JONXFAPO.js} +5 -5
  123. package/dist/{chunk-JCNTKRAK.js.map → chunk-JONXFAPO.js.map} +1 -1
  124. package/dist/{chunk-WEJHA7AD.js → chunk-KF6K7TGH.js} +109 -75
  125. package/dist/chunk-KF6K7TGH.js.map +1 -0
  126. package/dist/{chunk-EDJDDY6H.js → chunk-KKBDXCLQ.js} +4 -4
  127. package/dist/{chunk-EDJDDY6H.js.map → chunk-KKBDXCLQ.js.map} +1 -1
  128. package/dist/{chunk-ZHOAZD7Q.cjs → chunk-L3LQNR34.cjs} +161 -161
  129. package/dist/{chunk-ZHOAZD7Q.cjs.map → chunk-L3LQNR34.cjs.map} +1 -1
  130. package/dist/{chunk-AF3TWL5C.cjs → chunk-LRQKXRXO.cjs} +4 -4
  131. package/dist/{chunk-AF3TWL5C.cjs.map → chunk-LRQKXRXO.cjs.map} +1 -1
  132. package/dist/chunk-MKJ4KXL5.cjs +12 -0
  133. package/dist/{chunk-6LAXM4J2.cjs.map → chunk-MKJ4KXL5.cjs.map} +1 -1
  134. package/dist/{chunk-KCH7WQA5.cjs → chunk-MRDBBHIZ.cjs} +48 -2
  135. package/dist/chunk-MRDBBHIZ.cjs.map +1 -0
  136. package/dist/{chunk-FXNHZFZV.js → chunk-MYKHJI2J.js} +3 -3
  137. package/dist/{chunk-FXNHZFZV.js.map → chunk-MYKHJI2J.js.map} +1 -1
  138. package/dist/{chunk-Z43KWLZF.js → chunk-NACVVDWB.js} +213 -12
  139. package/dist/chunk-NACVVDWB.js.map +1 -0
  140. package/dist/{chunk-72WUT4GG.js → chunk-NVY5CJFP.js} +4 -4
  141. package/dist/{chunk-72WUT4GG.js.map → chunk-NVY5CJFP.js.map} +1 -1
  142. package/dist/{chunk-WYFB7BN3.js → chunk-OD4SSY2U.js} +166 -48
  143. package/dist/chunk-OD4SSY2U.js.map +1 -0
  144. package/dist/{chunk-ZIH42CRX.cjs → chunk-OI2GQ25X.cjs} +7 -7
  145. package/dist/{chunk-ZIH42CRX.cjs.map → chunk-OI2GQ25X.cjs.map} +1 -1
  146. package/dist/{chunk-AU3IJNNP.js → chunk-OMZ37BM2.js} +5 -5
  147. package/dist/{chunk-AU3IJNNP.js.map → chunk-OMZ37BM2.js.map} +1 -1
  148. package/dist/{chunk-C4DYN2SD.cjs → chunk-OORXGFL5.cjs} +48 -48
  149. package/dist/{chunk-C4DYN2SD.cjs.map → chunk-OORXGFL5.cjs.map} +1 -1
  150. package/dist/{chunk-HNYLMPQQ.cjs → chunk-OTUPEF2W.cjs} +149 -78
  151. package/dist/chunk-OTUPEF2W.cjs.map +1 -0
  152. package/dist/{chunk-BRN3RGD2.js → chunk-OVI7IXYX.js} +3 -3
  153. package/dist/{chunk-BRN3RGD2.js.map → chunk-OVI7IXYX.js.map} +1 -1
  154. package/dist/{chunk-WMKEGJG4.js → chunk-P6YLZTRE.js} +3 -3
  155. package/dist/{chunk-WMKEGJG4.js.map → chunk-P6YLZTRE.js.map} +1 -1
  156. package/dist/{chunk-C2ZP5YS6.cjs → chunk-PFBRJBUL.cjs} +278 -160
  157. package/dist/chunk-PFBRJBUL.cjs.map +1 -0
  158. package/dist/{chunk-EJSYWAEV.js → chunk-QTD6HX4O.js} +5 -5
  159. package/dist/{chunk-EJSYWAEV.js.map → chunk-QTD6HX4O.js.map} +1 -1
  160. package/dist/{chunk-JL5UEBWT.cjs → chunk-ROR5ZR6A.cjs} +45 -45
  161. package/dist/{chunk-JL5UEBWT.cjs.map → chunk-ROR5ZR6A.cjs.map} +1 -1
  162. package/dist/{chunk-EDHV4CBU.js → chunk-S5TERQVW.js} +37 -134
  163. package/dist/chunk-S5TERQVW.js.map +1 -0
  164. package/dist/{chunk-FSLTU57P.js → chunk-SDBBMD4N.js} +3 -3
  165. package/dist/{chunk-FSLTU57P.js.map → chunk-SDBBMD4N.js.map} +1 -1
  166. package/dist/{chunk-36LIJXWC.js → chunk-SHFBB23Q.js} +4 -4
  167. package/dist/{chunk-36LIJXWC.js.map → chunk-SHFBB23Q.js.map} +1 -1
  168. package/dist/chunk-SIT26LAZ.cjs +614 -0
  169. package/dist/chunk-SIT26LAZ.cjs.map +1 -0
  170. package/dist/{chunk-C6KE2HSQ.cjs → chunk-SR725PWF.cjs} +1662 -1392
  171. package/dist/chunk-SR725PWF.cjs.map +1 -0
  172. package/dist/{chunk-S7WIRFNS.cjs → chunk-TKZXMWQF.cjs} +13 -12
  173. package/dist/chunk-TKZXMWQF.cjs.map +1 -0
  174. package/dist/{chunk-5PDSCELM.cjs → chunk-TQHGE7UC.cjs} +29 -164
  175. package/dist/chunk-TQHGE7UC.cjs.map +1 -0
  176. package/dist/{chunk-XBHRKLZU.cjs → chunk-TUNPBZY3.cjs} +4 -4
  177. package/dist/{chunk-XBHRKLZU.cjs.map → chunk-TUNPBZY3.cjs.map} +1 -1
  178. package/dist/{chunk-KOAI3KIV.cjs → chunk-TZEGUG6D.cjs} +4 -4
  179. package/dist/{chunk-KOAI3KIV.cjs.map → chunk-TZEGUG6D.cjs.map} +1 -1
  180. package/dist/chunk-UGHG7PGX.js +592 -0
  181. package/dist/chunk-UGHG7PGX.js.map +1 -0
  182. package/dist/{chunk-N3QTGPC7.cjs → chunk-UMGZDVOA.cjs} +303 -101
  183. package/dist/chunk-UMGZDVOA.cjs.map +1 -0
  184. package/dist/{chunk-RHDOAQCT.cjs → chunk-WCCATHMB.cjs} +140 -135
  185. package/dist/chunk-WCCATHMB.cjs.map +1 -0
  186. package/dist/{chunk-DYPRZ53S.cjs → chunk-WODMN3Q2.cjs} +27 -27
  187. package/dist/{chunk-DYPRZ53S.cjs.map → chunk-WODMN3Q2.cjs.map} +1 -1
  188. package/dist/{chunk-OZJCH7ZS.js → chunk-XVWOYKIK.js} +3 -3
  189. package/dist/{chunk-OZJCH7ZS.js.map → chunk-XVWOYKIK.js.map} +1 -1
  190. package/dist/{chunk-IHRDX7K6.js → chunk-YIURNGXI.js} +46 -56
  191. package/dist/chunk-YIURNGXI.js.map +1 -0
  192. package/dist/{chunk-GWUWRZXW.js → chunk-YVF2EM7B.js} +3 -3
  193. package/dist/{chunk-GWUWRZXW.js.map → chunk-YVF2EM7B.js.map} +1 -1
  194. package/dist/{chunk-EAMVXR5B.js → chunk-ZDKTPBGV.js} +4 -4
  195. package/dist/{chunk-EAMVXR5B.js.map → chunk-ZDKTPBGV.js.map} +1 -1
  196. package/dist/{chunk-A2LJG5GM.js → chunk-ZFMCDJGB.js} +803 -148
  197. package/dist/chunk-ZFMCDJGB.js.map +1 -0
  198. package/dist/{chunk-62ZXBMSD.js → chunk-ZLONH2UD.js} +46 -3
  199. package/dist/chunk-ZLONH2UD.js.map +1 -0
  200. package/dist/core/index.cjs +28 -27
  201. package/dist/core/index.d.cts +4 -4
  202. package/dist/core/index.d.ts +4 -4
  203. package/dist/core/index.js +8 -7
  204. package/dist/ddl-BL1NZLMY.d.cts +78 -0
  205. package/dist/ddl-D_oW-EVO.d.ts +78 -0
  206. package/dist/graph-extension/index.cjs +20 -20
  207. package/dist/graph-extension/index.d.cts +4 -4
  208. package/dist/graph-extension/index.d.ts +4 -4
  209. package/dist/graph-extension/index.js +4 -4
  210. package/dist/graph-merge/index.cjs +3418 -706
  211. package/dist/graph-merge/index.cjs.map +1 -1
  212. package/dist/graph-merge/index.d.cts +550 -58
  213. package/dist/graph-merge/index.d.ts +550 -58
  214. package/dist/graph-merge/index.js +3191 -497
  215. package/dist/graph-merge/index.js.map +1 -1
  216. package/dist/{index-Deyu8IXL.d.ts → index-COs_z6nV.d.cts} +47 -3
  217. package/dist/{index-DrRS51Ld.d.cts → index-D7d1u2gr.d.ts} +47 -3
  218. package/dist/index.cjs +233 -216
  219. package/dist/index.cjs.map +1 -1
  220. package/dist/index.d.cts +12 -12
  221. package/dist/index.d.ts +12 -12
  222. package/dist/index.js +35 -34
  223. package/dist/index.js.map +1 -1
  224. package/dist/indexes/index.cjs +13 -13
  225. package/dist/indexes/index.d.cts +4 -4
  226. package/dist/indexes/index.d.ts +4 -4
  227. package/dist/indexes/index.js +6 -6
  228. package/dist/interchange/index.cjs +53 -52
  229. package/dist/interchange/index.cjs.map +1 -1
  230. package/dist/interchange/index.d.cts +17 -13
  231. package/dist/interchange/index.d.ts +17 -13
  232. package/dist/interchange/index.js +17 -16
  233. package/dist/interchange/index.js.map +1 -1
  234. package/dist/{manager-ptr3JLRP.d.cts → manager-CYaff3n3.d.cts} +2 -2
  235. package/dist/{manager-DX983gJ0.d.ts → manager-D9eRT_ns.d.ts} +2 -2
  236. package/dist/{materialize-indexes-CpXoggWU.d.ts → materialize-indexes-DJ3ykH59.d.ts} +1 -1
  237. package/dist/{materialize-indexes-BXz77YqO.d.cts → materialize-indexes-DTtAnvfY.d.cts} +1 -1
  238. package/dist/{postgres-DwgEXSPI.d.cts → postgres-CcL4bAHS.d.ts} +1 -1
  239. package/dist/{postgres-QdOMHTBz.d.ts → postgres-DMj39MEu.d.cts} +1 -1
  240. package/dist/profiler/index.d.cts +9 -9
  241. package/dist/profiler/index.d.ts +9 -9
  242. package/dist/provenance/index.cjs +46 -46
  243. package/dist/provenance/index.cjs.map +1 -1
  244. package/dist/provenance/index.d.cts +7 -7
  245. package/dist/provenance/index.d.ts +7 -7
  246. package/dist/provenance/index.js +13 -13
  247. package/dist/provenance/index.js.map +1 -1
  248. package/dist/repair-validity-windows-BFNZvd_H.d.cts +166 -0
  249. package/dist/repair-validity-windows-DlUSqwCg.d.ts +166 -0
  250. package/dist/schema/index.cjs +45 -44
  251. package/dist/schema/index.d.cts +6 -6
  252. package/dist/schema/index.d.ts +6 -6
  253. package/dist/schema/index.js +18 -17
  254. package/dist/{searchable-BOUuA83f.d.ts → searchable-DHJMh_nj.d.cts} +1 -1
  255. package/dist/{searchable-BrUh0pdc.d.cts → searchable-bpE1bBfc.d.ts} +1 -1
  256. package/dist/{sqlite-BfYcV61E.d.cts → sqlite-D7Oz0SQh.d.ts} +1 -1
  257. package/dist/{sqlite-DK40XVR1.d.ts → sqlite-YppHrNFb.d.cts} +1 -1
  258. package/dist/{store-FTqBpuJD.d.cts → store-JUVvtmR4.d.cts} +228 -92
  259. package/dist/{store-Bo1psfVZ.d.ts → store-UzrGvZOo.d.ts} +228 -92
  260. package/dist/{temporal-DPtn0HOu.d.ts → temporal-5GqpYCk2.d.cts} +1 -1
  261. package/dist/{temporal-CXewwLTB.d.cts → temporal-CbnLzTmM.d.ts} +1 -1
  262. package/dist/{types-Du78EvpN.d.ts → types-BqFZTQmV.d.cts} +60 -9
  263. package/dist/{types-Du78EvpN.d.cts → types-BqFZTQmV.d.ts} +60 -9
  264. package/dist/{types-CeT7xM4M.d.ts → types-Bx74kaTt.d.ts} +1 -1
  265. package/dist/{types-XR1nHERK.d.cts → types-CXAhpW-c.d.cts} +1 -1
  266. package/dist/{where-CJsp-YUf.d.cts → where-DI_Fqz-X.d.cts} +1 -1
  267. package/dist/{where-CMbFiWwp.d.ts → where-O-k2wgYm.d.ts} +1 -1
  268. package/package.json +1 -1
  269. package/dist/chunk-32UETY6S.cjs.map +0 -1
  270. package/dist/chunk-5PDSCELM.cjs.map +0 -1
  271. package/dist/chunk-62ZXBMSD.js.map +0 -1
  272. package/dist/chunk-6LAXM4J2.cjs +0 -12
  273. package/dist/chunk-73MWKDFK.cjs +0 -12
  274. package/dist/chunk-A2LJG5GM.js.map +0 -1
  275. package/dist/chunk-A4R3H7RU.cjs.map +0 -1
  276. package/dist/chunk-ANKOXPCC.cjs +0 -267
  277. package/dist/chunk-ANKOXPCC.cjs.map +0 -1
  278. package/dist/chunk-AT3MLMJV.js.map +0 -1
  279. package/dist/chunk-BEB4OFZF.cjs.map +0 -1
  280. package/dist/chunk-BQM5P2NO.cjs.map +0 -1
  281. package/dist/chunk-C2ZP5YS6.cjs.map +0 -1
  282. package/dist/chunk-C6KE2HSQ.cjs.map +0 -1
  283. package/dist/chunk-DSAWGCMP.js +0 -254
  284. package/dist/chunk-DSAWGCMP.js.map +0 -1
  285. package/dist/chunk-E4OSGBCM.cjs.map +0 -1
  286. package/dist/chunk-EDHV4CBU.js.map +0 -1
  287. package/dist/chunk-FA6Z7B5L.js +0 -244
  288. package/dist/chunk-FA6Z7B5L.js.map +0 -1
  289. package/dist/chunk-GVAMRRZR.cjs +0 -268
  290. package/dist/chunk-GVAMRRZR.cjs.map +0 -1
  291. package/dist/chunk-GWXXHOLU.js.map +0 -1
  292. package/dist/chunk-HNYLMPQQ.cjs.map +0 -1
  293. package/dist/chunk-IHRDX7K6.js.map +0 -1
  294. package/dist/chunk-KCH7WQA5.cjs.map +0 -1
  295. package/dist/chunk-KXSMF6PL.js.map +0 -1
  296. package/dist/chunk-LHYSY6SE.js.map +0 -1
  297. package/dist/chunk-N3QTGPC7.cjs.map +0 -1
  298. package/dist/chunk-QPOQX2DI.cjs.map +0 -1
  299. package/dist/chunk-R7EWHKID.js.map +0 -1
  300. package/dist/chunk-RFDEYLIK.js.map +0 -1
  301. package/dist/chunk-RHDOAQCT.cjs.map +0 -1
  302. package/dist/chunk-S3G5VLSW.js.map +0 -1
  303. package/dist/chunk-S7WIRFNS.cjs.map +0 -1
  304. package/dist/chunk-UTVQPZPN.cjs.map +0 -1
  305. package/dist/chunk-WEJHA7AD.js.map +0 -1
  306. package/dist/chunk-WYFB7BN3.js.map +0 -1
  307. package/dist/chunk-YQ4JONWE.js.map +0 -1
  308. package/dist/chunk-Z43KWLZF.js.map +0 -1
  309. package/dist/ddl-mE07h_EM.d.cts +0 -38
  310. package/dist/ddl-opIn8DfX.d.ts +0 -38
@@ -1,19 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var chunkBQM5P2NO_cjs = require('./chunk-BQM5P2NO.cjs');
4
- var chunk32UETY6S_cjs = require('./chunk-32UETY6S.cjs');
5
- var chunkQPOQX2DI_cjs = require('./chunk-QPOQX2DI.cjs');
6
- var chunkANKOXPCC_cjs = require('./chunk-ANKOXPCC.cjs');
7
- var chunkWA64ZSCA_cjs = require('./chunk-WA64ZSCA.cjs');
8
- var chunkZBVZ7HXD_cjs = require('./chunk-ZBVZ7HXD.cjs');
9
- var chunk5PDSCELM_cjs = require('./chunk-5PDSCELM.cjs');
10
- var chunkKCH7WQA5_cjs = require('./chunk-KCH7WQA5.cjs');
3
+ var chunkJB6T4GLL_cjs = require('./chunk-JB6T4GLL.cjs');
4
+ var chunk3KOY4FH3_cjs = require('./chunk-3KOY4FH3.cjs');
5
+ var chunkJFRT7S3B_cjs = require('./chunk-JFRT7S3B.cjs');
6
+ var chunkEZEEWCFJ_cjs = require('./chunk-EZEEWCFJ.cjs');
7
+ var chunkSIT26LAZ_cjs = require('./chunk-SIT26LAZ.cjs');
8
+ var chunk5PRKMB24_cjs = require('./chunk-5PRKMB24.cjs');
9
+ var chunkBFUOME67_cjs = require('./chunk-BFUOME67.cjs');
10
+ var chunkFQPEMEWX_cjs = require('./chunk-FQPEMEWX.cjs');
11
+ var chunkTQHGE7UC_cjs = require('./chunk-TQHGE7UC.cjs');
12
+ var chunkMRDBBHIZ_cjs = require('./chunk-MRDBBHIZ.cjs');
11
13
  var chunkN66HCGCY_cjs = require('./chunk-N66HCGCY.cjs');
12
14
  var zod = require('zod');
13
15
 
14
16
  var FORMAT_VERSION = "2.0";
15
17
  var AcceptedFormatVersionSchema = zod.z.enum(["1.0", "2.0"]);
16
- var ValidityTimestampSchema = zod.z.iso.datetime().refine((value) => chunk5PDSCELM_cjs.isCanonicalIsoDate(value), {
18
+ var ValidityTimestampSchema = zod.z.iso.datetime().refine((value) => chunkTQHGE7UC_cjs.isCanonicalIsoDate(value), {
17
19
  message: "Expected canonical UTC ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ); convert with new Date(value).toISOString()."
18
20
  });
19
21
  var InterchangeNodeSchema = zod.z.object({
@@ -22,10 +24,13 @@ var InterchangeNodeSchema = zod.z.object({
22
24
  properties: zod.z.record(zod.z.string(), zod.z.unknown()),
23
25
  /**
24
26
  * `undefined` (key absent): not requested (`includeTemporal: false`) —
25
- * import defaults it to the import's own creation timestamp. `null`:
26
- * requested and confirmed the row has no lower bound (e.g. a legacy row
27
- * predating the "omitted validFrom defaults to creation time" fix) —
28
- * import preserves that open-left validity instead of re-stamping it.
27
+ * import defaults it to the import's own creation timestamp, UNLESS the
28
+ * record states a `validTo` at or before that instant, in which case the row
29
+ * is imported with no lower bound ("ended at T, start unknown") rather than
30
+ * one after its own end (issue #407). `null`: requested and confirmed the row
31
+ * has no lower bound (e.g. a legacy row predating the "omitted validFrom
32
+ * defaults to creation time" fix) — import preserves that open-left validity
33
+ * instead of re-stamping it.
29
34
  */
30
35
  validFrom: ValidityTimestampSchema.nullable().optional(),
31
36
  validTo: ValidityTimestampSchema.optional(),
@@ -178,6 +183,7 @@ var ImportResultSchema = zod.z.object({
178
183
  }),
179
184
  errors: zod.z.array(ImportErrorSchema)
180
185
  });
186
+ var MAX_TIMER_DELAY_MS = 2147483647;
181
187
  var ExportOptionsSchema = zod.z.object({
182
188
  /** Filter to specific node kinds (undefined = all) */
183
189
  nodeKinds: zod.z.array(zod.z.string()).optional(),
@@ -217,6 +223,20 @@ var ExportOptionsSchema = zod.z.object({
217
223
  signal: zod.z.instanceof(AbortSignal).optional()
218
224
  });
219
225
  var ExportStreamOptionsSchema = ExportOptionsSchema.extend({
226
+ /**
227
+ * Maximum time the consumer may leave a delivered chunk unacknowledged
228
+ * before the export settles itself. The clock starts when a chunk is yielded
229
+ * and is cleared when the consumer asks for the next chunk, so time spent
230
+ * waiting for the backend to produce a chunk does not count as consumer
231
+ * idleness. On expiry, the consumer is rejected with
232
+ * `ExportStreamIdleTimeoutError` and any snapshot transaction and serialized
233
+ * connection lease are released.
234
+ *
235
+ * Omit this only when the caller guarantees a cooperative exit (`break`,
236
+ * `throw`, or `iterator.return()`) or supplies a signal it will abort. An
237
+ * abandoned async iterator is not closed by garbage collection.
238
+ */
239
+ idleTimeoutMs: zod.z.number().int().positive().max(MAX_TIMER_DELAY_MS).optional(),
220
240
  batchSize: zod.z.number().int().positive().default(1e3)
221
241
  });
222
242
 
@@ -239,8 +259,8 @@ async function importGraph(store, data, rawOptions) {
239
259
  );
240
260
  }
241
261
  async function withImportStreamLease(store, run) {
242
- const lease = chunkANKOXPCC_cjs.acquireSerializedStreamLease(
243
- chunk32UETY6S_cjs.storeBackend(store),
262
+ const lease = chunkSIT26LAZ_cjs.acquireSerializedStreamLease(
263
+ chunk3KOY4FH3_cjs.storeBackend(store),
244
264
  "import-stream"
245
265
  );
246
266
  if (!lease.acquired) {
@@ -263,13 +283,13 @@ async function importGraphData(store, data, options) {
263
283
  const errors = [];
264
284
  const graph = store.graph;
265
285
  const graphId = store.graphId;
266
- const backend = chunk32UETY6S_cjs.storeBackend(store);
267
- const runtime = chunk32UETY6S_cjs.storeRuntime(store);
286
+ const backend = chunk3KOY4FH3_cjs.storeBackend(store);
287
+ const runtime = chunk3KOY4FH3_cjs.storeRuntime(store);
268
288
  const registry = store.registry;
269
289
  const nodeSchemas = buildNodeSchemaMap(graph);
270
290
  const edgeSchemas = buildEdgeSchemaMap(graph);
271
291
  const importedNodeIds = /* @__PURE__ */ new Set();
272
- await chunkQPOQX2DI_cjs.runInWriteTransaction(
292
+ await chunkJFRT7S3B_cjs.runInWriteTransaction(
273
293
  {
274
294
  graphId,
275
295
  schemaVersion: store.introspect().schemaVersion,
@@ -332,8 +352,8 @@ async function importGraphData(store, data, options) {
332
352
  async function importGraphStream(store, chunks, rawOptions) {
333
353
  const options = ImportOptionsSchema.parse(rawOptions);
334
354
  const sourceBackend = exportStreamBackend(chunks);
335
- const targetBackend = chunk32UETY6S_cjs.storeBackend(store);
336
- const contention = sourceBackend === void 0 ? void 0 : chunkANKOXPCC_cjs.snapshotExportContention(sourceBackend, targetBackend);
355
+ const targetBackend = chunk3KOY4FH3_cjs.storeBackend(store);
356
+ const contention = sourceBackend === void 0 ? void 0 : chunkSIT26LAZ_cjs.snapshotExportContention(sourceBackend, targetBackend);
337
357
  if (contention !== void 0) {
338
358
  throw serializedStreamRefusal({
339
359
  graphId: store.graphId,
@@ -350,7 +370,7 @@ async function importGraphStream(store, chunks, rawOptions) {
350
370
  try {
351
371
  for await (const chunk of chunks) {
352
372
  if (releaseImportLease === void 0) {
353
- const lease = chunkANKOXPCC_cjs.acquireSerializedStreamLease(
373
+ const lease = chunkSIT26LAZ_cjs.acquireSerializedStreamLease(
354
374
  targetBackend,
355
375
  "import-stream"
356
376
  );
@@ -480,7 +500,7 @@ function serializedStreamRefusal(input) {
480
500
  requested,
481
501
  heldBy
482
502
  );
483
- return new chunkKCH7WQA5_cjs.ConfigurationError(
503
+ return new chunkMRDBBHIZ_cjs.ConfigurationError(
484
504
  message,
485
505
  { code, graphId, requested, heldBy },
486
506
  { suggestion }
@@ -515,7 +535,7 @@ function throwIfStreamChunkFailed(result, options) {
515
535
  }
516
536
  function assertIdentityImportSupported(store, hasIdentitySection) {
517
537
  if (hasIdentitySection && store.graph.identity === void 0) {
518
- throw new chunkKCH7WQA5_cjs.ConfigurationError(
538
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
519
539
  "Cannot import identity assertions into an identity-disabled graph.",
520
540
  { code: "IDENTITY_IMPORT_REQUIRES_PROFILE", graphId: store.graphId }
521
541
  );
@@ -525,7 +545,7 @@ function validateIdentitySection(identity) {
525
545
  if (identity === void 0) return;
526
546
  const parsed = InterchangeIdentitySchema.safeParse(identity);
527
547
  if (parsed.success) return;
528
- throw new chunkKCH7WQA5_cjs.ValidationError(
548
+ throw new chunkMRDBBHIZ_cjs.ValidationError(
529
549
  `Invalid identity interchange section: ${parsed.error.message}`,
530
550
  {
531
551
  issues: parsed.error.issues.map((issue) => ({
@@ -551,19 +571,19 @@ function identityImportError(assertion, graphId, message) {
551
571
  };
552
572
  }
553
573
  function isIdConflictError(error) {
554
- return error instanceof chunkKCH7WQA5_cjs.ConfigurationError && error.details["code"] === IDENTITY_IMPORT_ID_CONFLICT_CODE;
574
+ return error instanceof chunkMRDBBHIZ_cjs.ConfigurationError && error.details["code"] === IDENTITY_IMPORT_ID_CONFLICT_CODE;
555
575
  }
556
576
  function touchesRef(assertion, ref) {
557
577
  return assertion.a.kind === ref.kind && assertion.a.id === ref.id || assertion.b.kind === ref.kind && assertion.b.id === ref.id;
558
578
  }
559
579
  function asIdentityImportError(assertions, graphId, error) {
560
580
  const tagged = taggedAssertion(assertions, error);
561
- if (error instanceof chunkKCH7WQA5_cjs.NodeNotFoundError) {
581
+ if (error instanceof chunkMRDBBHIZ_cjs.NodeNotFoundError) {
562
582
  const ref = error.details;
563
583
  const assertion = tagged ?? assertions.find((candidate) => touchesRef(candidate, ref));
564
584
  return identityImportError(assertion, graphId, error.message);
565
585
  }
566
- if (error instanceof chunkKCH7WQA5_cjs.IdentityContradictionError) {
586
+ if (error instanceof chunkMRDBBHIZ_cjs.IdentityContradictionError) {
567
587
  const { a, b } = error.details;
568
588
  const assertion = tagged ?? assertions.find(
569
589
  (candidate) => touchesRef(candidate, a) && touchesRef(candidate, b)
@@ -589,12 +609,12 @@ function asIdentityImportError(assertions, graphId, error) {
589
609
  }
590
610
  function taggedAssertion(assertions, error) {
591
611
  if (typeof error !== "object" || error === null) return void 0;
592
- const id = error[chunkQPOQX2DI_cjs.IDENTITY_IMPORT_FAILED_ASSERTION];
612
+ const id = error[chunkJFRT7S3B_cjs.IDENTITY_IMPORT_FAILED_ASSERTION];
593
613
  if (typeof id !== "string") return void 0;
594
614
  return assertions.find((candidate) => candidate.id === id);
595
615
  }
596
616
  function isIdentityAssertionValidationError(error) {
597
- return error instanceof chunkKCH7WQA5_cjs.ValidationError && error.details.issues.length > 0 && error.details.issues.every(
617
+ return error instanceof chunkMRDBBHIZ_cjs.ValidationError && error.details.issues.length > 0 && error.details.issues.every(
598
618
  (issue) => issue.path === "identity.assertions" && issue.assertionId !== void 0
599
619
  );
600
620
  }
@@ -620,7 +640,7 @@ function identityImportProgress(error) {
620
640
  if (typeof error !== "object" || error === null) {
621
641
  return { created: 0, skipped: 0 };
622
642
  }
623
- const progress = error[chunkQPOQX2DI_cjs.IDENTITY_IMPORT_PROGRESS];
643
+ const progress = error[chunkJFRT7S3B_cjs.IDENTITY_IMPORT_PROGRESS];
624
644
  if (typeof progress !== "object" || progress === null || !("created" in progress) || typeof progress.created !== "number" || !("skipped" in progress) || typeof progress.skipped !== "number") {
625
645
  return { created: 0, skipped: 0 };
626
646
  }
@@ -629,7 +649,7 @@ function identityImportProgress(error) {
629
649
  function validateStreamHeader(header) {
630
650
  const parsed = GraphDataHeaderSchema.safeParse(header);
631
651
  if (parsed.success) return;
632
- throw new chunkKCH7WQA5_cjs.ValidationError(
652
+ throw new chunkMRDBBHIZ_cjs.ValidationError(
633
653
  `Invalid graph interchange stream header: ${parsed.error.message}`,
634
654
  {
635
655
  issues: parsed.error.issues.map((issue) => ({
@@ -689,7 +709,7 @@ async function refreshStatisticsAfterImport(store, options, result, surface) {
689
709
  }
690
710
  function buildNodeSchemaMap(graph) {
691
711
  const map = /* @__PURE__ */ new Map();
692
- for (const kindName of chunkWA64ZSCA_cjs.getNodeKinds(graph)) {
712
+ for (const kindName of chunkBFUOME67_cjs.getNodeKinds(graph)) {
693
713
  const registration = graph.nodes[kindName];
694
714
  map.set(kindName, {
695
715
  registration,
@@ -700,7 +720,7 @@ function buildNodeSchemaMap(graph) {
700
720
  }
701
721
  function buildEdgeSchemaMap(graph) {
702
722
  const map = /* @__PURE__ */ new Map();
703
- for (const kindName of chunkWA64ZSCA_cjs.getEdgeKinds(graph)) {
723
+ for (const kindName of chunkBFUOME67_cjs.getEdgeKinds(graph)) {
704
724
  const registration = graph.edges[kindName];
705
725
  map.set(kindName, {
706
726
  registration,
@@ -822,8 +842,8 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
822
842
  registerAppliedNodeUpdate,
823
843
  seedNodeRow,
824
844
  seedUniqueRow
825
- } = chunkBQM5P2NO_cjs.createNodeBatchValidationBackend(graphId, registry, backend);
826
- await chunkBQM5P2NO_cjs.primeBatchValidationCaches(
845
+ } = chunkJB6T4GLL_cjs.createNodeBatchValidationBackend(graphId, registry, backend);
846
+ await chunkJB6T4GLL_cjs.primeBatchValidationCaches(
827
847
  { graphId, registry },
828
848
  candidates.map((candidate) => candidate.draft),
829
849
  backend,
@@ -844,7 +864,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
844
864
  case "skip": {
845
865
  record(node, {
846
866
  status: "skipped",
847
- liveTarget: chunkANKOXPCC_cjs.isLiveNodeRow(existing)
867
+ liveTarget: chunk5PRKMB24_cjs.isLiveNodeRow(existing)
848
868
  });
849
869
  break;
850
870
  }
@@ -856,7 +876,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
856
876
  break;
857
877
  }
858
878
  case "update": {
859
- if (!chunkANKOXPCC_cjs.isLiveNodeRow(existing)) {
879
+ if (!chunk5PRKMB24_cjs.isLiveNodeRow(existing)) {
860
880
  record(node, { status: "skipped", liveTarget: false });
861
881
  break;
862
882
  }
@@ -891,7 +911,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
891
911
  registerAppliedNodeUpdate(
892
912
  node.kind,
893
913
  node.id,
894
- chunkANKOXPCC_cjs.rowPropsToObject(existing.props),
914
+ chunk5PRKMB24_cjs.rowPropsToObject(existing.props),
895
915
  props,
896
916
  uniqueConstraints
897
917
  );
@@ -906,7 +926,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
906
926
  continue;
907
927
  }
908
928
  const uniquenessResult = await catchUniquenessError(
909
- () => chunk32UETY6S_cjs.checkUniquenessConstraints(
929
+ () => chunk3KOY4FH3_cjs.checkUniquenessConstraints(
910
930
  { graphId, registry, backend: validationBackend },
911
931
  node.kind,
912
932
  node.id,
@@ -933,7 +953,7 @@ async function processNodeSlice(backend, graphId, registry, batch, schemas, opti
933
953
  } else {
934
954
  await backend.insertNodesBatch(insertParamsList);
935
955
  }
936
- await chunk32UETY6S_cjs.applyNodeInsertSideEffectsBatch(
956
+ await chunk3KOY4FH3_cjs.applyNodeInsertSideEffectsBatch(
937
957
  writeContext,
938
958
  accepted.map((candidate) => ({
939
959
  kind: candidate.node.kind,
@@ -978,7 +998,7 @@ async function catchUniquenessError(fn) {
978
998
  try {
979
999
  return { ok: true, value: await fn() };
980
1000
  } catch (error) {
981
- if (error instanceof chunkKCH7WQA5_cjs.UniquenessError) {
1001
+ if (error instanceof chunkMRDBBHIZ_cjs.UniquenessError) {
982
1002
  return { ok: false, error: error.message };
983
1003
  }
984
1004
  throw error;
@@ -988,7 +1008,7 @@ var NODE_UPDATE_TARGET_CHANGED_CODE = "INTERCHANGE_NODE_UPDATE_TARGET_CHANGED";
988
1008
  async function updateImportedNode(writeContext, backend, node, args) {
989
1009
  try {
990
1010
  const result = await catchUniquenessError(
991
- () => chunk32UETY6S_cjs.applyNodeUpdate(
1011
+ () => chunk3KOY4FH3_cjs.applyNodeUpdate(
992
1012
  writeContext,
993
1013
  {
994
1014
  existing: args.existing,
@@ -1003,7 +1023,7 @@ async function updateImportedNode(writeContext, backend, node, args) {
1003
1023
  );
1004
1024
  return result.ok ? void 0 : result.error;
1005
1025
  } catch (error) {
1006
- if (!(error instanceof chunkKCH7WQA5_cjs.DatabaseOperationError) || error.details.reason !== "no_row_returned") {
1026
+ if (!(error instanceof chunkMRDBBHIZ_cjs.DatabaseOperationError) || error.details.reason !== "no_row_returned") {
1007
1027
  throw error;
1008
1028
  }
1009
1029
  return `${NODE_UPDATE_TARGET_CHANGED_CODE}: Node "${node.kind}:${node.id}" was not updated: no live node matching the id and the validity bound this import checked remained when the write ran, so the row changed or was removed after it was checked. Re-export the source and retry.`;
@@ -1039,7 +1059,7 @@ async function updateImportedEdge(backend, graphId, edge, props, windowFence) {
1039
1059
  });
1040
1060
  return void 0;
1041
1061
  } catch (error) {
1042
- if (!(error instanceof chunkKCH7WQA5_cjs.DatabaseOperationError) || error.details.reason !== "no_row_returned") {
1062
+ if (!(error instanceof chunkMRDBBHIZ_cjs.DatabaseOperationError) || error.details.reason !== "no_row_returned") {
1043
1063
  throw error;
1044
1064
  }
1045
1065
  return `${EDGE_IDENTITY_CONFLICT_CODE}: Edge "${edge.id}" of kind "${edge.kind}" from "${edge.from.kind}:${edge.from.id}" to "${edge.to.kind}:${edge.to.id}" was not updated: no live edge matching the identity and the validity bound this import checked remained when the write ran, so the row changed or was removed after it was checked. Re-export the source and retry.`;
@@ -1049,9 +1069,9 @@ function windowResultOf(assert) {
1049
1069
  try {
1050
1070
  return { ok: true, value: assert() };
1051
1071
  } catch (error) {
1052
- if (error instanceof chunkKCH7WQA5_cjs.ValidationError) {
1072
+ if (error instanceof chunkMRDBBHIZ_cjs.ValidationError) {
1053
1073
  const coded = error.details.issues.find(
1054
- (issue) => issue.code === chunkKCH7WQA5_cjs.INVERTED_VALIDITY_WINDOW_CODE || issue.code === chunkKCH7WQA5_cjs.IMMUTABLE_VALIDITY_LOWER_BOUND_CODE
1074
+ (issue) => issue.code === chunkMRDBBHIZ_cjs.INVERTED_VALIDITY_WINDOW_CODE || issue.code === chunkMRDBBHIZ_cjs.IMMUTABLE_VALIDITY_LOWER_BOUND_CODE
1055
1075
  );
1056
1076
  if (coded !== void 0) {
1057
1077
  return { ok: false, error: `${coded.code}: ${error.message}` };
@@ -1069,12 +1089,12 @@ function windowErrorOf(assert) {
1069
1089
  }
1070
1090
  function validateValidityWindow(entity) {
1071
1091
  return windowErrorOf(() => {
1072
- chunk5PDSCELM_cjs.validateOptionalCanonicalIsoDate(
1092
+ chunkTQHGE7UC_cjs.validateOptionalCanonicalIsoDate(
1073
1093
  entity.validFrom ?? void 0,
1074
1094
  "validFrom"
1075
1095
  );
1076
- chunk5PDSCELM_cjs.validateOptionalCanonicalIsoDate(entity.validTo, "validTo");
1077
- chunk5PDSCELM_cjs.assertOrderedValidityWindow(
1096
+ chunkTQHGE7UC_cjs.validateOptionalCanonicalIsoDate(entity.validTo, "validTo");
1097
+ chunkTQHGE7UC_cjs.assertOrderedValidityWindow(
1078
1098
  `${entity.kind} "${entity.id}"`,
1079
1099
  entity.validFrom ?? void 0,
1080
1100
  entity.validTo
@@ -1083,7 +1103,7 @@ function validateValidityWindow(entity) {
1083
1103
  }
1084
1104
  function validateUpdateValidityWindow(entity, storedValidFrom) {
1085
1105
  const verdict = windowResultOf(
1086
- () => chunk5PDSCELM_cjs.assertWritableValidityWindow(
1106
+ () => chunkTQHGE7UC_cjs.assertWritableValidityWindow(
1087
1107
  `${entity.kind} "${entity.id}"`,
1088
1108
  entity.validFrom ?? void 0,
1089
1109
  {
@@ -1122,7 +1142,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
1122
1142
  if (existing) {
1123
1143
  switch (options.onConflict) {
1124
1144
  case "skip": {
1125
- return { status: "skipped", liveTarget: chunkANKOXPCC_cjs.isLiveNodeRow(existing) };
1145
+ return { status: "skipped", liveTarget: chunk5PRKMB24_cjs.isLiveNodeRow(existing) };
1126
1146
  }
1127
1147
  case "error": {
1128
1148
  return {
@@ -1131,7 +1151,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
1131
1151
  };
1132
1152
  }
1133
1153
  case "update": {
1134
- if (!chunkANKOXPCC_cjs.isLiveNodeRow(existing)) {
1154
+ if (!chunk5PRKMB24_cjs.isLiveNodeRow(existing)) {
1135
1155
  return { status: "skipped", liveTarget: false };
1136
1156
  }
1137
1157
  const updateWindow = validateUpdateValidityWindow(
@@ -1161,7 +1181,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
1161
1181
  }
1162
1182
  }
1163
1183
  const uniquenessResult = await catchUniquenessError(
1164
- () => chunk32UETY6S_cjs.checkUniquenessConstraints(
1184
+ () => chunk3KOY4FH3_cjs.checkUniquenessConstraints(
1165
1185
  { graphId, registry, backend },
1166
1186
  node.kind,
1167
1187
  node.id,
@@ -1180,7 +1200,7 @@ async function processNode(backend, graphId, registry, node, schemas, options, l
1180
1200
  ...node.validFrom !== void 0 && { validFrom: node.validFrom },
1181
1201
  ...node.validTo !== void 0 && { validTo: node.validTo }
1182
1202
  });
1183
- await chunk32UETY6S_cjs.applyNodeInsertSideEffects(
1203
+ await chunk3KOY4FH3_cjs.applyNodeInsertSideEffects(
1184
1204
  writeContext,
1185
1205
  {
1186
1206
  kind: node.kind,
@@ -1266,7 +1286,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
1266
1286
  });
1267
1287
  continue;
1268
1288
  }
1269
- const endpointError = chunkZBVZ7HXD_cjs.validateEdgeEndpoints(
1289
+ const endpointError = chunkFQPEMEWX_cjs.validateEdgeEndpoints(
1270
1290
  edge.kind,
1271
1291
  edge.from.kind,
1272
1292
  edge.to.kind,
@@ -1315,7 +1335,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
1315
1335
  for (const [kind, ids] of idsByKind) {
1316
1336
  const rows = await backend.getNodes(graphId, kind, [...ids]);
1317
1337
  for (const row of rows) {
1318
- if (chunkANKOXPCC_cjs.isLiveNodeRow(row)) {
1338
+ if (chunk5PRKMB24_cjs.isLiveNodeRow(row)) {
1319
1339
  liveEndpointKeys.add(makeNodeKey(kind, row.id));
1320
1340
  }
1321
1341
  }
@@ -1326,7 +1346,7 @@ async function processEdgeSlice(backend, graphId, registry, batch, edgeSchemas,
1326
1346
  if (importedNodeIds.has(key)) return true;
1327
1347
  if (checkedEndpointKeys.has(key)) return liveEndpointKeys.has(key);
1328
1348
  const row = await backend.getNode(graphId, endpoint.kind, endpoint.id);
1329
- return row !== void 0 && chunkANKOXPCC_cjs.isLiveNodeRow(row);
1349
+ return row !== void 0 && chunk5PRKMB24_cjs.isLiveNodeRow(row);
1330
1350
  };
1331
1351
  const existingById = /* @__PURE__ */ new Map();
1332
1352
  if (candidates.length > 0 && backend.getEdges !== void 0) {
@@ -1468,7 +1488,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
1468
1488
  if (!nodeSchemas.has(edge.to.kind)) {
1469
1489
  return { status: "error", error: `Unknown to node kind: ${edge.to.kind}` };
1470
1490
  }
1471
- const endpointError = chunkZBVZ7HXD_cjs.validateEdgeEndpoints(
1491
+ const endpointError = chunkFQPEMEWX_cjs.validateEdgeEndpoints(
1472
1492
  edge.kind,
1473
1493
  edge.from.kind,
1474
1494
  edge.to.kind,
@@ -1487,7 +1507,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
1487
1507
  edge.from.kind,
1488
1508
  edge.from.id
1489
1509
  );
1490
- if (fromExists === void 0 || !chunkANKOXPCC_cjs.isLiveNodeRow(fromExists)) {
1510
+ if (fromExists === void 0 || !chunk5PRKMB24_cjs.isLiveNodeRow(fromExists)) {
1491
1511
  return {
1492
1512
  status: "error",
1493
1513
  error: `From node not found: ${edge.from.kind}:${edge.from.id}`
@@ -1496,7 +1516,7 @@ async function processEdge(backend, graphId, registry, edge, edgeSchemas, nodeSc
1496
1516
  }
1497
1517
  if (!importedNodeIds.has(toKey)) {
1498
1518
  const toExists = await backend.getNode(graphId, edge.to.kind, edge.to.id);
1499
- if (toExists === void 0 || !chunkANKOXPCC_cjs.isLiveNodeRow(toExists)) {
1519
+ if (toExists === void 0 || !chunk5PRKMB24_cjs.isLiveNodeRow(toExists)) {
1500
1520
  return {
1501
1521
  status: "error",
1502
1522
  error: `To node not found: ${edge.to.kind}:${edge.to.id}`
@@ -1633,7 +1653,7 @@ function formatZodError(error) {
1633
1653
  }).join("; ");
1634
1654
  }
1635
1655
  function makeNodeKey(kind, id) {
1636
- return chunkQPOQX2DI_cjs.encodeTupleKey([kind, id]);
1656
+ return chunkEZEEWCFJ_cjs.encodeTupleKey([kind, id]);
1637
1657
  }
1638
1658
 
1639
1659
  // src/interchange/export.ts
@@ -1676,17 +1696,62 @@ async function exportGraph(store, options) {
1676
1696
  };
1677
1697
  }
1678
1698
  function exportGraphStream(store, options) {
1679
- const backend = chunk32UETY6S_cjs.storeBackend(store);
1699
+ const backend = chunk3KOY4FH3_cjs.storeBackend(store);
1680
1700
  return markExportStreamBackend(
1681
1701
  exportGraphStreamFromBackend(store, backend, options),
1682
1702
  backend
1683
1703
  );
1684
1704
  }
1685
1705
  async function* exportGraphStreamFromBackend(store, backend, options) {
1686
- const resolved = ExportStreamOptionsSchema.parse(options ?? {});
1706
+ const parsed = ExportStreamOptionsSchema.parse(options ?? {});
1707
+ const exportsIdentity = store.graph.identity !== void 0;
1708
+ const explicitlyDisabledTemporalFields = options?.includeTemporal === false;
1709
+ if (exportsIdentity && explicitlyDisabledTemporalFields) {
1710
+ throw new chunkMRDBBHIZ_cjs.ConfigurationError(
1711
+ "Identity export requires temporal endpoint fields.",
1712
+ {
1713
+ code: "IDENTITY_EXPORT_REQUIRES_TEMPORAL_FIELDS",
1714
+ identityMode: parsed.identityMode,
1715
+ includeTemporal: false
1716
+ },
1717
+ {
1718
+ suggestion: "Remove includeTemporal or set it to true when exporting an identity-enabled graph."
1719
+ }
1720
+ );
1721
+ }
1722
+ const resolved = exportsIdentity ? { ...parsed, includeTemporal: true } : parsed;
1687
1723
  const signal = resolved.signal;
1724
+ const idleTimeoutMs = resolved.idleTimeoutMs;
1688
1725
  const channel = createRendezvousChannel();
1689
- const abortStream = () => {
1726
+ let idleTimer;
1727
+ let subscribedToSignal = false;
1728
+ function unsubscribeFromSignal() {
1729
+ if (!subscribedToSignal) return;
1730
+ signal?.removeEventListener("abort", abortStream);
1731
+ subscribedToSignal = false;
1732
+ }
1733
+ function clearIdleTimer() {
1734
+ if (idleTimer === void 0) return;
1735
+ clearTimeout(idleTimer);
1736
+ idleTimer = void 0;
1737
+ }
1738
+ function armIdleTimer() {
1739
+ if (idleTimeoutMs === void 0) return;
1740
+ idleTimer = setTimeout(() => {
1741
+ idleTimer = void 0;
1742
+ unsubscribeFromSignal();
1743
+ channel.abort(
1744
+ new chunkMRDBBHIZ_cjs.ExportStreamIdleTimeoutError(
1745
+ store.graphId,
1746
+ idleTimeoutMs,
1747
+ backend.capabilities.transactions
1748
+ )
1749
+ );
1750
+ }, idleTimeoutMs);
1751
+ unrefTimer(idleTimer);
1752
+ }
1753
+ function abortStream() {
1754
+ clearIdleTimer();
1690
1755
  channel.abort(
1691
1756
  exportStreamCancelled(
1692
1757
  "mid-stream",
@@ -1695,11 +1760,9 @@ async function* exportGraphStreamFromBackend(store, backend, options) {
1695
1760
  backend.capabilities.transactions
1696
1761
  )
1697
1762
  );
1698
- };
1699
- const unsubscribeFromSignal = () => {
1700
- signal?.removeEventListener("abort", abortStream);
1701
- };
1763
+ }
1702
1764
  signal?.addEventListener("abort", abortStream, { once: true });
1765
+ subscribedToSignal = signal !== void 0;
1703
1766
  if (signal?.aborted === true) {
1704
1767
  unsubscribeFromSignal();
1705
1768
  throw exportStreamCancelled(
@@ -1750,20 +1813,28 @@ async function* exportGraphStreamFromBackend(store, backend, options) {
1750
1813
  for (; ; ) {
1751
1814
  const delivery = await channel.take();
1752
1815
  if (delivery === void 0) return;
1816
+ armIdleTimer();
1753
1817
  yield delivery.value;
1818
+ clearIdleTimer();
1754
1819
  delivery.acknowledge();
1755
1820
  }
1756
1821
  } finally {
1757
1822
  unsubscribeFromSignal();
1823
+ clearIdleTimer();
1758
1824
  channel.cancel();
1759
1825
  await producer;
1760
1826
  }
1761
1827
  }
1828
+ function unrefTimer(timer) {
1829
+ if (typeof timer === "object" && "unref" in timer && typeof timer.unref === "function") {
1830
+ timer.unref();
1831
+ }
1832
+ }
1762
1833
  function exportStreamCancelled(phase, graphId, signal, framed) {
1763
1834
  const message = phase === "before-open" ? "The graph export stream was aborted through its AbortSignal before it opened: no snapshot transaction was started and no database connection claimed." : framed ? "The graph export stream was aborted through its AbortSignal: its repeatable-read snapshot has been rolled back and the connection it held released." : "The graph export stream was aborted through its AbortSignal: its remaining reads were abandoned. This backend does not support transactions, so the export held no snapshot and no connection \u2014 and the chunks already delivered were never guaranteed to agree with one another.";
1764
1835
  const cause = signal?.reason;
1765
1836
  const suggestion = phase === "before-open" ? "Start a new export; the aborted one claimed nothing." : framed ? "Start a new export; the aborted one released its snapshot transaction and the connection it held." : "Start a new export; nothing was held, but discard the chunks already delivered unless partial, mutually-inconsistent data is acceptable.";
1766
- return new chunkKCH7WQA5_cjs.ExportStreamCancelledError(
1837
+ return new chunkMRDBBHIZ_cjs.ExportStreamCancelledError(
1767
1838
  message,
1768
1839
  { graphId },
1769
1840
  {
@@ -1773,7 +1844,7 @@ function exportStreamCancelled(phase, graphId, signal, framed) {
1773
1844
  );
1774
1845
  }
1775
1846
  function claimSnapshotExportLeaseOrRefuse(graphId, backend) {
1776
- const lease = chunkANKOXPCC_cjs.acquireSerializedStreamLease(backend, "export-snapshot");
1847
+ const lease = chunkSIT26LAZ_cjs.acquireSerializedStreamLease(backend, "export-snapshot");
1777
1848
  if (!lease.acquired) {
1778
1849
  throw serializedStreamRefusal({
1779
1850
  graphId,
@@ -1785,14 +1856,14 @@ function claimSnapshotExportLeaseOrRefuse(graphId, backend) {
1785
1856
  }
1786
1857
  async function produceExportChunks(store, backend, options, emit) {
1787
1858
  const graphId = store.graphId;
1788
- const nodeKinds = options.nodeKinds ?? chunkWA64ZSCA_cjs.getNodeKinds(store.graph);
1789
- const edgeKinds = options.edgeKinds ?? chunkWA64ZSCA_cjs.getEdgeKinds(store.graph);
1859
+ const nodeKinds = options.nodeKinds ?? chunkBFUOME67_cjs.getNodeKinds(store.graph);
1860
+ const edgeKinds = options.edgeKinds ?? chunkBFUOME67_cjs.getEdgeKinds(store.graph);
1790
1861
  const schemaVersion = await backend.getActiveSchema(graphId);
1791
1862
  await emit({
1792
1863
  type: "header",
1793
1864
  header: {
1794
1865
  formatVersion: FORMAT_VERSION,
1795
- exportedAt: chunk5PDSCELM_cjs.nowIso(),
1866
+ exportedAt: chunkTQHGE7UC_cjs.nowIso(),
1796
1867
  source: {
1797
1868
  type: "typegraph-export",
1798
1869
  graphId,
@@ -1829,7 +1900,7 @@ async function produceExportChunks(store, backend, options, emit) {
1829
1900
  if (store.graph.identity === void 0) return;
1830
1901
  let after;
1831
1902
  for (; ; ) {
1832
- const page = await chunk32UETY6S_cjs.storeRuntime(store).readIdentityAssertionPageAtTarget(
1903
+ const page = await chunk3KOY4FH3_cjs.storeRuntime(store).readIdentityAssertionPageAtTarget(
1833
1904
  backend,
1834
1905
  options.identityMode,
1835
1906
  {
@@ -1978,7 +2049,7 @@ async function* exportNodeChunks(backend, graphId, kind, options) {
1978
2049
  const node = {
1979
2050
  kind: row.kind,
1980
2051
  id: row.id,
1981
- properties: chunkANKOXPCC_cjs.rowPropsToObject(row.props)
2052
+ properties: chunk5PRKMB24_cjs.rowPropsToObject(row.props)
1982
2053
  };
1983
2054
  if (options.includeTemporal) {
1984
2055
  const validFrom = (
@@ -2028,7 +2099,7 @@ async function* exportEdgeChunks(backend, graphId, kind, options) {
2028
2099
  kind: row.to_kind,
2029
2100
  id: row.to_id
2030
2101
  },
2031
- properties: chunkANKOXPCC_cjs.rowPropsToObject(row.props)
2102
+ properties: chunk5PRKMB24_cjs.rowPropsToObject(row.props)
2032
2103
  };
2033
2104
  if (options.includeTemporal) {
2034
2105
  const validFrom = (
@@ -2078,5 +2149,5 @@ exports.importGraph = importGraph;
2078
2149
  exports.importGraphStream = importGraphStream;
2079
2150
  exports.serializedStreamRefusal = serializedStreamRefusal;
2080
2151
  exports.withImportStreamLease = withImportStreamLease;
2081
- //# sourceMappingURL=chunk-HNYLMPQQ.cjs.map
2082
- //# sourceMappingURL=chunk-HNYLMPQQ.cjs.map
2152
+ //# sourceMappingURL=chunk-OTUPEF2W.cjs.map
2153
+ //# sourceMappingURL=chunk-OTUPEF2W.cjs.map