@nicia-ai/typegraph 0.50.0 → 0.51.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.
- package/README.md +12 -0
- package/dist/backend/drizzle/indexes.cjs +10 -8
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +6 -4
- package/dist/backend/index.cjs +183 -50
- package/dist/backend/index.d.cts +90 -4
- package/dist/backend/index.d.ts +90 -4
- package/dist/backend/index.js +6 -9
- package/dist/backend/postgres/index.cjs +30 -28
- package/dist/backend/postgres/index.d.cts +7 -7
- package/dist/backend/postgres/index.d.ts +7 -7
- package/dist/backend/postgres/index.js +16 -14
- package/dist/backend/postgres/pglite-store.cjs +6 -62
- package/dist/backend/postgres/pglite-store.cjs.map +1 -1
- package/dist/backend/postgres/pglite-store.d.cts +8 -8
- package/dist/backend/postgres/pglite-store.d.ts +8 -8
- package/dist/backend/postgres/pglite-store.js +6 -62
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +18 -16
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +17 -15
- package/dist/backend/sqlite/index.cjs +27 -25
- package/dist/backend/sqlite/index.d.cts +7 -7
- package/dist/backend/sqlite/index.d.ts +7 -7
- package/dist/backend/sqlite/index.js +14 -12
- package/dist/backend/sqlite/libsql.cjs +21 -19
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +16 -14
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +8 -64
- package/dist/backend/sqlite/local-store.cjs.map +1 -1
- package/dist/backend/sqlite/local-store.d.cts +8 -8
- package/dist/backend/sqlite/local-store.d.ts +8 -8
- package/dist/backend/sqlite/local-store.js +7 -64
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +22 -19
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +18 -15
- package/dist/{chunk-TUVD4DFR.cjs → chunk-2CVDZCXH.cjs} +122 -51
- package/dist/chunk-2CVDZCXH.cjs.map +1 -0
- package/dist/{chunk-I5C6OTKR.js → chunk-2DWTBNSH.js} +3 -3
- package/dist/{chunk-I5C6OTKR.js.map → chunk-2DWTBNSH.js.map} +1 -1
- package/dist/{chunk-C76WFIVZ.cjs → chunk-2KCTP3U2.cjs} +180 -127
- package/dist/chunk-2KCTP3U2.cjs.map +1 -0
- package/dist/{chunk-BYBDM423.cjs → chunk-322TBTOQ.cjs} +48 -48
- package/dist/{chunk-BYBDM423.cjs.map → chunk-322TBTOQ.cjs.map} +1 -1
- package/dist/chunk-36SX6QXP.cjs +186 -0
- package/dist/chunk-36SX6QXP.cjs.map +1 -0
- package/dist/{chunk-H3XP6BAV.js → chunk-36VYWVQU.js} +3 -3
- package/dist/{chunk-H3XP6BAV.js.map → chunk-36VYWVQU.js.map} +1 -1
- package/dist/{chunk-VTJVMP4I.js → chunk-4DKY6RIU.js} +102 -31
- package/dist/chunk-4DKY6RIU.js.map +1 -0
- package/dist/chunk-4QKOZYMV.js +9 -0
- package/dist/chunk-4QKOZYMV.js.map +1 -0
- package/dist/{chunk-U3Z7XKAG.js → chunk-57JM6NW3.js} +8 -18
- package/dist/chunk-57JM6NW3.js.map +1 -0
- package/dist/{chunk-XMY2SXOH.cjs → chunk-5WWEYV4H.cjs} +2208 -579
- package/dist/chunk-5WWEYV4H.cjs.map +1 -0
- package/dist/{chunk-WQBAQZHR.js → chunk-6NLYIMJO.js} +4 -4
- package/dist/{chunk-WQBAQZHR.js.map → chunk-6NLYIMJO.js.map} +1 -1
- package/dist/{chunk-G2TLHH6T.cjs → chunk-7B7I7YAW.cjs} +6 -6
- package/dist/{chunk-G2TLHH6T.cjs.map → chunk-7B7I7YAW.cjs.map} +1 -1
- package/dist/{chunk-EDLKIQRI.js → chunk-7G5IYROL.js} +6 -548
- package/dist/chunk-7G5IYROL.js.map +1 -0
- package/dist/{chunk-46UGOVRW.js → chunk-7QFRK6PU.js} +3 -7
- package/dist/chunk-7QFRK6PU.js.map +1 -0
- package/dist/chunk-A4C4NJ5U.cjs +12 -0
- package/dist/chunk-A4C4NJ5U.cjs.map +1 -0
- package/dist/{chunk-TYGGUWMS.cjs → chunk-B3MN7EJR.cjs} +177 -137
- package/dist/chunk-B3MN7EJR.cjs.map +1 -0
- package/dist/{chunk-K6VKTBST.cjs → chunk-BZ5MVITP.cjs} +4 -4
- package/dist/{chunk-K6VKTBST.cjs.map → chunk-BZ5MVITP.cjs.map} +1 -1
- package/dist/{chunk-R7MRFE5P.js → chunk-CAI6SMP6.js} +3 -3
- package/dist/{chunk-R7MRFE5P.js.map → chunk-CAI6SMP6.js.map} +1 -1
- package/dist/{chunk-ZAQUKCUC.js → chunk-CBOD7TXH.js} +5 -5
- package/dist/{chunk-ZAQUKCUC.js.map → chunk-CBOD7TXH.js.map} +1 -1
- package/dist/{chunk-LLVOQOWE.cjs → chunk-CRZ56SZU.cjs} +6 -5
- package/dist/chunk-CRZ56SZU.cjs.map +1 -0
- package/dist/{chunk-ON47CBE4.cjs → chunk-D3GWARN7.cjs} +47 -47
- package/dist/{chunk-ON47CBE4.cjs.map → chunk-D3GWARN7.cjs.map} +1 -1
- package/dist/{chunk-W5SOCUBL.js → chunk-D3OUDFU7.js} +5 -5
- package/dist/{chunk-W5SOCUBL.js.map → chunk-D3OUDFU7.js.map} +1 -1
- package/dist/chunk-EKG2UXNX.cjs +23 -0
- package/dist/chunk-EKG2UXNX.cjs.map +1 -0
- package/dist/{chunk-7PRMDZIA.cjs → chunk-FMMW3KX7.cjs} +21 -55
- package/dist/chunk-FMMW3KX7.cjs.map +1 -0
- package/dist/chunk-H2VWDQWC.cjs +571 -0
- package/dist/chunk-H2VWDQWC.cjs.map +1 -0
- package/dist/chunk-H4FY6OZK.js +13 -0
- package/dist/chunk-H4FY6OZK.js.map +1 -0
- package/dist/{chunk-OJHD3LXJ.cjs → chunk-H5IJSROF.cjs} +2 -8
- package/dist/chunk-H5IJSROF.cjs.map +1 -0
- package/dist/{chunk-U5EL6JUV.js → chunk-I5IOSA27.js} +101 -103
- package/dist/chunk-I5IOSA27.js.map +1 -0
- package/dist/{chunk-SHC7BCG5.cjs → chunk-I7YAY2VQ.cjs} +7 -7
- package/dist/{chunk-SHC7BCG5.cjs.map → chunk-I7YAY2VQ.cjs.map} +1 -1
- package/dist/chunk-IRCWIA3R.js +20 -0
- package/dist/chunk-IRCWIA3R.js.map +1 -0
- package/dist/chunk-IVQBLXBK.cjs +55 -0
- package/dist/chunk-IVQBLXBK.cjs.map +1 -0
- package/dist/{chunk-5PP4KRPV.js → chunk-IZD4HTCP.js} +5 -5
- package/dist/{chunk-5PP4KRPV.js.map → chunk-IZD4HTCP.js.map} +1 -1
- package/dist/{chunk-7CCMCMJO.cjs → chunk-JHRUZ73O.cjs} +75 -66
- package/dist/chunk-JHRUZ73O.cjs.map +1 -0
- package/dist/{chunk-RDP6ZRSM.cjs → chunk-JQKMEKKW.cjs} +261 -204
- package/dist/chunk-JQKMEKKW.cjs.map +1 -0
- package/dist/chunk-JVA3KDEA.cjs +691 -0
- package/dist/chunk-JVA3KDEA.cjs.map +1 -0
- package/dist/{chunk-JG5XIJDY.js → chunk-K67P5DLL.js} +62 -22
- package/dist/chunk-K67P5DLL.js.map +1 -0
- package/dist/{chunk-CS6JTQQ2.cjs → chunk-KACEYDYV.cjs} +94 -62
- package/dist/chunk-KACEYDYV.cjs.map +1 -0
- package/dist/{chunk-5OWHU7Z7.cjs → chunk-L6EVYIID.cjs} +248 -210
- package/dist/chunk-L6EVYIID.cjs.map +1 -0
- package/dist/{chunk-7OWE7WD6.js → chunk-LI4K2KEJ.js} +4 -4
- package/dist/{chunk-7OWE7WD6.js.map → chunk-LI4K2KEJ.js.map} +1 -1
- package/dist/chunk-LKZDQ2B4.js +1581 -0
- package/dist/chunk-LKZDQ2B4.js.map +1 -0
- package/dist/{chunk-45YZXI6X.cjs → chunk-LLFPQOBA.cjs} +27 -27
- package/dist/{chunk-45YZXI6X.cjs.map → chunk-LLFPQOBA.cjs.map} +1 -1
- package/dist/{chunk-ZRJTM7MT.js → chunk-LZMQ3SFK.js} +3 -3
- package/dist/{chunk-ZRJTM7MT.js.map → chunk-LZMQ3SFK.js.map} +1 -1
- package/dist/{chunk-DI6VC62F.js → chunk-M3VTS3F6.js} +3 -3
- package/dist/{chunk-DI6VC62F.js.map → chunk-M3VTS3F6.js.map} +1 -1
- package/dist/{chunk-MZ34E2GN.js → chunk-NBOS7BY3.js} +60 -21
- package/dist/chunk-NBOS7BY3.js.map +1 -0
- package/dist/{chunk-YA36ABIL.js → chunk-NGQDGL5X.js} +14 -48
- package/dist/chunk-NGQDGL5X.js.map +1 -0
- package/dist/{chunk-ZBFZGLZE.cjs → chunk-NLX5OWK7.cjs} +6 -2
- package/dist/chunk-NLX5OWK7.cjs.map +1 -0
- package/dist/chunk-NUQ2YFFH.cjs +1637 -0
- package/dist/chunk-NUQ2YFFH.cjs.map +1 -0
- package/dist/{chunk-TTCOPKUL.cjs → chunk-OGL4X4PH.cjs} +182 -184
- package/dist/chunk-OGL4X4PH.cjs.map +1 -0
- package/dist/{chunk-HY5BNOUN.cjs → chunk-OTNTGEXR.cjs} +4 -4
- package/dist/{chunk-HY5BNOUN.cjs.map → chunk-OTNTGEXR.cjs.map} +1 -1
- package/dist/chunk-OTWE63BW.js +53 -0
- package/dist/chunk-OTWE63BW.js.map +1 -0
- package/dist/chunk-PC5NGH5A.js +549 -0
- package/dist/chunk-PC5NGH5A.js.map +1 -0
- package/dist/{chunk-IPRP6TDL.cjs → chunk-PS3TUWJM.cjs} +7 -7
- package/dist/{chunk-IPRP6TDL.cjs.map → chunk-PS3TUWJM.cjs.map} +1 -1
- package/dist/{chunk-V76FGHY3.js → chunk-PVFFH7TL.js} +5 -5
- package/dist/{chunk-V76FGHY3.js.map → chunk-PVFFH7TL.js.map} +1 -1
- package/dist/chunk-QCD5JKU4.cjs +15 -0
- package/dist/chunk-QCD5JKU4.cjs.map +1 -0
- package/dist/{chunk-IRPYOHRC.js → chunk-QG5VEOKX.js} +6 -2
- package/dist/chunk-QG5VEOKX.js.map +1 -0
- package/dist/{chunk-MM3JHVKZ.cjs → chunk-QLLZM5I3.cjs} +4 -4
- package/dist/{chunk-MM3JHVKZ.cjs.map → chunk-QLLZM5I3.cjs.map} +1 -1
- package/dist/{chunk-MX7EKQPM.js → chunk-RCBG6YMT.js} +345 -97
- package/dist/chunk-RCBG6YMT.js.map +1 -0
- package/dist/{chunk-2CYI5HRH.js → chunk-RI7RJH4G.js} +49 -17
- package/dist/chunk-RI7RJH4G.js.map +1 -0
- package/dist/{chunk-5LKOVCPP.js → chunk-RVUL2HXY.js} +6 -5
- package/dist/chunk-RVUL2HXY.js.map +1 -0
- package/dist/{chunk-WK23PGTP.cjs → chunk-S5GU4LUN.cjs} +11 -11
- package/dist/{chunk-WK23PGTP.cjs.map → chunk-S5GU4LUN.cjs.map} +1 -1
- package/dist/{chunk-S33YQEL7.js → chunk-SDPWO2Z5.js} +6 -6
- package/dist/{chunk-S33YQEL7.js.map → chunk-SDPWO2Z5.js.map} +1 -1
- package/dist/{chunk-6S3PTHL4.js → chunk-SLGGT2XD.js} +3 -3
- package/dist/{chunk-6S3PTHL4.js.map → chunk-SLGGT2XD.js.map} +1 -1
- package/dist/{chunk-HSEZ7X6Y.cjs → chunk-TIJUA4I6.cjs} +45 -45
- package/dist/{chunk-HSEZ7X6Y.cjs.map → chunk-TIJUA4I6.cjs.map} +1 -1
- package/dist/{chunk-CSNOYIB4.cjs → chunk-TM54OBHX.cjs} +13 -13
- package/dist/{chunk-CSNOYIB4.cjs.map → chunk-TM54OBHX.cjs.map} +1 -1
- package/dist/{chunk-2GIV5X4P.js → chunk-TYEYRCXL.js} +86 -33
- package/dist/chunk-TYEYRCXL.js.map +1 -0
- package/dist/{chunk-MJPZNEJZ.js → chunk-UKOVGCRN.js} +2095 -496
- package/dist/chunk-UKOVGCRN.js.map +1 -0
- package/dist/chunk-UYKDYE5D.cjs +12 -0
- package/dist/{chunk-KWNWG4RC.cjs.map → chunk-UYKDYE5D.cjs.map} +1 -1
- package/dist/{chunk-FX5ZW6PN.js → chunk-VAAC7L57.js} +95 -40
- package/dist/chunk-VAAC7L57.js.map +1 -0
- package/dist/{chunk-ISKCIQF2.cjs → chunk-VKHXYVN7.cjs} +14 -25
- package/dist/chunk-VKHXYVN7.cjs.map +1 -0
- package/dist/chunk-VUQZNUHU.js +171 -0
- package/dist/chunk-VUQZNUHU.js.map +1 -0
- package/dist/{chunk-K2XYLVVB.cjs → chunk-WDM5WQK4.cjs} +175 -136
- package/dist/chunk-WDM5WQK4.cjs.map +1 -0
- package/dist/{chunk-GVYVGGPJ.js → chunk-WFSYYU4W.js} +66 -28
- package/dist/chunk-WFSYYU4W.js.map +1 -0
- package/dist/{chunk-WCLMKNQE.cjs → chunk-WRBV2FNH.cjs} +1356 -1108
- package/dist/chunk-WRBV2FNH.cjs.map +1 -0
- package/dist/chunk-XORONCV3.js +202 -0
- package/dist/chunk-XORONCV3.js.map +1 -0
- package/dist/{chunk-2Q45FAIE.js → chunk-YT2IVFAI.js} +26 -17
- package/dist/chunk-YT2IVFAI.js.map +1 -0
- package/dist/chunk-ZGVTNKTX.cjs +217 -0
- package/dist/chunk-ZGVTNKTX.cjs.map +1 -0
- package/dist/core/index.cjs +20 -20
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +4 -4
- package/dist/{ddl-B49O7dB_.d.ts → ddl-BvcbgzHo.d.ts} +3 -3
- package/dist/{ddl-DcZG660s.d.cts → ddl-Ufebz5q5.d.cts} +3 -3
- package/dist/graph-extension/index.d.cts +2 -4
- package/dist/graph-extension/index.d.ts +2 -4
- package/dist/graph-merge/index.cjs +140 -125
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +8 -9
- package/dist/graph-merge/index.d.ts +8 -9
- package/dist/graph-merge/index.js +42 -27
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +144 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -12
- package/dist/index.d.ts +11 -12
- package/dist/index.js +30 -29
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +14 -12
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +7 -5
- package/dist/{ingestion-import-target-CI8OWIkM.d.ts → ingestion-import-target-CAs1OX-l.d.cts} +1 -1
- package/dist/{ingestion-import-target-DCpfM1PX.d.cts → ingestion-import-target-DCQSPfNx.d.ts} +1 -1
- package/dist/interchange/index.cjs +41 -39
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +8 -8
- package/dist/interchange/index.d.ts +8 -8
- package/dist/interchange/index.js +16 -14
- package/dist/interchange/index.js.map +1 -1
- package/dist/local-store-impl-6DDTFM32.cjs +77 -0
- package/dist/local-store-impl-6DDTFM32.cjs.map +1 -0
- package/dist/local-store-impl-OXTOVU2J.js +75 -0
- package/dist/local-store-impl-OXTOVU2J.js.map +1 -0
- package/dist/{manager-Cfg1ENj1.d.ts → manager-B68OrPR2.d.ts} +1 -2
- package/dist/{manager-D348fa6W.d.cts → manager-D_t7oK69.d.cts} +1 -2
- package/dist/pglite-store-impl-6EMZGL7K.js +73 -0
- package/dist/pglite-store-impl-6EMZGL7K.js.map +1 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs +75 -0
- package/dist/pglite-store-impl-GJG3Y7RP.cjs.map +1 -0
- package/dist/{postgres-UStOycLI.d.ts → postgres-BPLSVyHM.d.ts} +1 -1
- package/dist/{postgres-CH1kkM5J.d.cts → postgres-CqvtFC2y.d.cts} +1 -1
- package/dist/profiler/index.d.cts +9 -9
- package/dist/profiler/index.d.ts +9 -9
- package/dist/provenance/index.cjs +33 -20
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +7 -7
- package/dist/provenance/index.d.ts +7 -7
- package/dist/provenance/index.js +24 -11
- package/dist/provenance/index.js.map +1 -1
- package/dist/{repair-validity-windows-aWX7VNvv.d.cts → repair-validity-windows-DEzCKAdy.d.cts} +7 -3
- package/dist/{repair-validity-windows-BtOEe2pS.d.ts → repair-validity-windows-GMdaS2AH.d.ts} +7 -3
- package/dist/resolve-D_H8MHtq.d.ts +1805 -0
- package/dist/resolve-WEW8gWws.d.cts +1805 -0
- package/dist/schema/index.cjs +42 -40
- package/dist/schema/index.d.cts +4 -6
- package/dist/schema/index.d.ts +4 -6
- package/dist/schema/index.js +15 -13
- package/dist/{searchable-z4BiFfHI.d.ts → searchable-C_UREI9K.d.ts} +1 -1
- package/dist/{searchable-C8-RrL3l.d.cts → searchable-ClgET_i7.d.cts} +1 -1
- package/dist/{sqlite-axLw5Lo5.d.ts → sqlite-D1mXO9Kp.d.cts} +2 -1
- package/dist/{sqlite-Cyx9j9o6.d.cts → sqlite-MZA3oZNB.d.ts} +2 -1
- package/dist/{store-CTfQ9taw.d.ts → store-CuFX7fCx.d.cts} +38 -41
- package/dist/{store-DR9J7JVB.d.cts → store-D-ZjXQpW.d.ts} +38 -41
- package/dist/{temporal-CBOrERz5.d.ts → temporal-CpyEiRY8.d.cts} +1 -1
- package/dist/{temporal-B4Ky4wzh.d.cts → temporal-y0Aep9Su.d.ts} +1 -1
- package/dist/{types-CWg4dTjj.d.ts → types-6yf0Vv-_.d.cts} +1672 -1
- package/dist/{types-CWg4dTjj.d.cts → types-6yf0Vv-_.d.ts} +1672 -1
- package/dist/{types-BScHXVM7.d.ts → types-DzJ4dlzk.d.cts} +1 -1
- package/dist/{types-BE921wRl.d.cts → types-_vVSB9k-.d.ts} +1 -1
- package/dist/{where-BWXUPV3C.d.ts → where-DuG2LCLe.d.ts} +1 -1
- package/dist/{where-CNtx1aLc.d.cts → where-Mhf_yyKX.d.cts} +1 -1
- package/package.json +5 -1
- package/dist/chunk-2CYI5HRH.js.map +0 -1
- package/dist/chunk-2GIV5X4P.js.map +0 -1
- package/dist/chunk-2Q45FAIE.js.map +0 -1
- package/dist/chunk-46UGOVRW.js.map +0 -1
- package/dist/chunk-5LKOVCPP.js.map +0 -1
- package/dist/chunk-5OWHU7Z7.cjs.map +0 -1
- package/dist/chunk-6LEOAIIB.js +0 -1160
- package/dist/chunk-6LEOAIIB.js.map +0 -1
- package/dist/chunk-7CCMCMJO.cjs.map +0 -1
- package/dist/chunk-7PRMDZIA.cjs.map +0 -1
- package/dist/chunk-C76WFIVZ.cjs.map +0 -1
- package/dist/chunk-CS6JTQQ2.cjs.map +0 -1
- package/dist/chunk-EDLKIQRI.js.map +0 -1
- package/dist/chunk-EH3JZJUM.cjs +0 -567
- package/dist/chunk-EH3JZJUM.cjs.map +0 -1
- package/dist/chunk-FX5ZW6PN.js.map +0 -1
- package/dist/chunk-GHZPZNFC.cjs +0 -132
- package/dist/chunk-GHZPZNFC.cjs.map +0 -1
- package/dist/chunk-GVYVGGPJ.js.map +0 -1
- package/dist/chunk-IHK5KA2Q.cjs +0 -262
- package/dist/chunk-IHK5KA2Q.cjs.map +0 -1
- package/dist/chunk-IRPYOHRC.js.map +0 -1
- package/dist/chunk-ISKCIQF2.cjs.map +0 -1
- package/dist/chunk-JG5XIJDY.js.map +0 -1
- package/dist/chunk-K2XYLVVB.cjs.map +0 -1
- package/dist/chunk-KWNWG4RC.cjs +0 -12
- package/dist/chunk-LLVOQOWE.cjs.map +0 -1
- package/dist/chunk-MJPZNEJZ.js.map +0 -1
- package/dist/chunk-MX7EKQPM.js.map +0 -1
- package/dist/chunk-MZ34E2GN.js.map +0 -1
- package/dist/chunk-OJHD3LXJ.cjs.map +0 -1
- package/dist/chunk-PALYTHGM.js +0 -114
- package/dist/chunk-PALYTHGM.js.map +0 -1
- package/dist/chunk-RDP6ZRSM.cjs.map +0 -1
- package/dist/chunk-S3SDEQMC.js +0 -532
- package/dist/chunk-S3SDEQMC.js.map +0 -1
- package/dist/chunk-TEC24ZDA.cjs +0 -1254
- package/dist/chunk-TEC24ZDA.cjs.map +0 -1
- package/dist/chunk-TP4NJTI3.cjs +0 -1192
- package/dist/chunk-TP4NJTI3.cjs.map +0 -1
- package/dist/chunk-TTCOPKUL.cjs.map +0 -1
- package/dist/chunk-TUVD4DFR.cjs.map +0 -1
- package/dist/chunk-TYGGUWMS.cjs.map +0 -1
- package/dist/chunk-U3Z7XKAG.js.map +0 -1
- package/dist/chunk-U5EL6JUV.js.map +0 -1
- package/dist/chunk-VTJVMP4I.js.map +0 -1
- package/dist/chunk-WCLMKNQE.cjs.map +0 -1
- package/dist/chunk-XMY2SXOH.cjs.map +0 -1
- package/dist/chunk-Y55DLLEG.js +0 -247
- package/dist/chunk-Y55DLLEG.js.map +0 -1
- package/dist/chunk-YA36ABIL.js.map +0 -1
- package/dist/chunk-ZBFZGLZE.cjs.map +0 -1
- package/dist/index-B0PrmE3K.d.cts +0 -1146
- package/dist/index-CwcXsL5R.d.ts +0 -1146
- package/dist/materialize-indexes-C9GG3O3C.d.ts +0 -266
- package/dist/materialize-indexes-CrSiW_lT.d.cts +0 -266
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
7
|
-
var
|
|
8
|
-
require('../chunk-
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
require('../chunk-
|
|
16
|
-
var
|
|
17
|
-
var
|
|
3
|
+
var chunkWRBV2FNH_cjs = require('../chunk-WRBV2FNH.cjs');
|
|
4
|
+
require('../chunk-36SX6QXP.cjs');
|
|
5
|
+
var chunkKACEYDYV_cjs = require('../chunk-KACEYDYV.cjs');
|
|
6
|
+
require('../chunk-2KCTP3U2.cjs');
|
|
7
|
+
var chunk2CVDZCXH_cjs = require('../chunk-2CVDZCXH.cjs');
|
|
8
|
+
require('../chunk-FMMW3KX7.cjs');
|
|
9
|
+
var chunkJHRUZ73O_cjs = require('../chunk-JHRUZ73O.cjs');
|
|
10
|
+
var chunkPS3TUWJM_cjs = require('../chunk-PS3TUWJM.cjs');
|
|
11
|
+
var chunkL6EVYIID_cjs = require('../chunk-L6EVYIID.cjs');
|
|
12
|
+
var chunkJQKMEKKW_cjs = require('../chunk-JQKMEKKW.cjs');
|
|
13
|
+
var chunkNLX5OWK7_cjs = require('../chunk-NLX5OWK7.cjs');
|
|
14
|
+
require('../chunk-ZGVTNKTX.cjs');
|
|
15
|
+
var chunkNUQ2YFFH_cjs = require('../chunk-NUQ2YFFH.cjs');
|
|
16
|
+
var chunk7B7I7YAW_cjs = require('../chunk-7B7I7YAW.cjs');
|
|
17
|
+
var chunkCRZ56SZU_cjs = require('../chunk-CRZ56SZU.cjs');
|
|
18
18
|
require('../chunk-DWUDZ66O.cjs');
|
|
19
19
|
var chunkM5MSP3BI_cjs = require('../chunk-M5MSP3BI.cjs');
|
|
20
|
-
require('../chunk-
|
|
21
|
-
require('../chunk-
|
|
22
|
-
require('../chunk-
|
|
20
|
+
require('../chunk-TM54OBHX.cjs');
|
|
21
|
+
require('../chunk-I7YAY2VQ.cjs');
|
|
22
|
+
require('../chunk-OTNTGEXR.cjs');
|
|
23
23
|
var chunkZY4GXIVN_cjs = require('../chunk-ZY4GXIVN.cjs');
|
|
24
|
+
require('../chunk-JVA3KDEA.cjs');
|
|
25
|
+
require('../chunk-A4C4NJ5U.cjs');
|
|
24
26
|
require('../chunk-NAUA4PW5.cjs');
|
|
25
|
-
require('../chunk-
|
|
26
|
-
var
|
|
27
|
+
require('../chunk-H2VWDQWC.cjs');
|
|
28
|
+
var chunkH5IJSROF_cjs = require('../chunk-H5IJSROF.cjs');
|
|
27
29
|
require('../chunk-7EO3TCQB.cjs');
|
|
28
30
|
require('../chunk-RT5ZY4XA.cjs');
|
|
29
31
|
require('../chunk-HAHNRASW.cjs');
|
|
@@ -38,10 +40,10 @@ var zod = require('zod');
|
|
|
38
40
|
|
|
39
41
|
// src/graph-merge/canonical-props.ts
|
|
40
42
|
function canonicalizeProps(props) {
|
|
41
|
-
return JSON.stringify(props,
|
|
43
|
+
return JSON.stringify(props, chunkNLX5OWK7_cjs.sortedReplacer);
|
|
42
44
|
}
|
|
43
45
|
function canonicalValueKey(value) {
|
|
44
|
-
return JSON.stringify(value,
|
|
46
|
+
return JSON.stringify(value, chunkNLX5OWK7_cjs.sortedReplacer);
|
|
45
47
|
}
|
|
46
48
|
function edgeStateSignature(edge) {
|
|
47
49
|
return JSON.stringify([
|
|
@@ -717,10 +719,10 @@ function endpointTuple(assertion) {
|
|
|
717
719
|
return [assertion.a.kind, assertion.a.id, assertion.b.kind, assertion.b.id];
|
|
718
720
|
}
|
|
719
721
|
function identityEndpointKey(assertion) {
|
|
720
|
-
return
|
|
722
|
+
return chunkCRZ56SZU_cjs.encodeTupleKey(endpointTuple(assertion));
|
|
721
723
|
}
|
|
722
724
|
function identitySemanticKey(assertion) {
|
|
723
|
-
return
|
|
725
|
+
return chunkL6EVYIID_cjs.identityAssertionSemanticKey(
|
|
724
726
|
assertion.relation,
|
|
725
727
|
assertion.a,
|
|
726
728
|
assertion.b
|
|
@@ -729,7 +731,7 @@ function identitySemanticKey(assertion) {
|
|
|
729
731
|
function identityDedupeKey(assertion) {
|
|
730
732
|
const semantic = identitySemanticKey(assertion);
|
|
731
733
|
if (assertion.validTo === void 0) return semantic;
|
|
732
|
-
return
|
|
734
|
+
return chunkCRZ56SZU_cjs.encodeTupleKey([semantic, assertion.validFrom, assertion.validTo]);
|
|
733
735
|
}
|
|
734
736
|
function compareIdentitySurvivors(left, right) {
|
|
735
737
|
const byValidity = chunkRWUWTJQY_cjs.compareCodePoints(left.validFrom, right.validFrom);
|
|
@@ -784,7 +786,7 @@ function assertNoOpposingIdentityRelations(assertions) {
|
|
|
784
786
|
);
|
|
785
787
|
for (const sameAssertion of same) {
|
|
786
788
|
for (const differentAssertion of different) {
|
|
787
|
-
if (!
|
|
789
|
+
if (!chunkL6EVYIID_cjs.identityValidityWindowsOverlap(sameAssertion, differentAssertion)) {
|
|
788
790
|
continue;
|
|
789
791
|
}
|
|
790
792
|
throw new IdentityMergeConflictError(
|
|
@@ -944,7 +946,7 @@ function remapIdentityAssertionEndpoints(assertions, canonicalOf, retypeMap, sto
|
|
|
944
946
|
);
|
|
945
947
|
continue;
|
|
946
948
|
}
|
|
947
|
-
const [a, b] =
|
|
949
|
+
const [a, b] = chunkL6EVYIID_cjs.normalizeIdentityPair(remappedA, remappedB);
|
|
948
950
|
const endpointWindowA = endpointWindows.get(mergeKeyOf(a));
|
|
949
951
|
const endpointWindowB = endpointWindows.get(mergeKeyOf(b));
|
|
950
952
|
const validFrom = [
|
|
@@ -1099,7 +1101,7 @@ async function buildIdentityPeerProbe(target, probedIds, targetPeers, plan, prof
|
|
|
1099
1101
|
(group) => group.map((member) => mergeKey(member.kind, member.id))
|
|
1100
1102
|
)
|
|
1101
1103
|
]);
|
|
1102
|
-
const ledger = (await relevantLedgerAssertions(target, memberKeys,
|
|
1104
|
+
const ledger = (await relevantLedgerAssertions(target, memberKeys, chunk2CVDZCXH_cjs.storeBackend(target))).filter(
|
|
1103
1105
|
(assertion) => !plannedDeletions.has(mergeKey(assertion.a.kind, assertion.a.id)) && !plannedDeletions.has(mergeKey(assertion.b.kind, assertion.b.id))
|
|
1104
1106
|
);
|
|
1105
1107
|
return {
|
|
@@ -1120,7 +1122,7 @@ async function buildIdentityPeerProbe(target, probedIds, targetPeers, plan, prof
|
|
|
1120
1122
|
};
|
|
1121
1123
|
}
|
|
1122
1124
|
async function snapshotIdentityClasses(target, seeds, liveKeys, plannedDeletions, txBackend) {
|
|
1123
|
-
const classes = await
|
|
1125
|
+
const classes = await chunk2CVDZCXH_cjs.storeRuntime(target).structuralIdentityClasses(
|
|
1124
1126
|
seeds,
|
|
1125
1127
|
txBackend
|
|
1126
1128
|
);
|
|
@@ -1128,7 +1130,7 @@ async function snapshotIdentityClasses(target, seeds, liveKeys, plannedDeletions
|
|
|
1128
1130
|
const groups = [];
|
|
1129
1131
|
for (const seed of seeds) {
|
|
1130
1132
|
const key = mergeKey(seed.kind, seed.id);
|
|
1131
|
-
const members = (classes.get(
|
|
1133
|
+
const members = (classes.get(chunkL6EVYIID_cjs.identityReferenceKey(seed)) ?? [seed]).filter(
|
|
1132
1134
|
(member) => !plannedDeletions.has(mergeKey(member.kind, member.id))
|
|
1133
1135
|
);
|
|
1134
1136
|
groups.push(members);
|
|
@@ -1137,7 +1139,7 @@ async function snapshotIdentityClasses(target, seeds, liveKeys, plannedDeletions
|
|
|
1137
1139
|
return { fingerprints, groups };
|
|
1138
1140
|
}
|
|
1139
1141
|
async function relevantLedgerAssertions(target, memberKeys, backend) {
|
|
1140
|
-
const current = await
|
|
1142
|
+
const current = await chunk2CVDZCXH_cjs.storeRuntime(target).identityAssertionsAtTarget(
|
|
1141
1143
|
backend,
|
|
1142
1144
|
"state"
|
|
1143
1145
|
);
|
|
@@ -1148,7 +1150,7 @@ async function relevantLedgerAssertions(target, memberKeys, backend) {
|
|
|
1148
1150
|
function differentLedgerFingerprint(assertions) {
|
|
1149
1151
|
return JSON.stringify(
|
|
1150
1152
|
assertions.filter((assertion) => assertion.relation === "different").map((assertion) => [assertion.id, ...endpointTuple(assertion)]).toSorted(
|
|
1151
|
-
(left, right) => chunkRWUWTJQY_cjs.compareStrings(
|
|
1153
|
+
(left, right) => chunkRWUWTJQY_cjs.compareStrings(chunkCRZ56SZU_cjs.encodeTupleKey(left), chunkCRZ56SZU_cjs.encodeTupleKey(right))
|
|
1152
1154
|
)
|
|
1153
1155
|
);
|
|
1154
1156
|
}
|
|
@@ -1210,7 +1212,7 @@ async function assertPlannedIdentityIdsFresh(target, txBackend, plan) {
|
|
|
1210
1212
|
...plan.identityRetractions.map((retraction) => retraction.id)
|
|
1211
1213
|
];
|
|
1212
1214
|
if (plannedIds.length === 0) return;
|
|
1213
|
-
const storedById = await
|
|
1215
|
+
const storedById = await chunk2CVDZCXH_cjs.storeRuntime(target).identityAssertionRowsByIds(
|
|
1214
1216
|
plannedIds,
|
|
1215
1217
|
txBackend
|
|
1216
1218
|
);
|
|
@@ -1263,7 +1265,7 @@ function affectedIdentityClassSeeds(plan, profile) {
|
|
|
1263
1265
|
return [...seedsByKey.values()];
|
|
1264
1266
|
}
|
|
1265
1267
|
async function assertMergedIdentityClassesConsistent(target, txBackend, plan) {
|
|
1266
|
-
await
|
|
1268
|
+
await chunk2CVDZCXH_cjs.storeRuntime(target).assertIdentityClassesConsistentAtTarget(
|
|
1267
1269
|
txBackend,
|
|
1268
1270
|
affectedIdentityClassSeeds(plan, target.graph.identity?.sameIdAcrossKinds)
|
|
1269
1271
|
);
|
|
@@ -1317,7 +1319,7 @@ function translateIdentityCommitError(error) {
|
|
|
1317
1319
|
}
|
|
1318
1320
|
async function assertIdentityPeersStable(target, txBackend, probe, plan) {
|
|
1319
1321
|
if (probe === void 0) return;
|
|
1320
|
-
const live = (await
|
|
1322
|
+
const live = (await chunk2CVDZCXH_cjs.storeRuntime(target).liveNodesSharingIds(probe.ids, txBackend)).filter((peer) => !probe.plannedDeletions.has(mergeKey(peer.kind, peer.id)));
|
|
1321
1323
|
const seedKindsById = /* @__PURE__ */ new Map();
|
|
1322
1324
|
for (const seed of probe.seeds) {
|
|
1323
1325
|
const kinds = seedKindsById.get(seed.id) ?? /* @__PURE__ */ new Set();
|
|
@@ -1614,11 +1616,11 @@ function byId(left, right) {
|
|
|
1614
1616
|
}
|
|
1615
1617
|
async function diffAgainstBase(baseStore, forkStore, captureForkState = true) {
|
|
1616
1618
|
const graph = baseStore.graph;
|
|
1617
|
-
const nodeKinds =
|
|
1618
|
-
const edgeKinds =
|
|
1619
|
+
const nodeKinds = chunk7B7I7YAW_cjs.getNodeKinds(graph);
|
|
1620
|
+
const edgeKinds = chunk7B7I7YAW_cjs.getEdgeKinds(graph);
|
|
1619
1621
|
const [baseIdentity, forkIdentity] = await Promise.all([
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
+
chunk2CVDZCXH_cjs.storeRuntime(baseStore).readCurrentIdentityAssertions("archival"),
|
|
1623
|
+
chunk2CVDZCXH_cjs.storeRuntime(forkStore).readCurrentIdentityAssertions("archival")
|
|
1622
1624
|
]);
|
|
1623
1625
|
const baseIdentityById = new Map(
|
|
1624
1626
|
baseIdentity.map((assertion) => [assertion.id, assertion])
|
|
@@ -1633,12 +1635,12 @@ async function diffAgainstBase(baseStore, forkStore, captureForkState = true) {
|
|
|
1633
1635
|
const forkNodeVersions = /* @__PURE__ */ new Map();
|
|
1634
1636
|
for (const kind of nodeKinds) {
|
|
1635
1637
|
const baseRows = await enumerateAllNodes(
|
|
1636
|
-
|
|
1638
|
+
chunk2CVDZCXH_cjs.storeBackend(baseStore),
|
|
1637
1639
|
baseStore.graphId,
|
|
1638
1640
|
kind
|
|
1639
1641
|
);
|
|
1640
1642
|
const forkRows = await enumerateAllNodes(
|
|
1641
|
-
|
|
1643
|
+
chunk2CVDZCXH_cjs.storeBackend(forkStore),
|
|
1642
1644
|
forkStore.graphId,
|
|
1643
1645
|
kind
|
|
1644
1646
|
);
|
|
@@ -1668,12 +1670,12 @@ async function diffAgainstBase(baseStore, forkStore, captureForkState = true) {
|
|
|
1668
1670
|
const forkEdgeSignatures = /* @__PURE__ */ new Map();
|
|
1669
1671
|
for (const kind of edgeKinds) {
|
|
1670
1672
|
const baseRows = await enumerateAllEdges(
|
|
1671
|
-
|
|
1673
|
+
chunk2CVDZCXH_cjs.storeBackend(baseStore),
|
|
1672
1674
|
baseStore.graphId,
|
|
1673
1675
|
kind
|
|
1674
1676
|
);
|
|
1675
1677
|
const forkRows = await enumerateAllEdges(
|
|
1676
|
-
|
|
1678
|
+
chunk2CVDZCXH_cjs.storeBackend(forkStore),
|
|
1677
1679
|
forkStore.graphId,
|
|
1678
1680
|
kind
|
|
1679
1681
|
);
|
|
@@ -1770,10 +1772,10 @@ async function readActiveSchemaVersion(backend, graphId) {
|
|
|
1770
1772
|
}
|
|
1771
1773
|
async function computeSchemaComponent(store) {
|
|
1772
1774
|
const version = await readActiveSchemaVersion(
|
|
1773
|
-
|
|
1775
|
+
chunk2CVDZCXH_cjs.storeBackend(store),
|
|
1774
1776
|
store.graphId
|
|
1775
1777
|
);
|
|
1776
|
-
return
|
|
1778
|
+
return chunkJHRUZ73O_cjs.computeSchemaHash(chunkJHRUZ73O_cjs.serializeSchema(store.graph, version));
|
|
1777
1779
|
}
|
|
1778
1780
|
function byDigestEntry(left, right) {
|
|
1779
1781
|
const byKind = chunkRWUWTJQY_cjs.compareStrings(left.kind, right.kind);
|
|
@@ -1781,8 +1783,8 @@ function byDigestEntry(left, right) {
|
|
|
1781
1783
|
}
|
|
1782
1784
|
var CONTENT_FINGERPRINT_BYTES = 16;
|
|
1783
1785
|
async function computeContentComponent(backend, graphId, graph, identityAssertions) {
|
|
1784
|
-
const nodeKinds =
|
|
1785
|
-
const edgeKinds =
|
|
1786
|
+
const nodeKinds = chunk7B7I7YAW_cjs.getNodeKinds(graph);
|
|
1787
|
+
const edgeKinds = chunk7B7I7YAW_cjs.getEdgeKinds(graph);
|
|
1786
1788
|
const nodeDigest = [];
|
|
1787
1789
|
for (const kind of nodeKinds) {
|
|
1788
1790
|
const rows = await enumerateAllNodes(backend, graphId, kind);
|
|
@@ -1832,7 +1834,7 @@ async function computeBaseVersion(store) {
|
|
|
1832
1834
|
computeSchemaComponent(store),
|
|
1833
1835
|
store.revisionOriginNow(),
|
|
1834
1836
|
store.revisionNow(),
|
|
1835
|
-
readActiveSchemaVersion(
|
|
1837
|
+
readActiveSchemaVersion(chunk2CVDZCXH_cjs.storeBackend(store), store.graphId)
|
|
1836
1838
|
]);
|
|
1837
1839
|
return asBaseVersion(
|
|
1838
1840
|
`${schemaComponent2}${SCHEMA_VERSION_TAG}${activeVersion}${TOKEN_SEPARATOR}${revisionComponent(origin, revision)}`
|
|
@@ -1847,9 +1849,9 @@ async function computeBaseVersion(store) {
|
|
|
1847
1849
|
);
|
|
1848
1850
|
}
|
|
1849
1851
|
async function computeStoreContentComponent(store) {
|
|
1850
|
-
const identityAssertions = await
|
|
1852
|
+
const identityAssertions = await chunk2CVDZCXH_cjs.storeRuntime(store).readCurrentIdentityAssertions("state");
|
|
1851
1853
|
return computeContentComponent(
|
|
1852
|
-
|
|
1854
|
+
chunk2CVDZCXH_cjs.storeBackend(store),
|
|
1853
1855
|
store.graphId,
|
|
1854
1856
|
store.graph,
|
|
1855
1857
|
identityAssertions
|
|
@@ -1903,7 +1905,7 @@ function cloneWorkingCopyWithGraphStrategy(makeBackend, graphForClone) {
|
|
|
1903
1905
|
create: async (baseStore) => {
|
|
1904
1906
|
const backend = await makeBackend();
|
|
1905
1907
|
try {
|
|
1906
|
-
const [freshStore] = await
|
|
1908
|
+
const [freshStore] = await chunkWRBV2FNH_cjs.createStoreWithSchema(
|
|
1907
1909
|
graphForClone(baseStore),
|
|
1908
1910
|
backend,
|
|
1909
1911
|
{
|
|
@@ -1924,16 +1926,16 @@ function cloneWorkingCopyWithGraphStrategy(makeBackend, graphForClone) {
|
|
|
1924
1926
|
validateReferences: true,
|
|
1925
1927
|
batchSize: CLONE_IMPORT_BATCH_SIZE
|
|
1926
1928
|
};
|
|
1927
|
-
const result =
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
) === void 0 ? await
|
|
1929
|
+
const result = chunkNLX5OWK7_cjs.snapshotExportContention(
|
|
1930
|
+
chunk2CVDZCXH_cjs.storeBackend(baseStore),
|
|
1931
|
+
chunk2CVDZCXH_cjs.storeBackend(freshStore)
|
|
1932
|
+
) === void 0 ? await chunkKACEYDYV_cjs.importGraphStream(
|
|
1931
1933
|
freshStore,
|
|
1932
|
-
|
|
1934
|
+
chunkKACEYDYV_cjs.exportGraphStream(baseStore, exportOptions),
|
|
1933
1935
|
importOptions
|
|
1934
|
-
) : await
|
|
1936
|
+
) : await chunkKACEYDYV_cjs.importGraph(
|
|
1935
1937
|
freshStore,
|
|
1936
|
-
await
|
|
1938
|
+
await chunkKACEYDYV_cjs.exportGraph(baseStore, exportOptions),
|
|
1937
1939
|
importOptions
|
|
1938
1940
|
);
|
|
1939
1941
|
if (!result.success) {
|
|
@@ -1982,7 +1984,7 @@ function graphWithoutNodeUniqueness(graph) {
|
|
|
1982
1984
|
async function branch(baseStore, makeBackend, options, strategy) {
|
|
1983
1985
|
try {
|
|
1984
1986
|
const base = await computeBaseVersion(baseStore);
|
|
1985
|
-
const id = options?.id ?? asBranchId(
|
|
1987
|
+
const id = options?.id ?? asBranchId(chunkJQKMEKKW_cjs.generateId());
|
|
1986
1988
|
const workingCopyStrategy = strategy ?? cloneWorkingCopyStrategy(makeBackend);
|
|
1987
1989
|
const store = await workingCopyStrategy.create(baseStore);
|
|
1988
1990
|
const schemaAnchor = await captureBranchSchemaAnchor(store);
|
|
@@ -2002,11 +2004,11 @@ async function branch(baseStore, makeBackend, options, strategy) {
|
|
|
2002
2004
|
}
|
|
2003
2005
|
async function captureBranchSchemaAnchor(store) {
|
|
2004
2006
|
try {
|
|
2005
|
-
const schemaRow = await
|
|
2007
|
+
const schemaRow = await chunk2CVDZCXH_cjs.storeBackend(store).getActiveSchema(store.graphId);
|
|
2006
2008
|
return schemaRow === void 0 ? void 0 : { version: schemaRow.version, hash: schemaRow.schema_hash };
|
|
2007
2009
|
} catch (error) {
|
|
2008
2010
|
try {
|
|
2009
|
-
await
|
|
2011
|
+
await chunk2CVDZCXH_cjs.storeBackend(store).close();
|
|
2010
2012
|
} catch {
|
|
2011
2013
|
}
|
|
2012
2014
|
throw error;
|
|
@@ -2059,10 +2061,10 @@ async function ingestionBranch(baseStore, makeBackend, options) {
|
|
|
2059
2061
|
nodes: store.nodes,
|
|
2060
2062
|
edges: store.edges,
|
|
2061
2063
|
...identityAccess,
|
|
2062
|
-
close: async () =>
|
|
2064
|
+
close: async () => chunk2CVDZCXH_cjs.storeBackend(store).close()
|
|
2063
2065
|
});
|
|
2064
2066
|
PRIVATE_BRANCHES.set(handle, privateBranch);
|
|
2065
|
-
|
|
2067
|
+
chunkKACEYDYV_cjs.registerIngestionImportTarget(handle, store);
|
|
2066
2068
|
return chunkRJMHU2MG_cjs.ok(handle);
|
|
2067
2069
|
} catch (error) {
|
|
2068
2070
|
return chunkRJMHU2MG_cjs.err(
|
|
@@ -2107,7 +2109,7 @@ function constraintSignature(node, constraint) {
|
|
|
2107
2109
|
return void 0;
|
|
2108
2110
|
}
|
|
2109
2111
|
}
|
|
2110
|
-
return `${constraint.name}${KEY_PART_SEPARATOR}${
|
|
2112
|
+
return `${constraint.name}${KEY_PART_SEPARATOR}${chunkCRZ56SZU_cjs.computeUniqueKey(
|
|
2111
2113
|
props,
|
|
2112
2114
|
constraint.fields,
|
|
2113
2115
|
constraint.collation
|
|
@@ -4768,7 +4770,7 @@ var mergePlanArtifactV1Schema = mergePlanArtifactV1BaseSchema.superRefine(
|
|
|
4768
4770
|
// src/graph-merge/plan-canonical.ts
|
|
4769
4771
|
function canonicalMergePlanJson(artifact) {
|
|
4770
4772
|
const digestless = "digest" in artifact ? omitDigest(artifact) : artifact;
|
|
4771
|
-
return JSON.stringify(digestless,
|
|
4773
|
+
return JSON.stringify(digestless, chunkNLX5OWK7_cjs.sortedReplacer);
|
|
4772
4774
|
}
|
|
4773
4775
|
async function computeMergePlanDigest(artifact) {
|
|
4774
4776
|
return chunkZY4GXIVN_cjs.sha256Hex(canonicalMergePlanJson(artifact), 32);
|
|
@@ -4782,7 +4784,7 @@ async function finalizeMergePlanArtifact(artifact) {
|
|
|
4782
4784
|
}
|
|
4783
4785
|
};
|
|
4784
4786
|
const canonical = JSON.parse(
|
|
4785
|
-
JSON.stringify(finalized,
|
|
4787
|
+
JSON.stringify(finalized, chunkNLX5OWK7_cjs.sortedReplacer)
|
|
4786
4788
|
);
|
|
4787
4789
|
return canonical;
|
|
4788
4790
|
}
|
|
@@ -4847,7 +4849,7 @@ function readFormatVersion(input) {
|
|
|
4847
4849
|
}
|
|
4848
4850
|
var PROVENANCE_KIND = "Provenance";
|
|
4849
4851
|
var PROVENANCE_OWNER_KIND = "ProvenanceOwner";
|
|
4850
|
-
var Provenance =
|
|
4852
|
+
var Provenance = chunkPS3TUWJM_cjs.defineNode(PROVENANCE_KIND, {
|
|
4851
4853
|
schema: zod.z.object({
|
|
4852
4854
|
targetGraphId: zod.z.string(),
|
|
4853
4855
|
role: zod.z.enum(["node", "edge"]),
|
|
@@ -4860,7 +4862,7 @@ var Provenance = chunkIPRP6TDL_cjs.defineNode(PROVENANCE_KIND, {
|
|
|
4860
4862
|
var PROVENANCE_OWNER = "@nicia-ai/typegraph/merge-provenance";
|
|
4861
4863
|
var PROVENANCE_OWNER_VERSION = 1;
|
|
4862
4864
|
var PROVENANCE_OWNER_ID = "merge-provenance-owner";
|
|
4863
|
-
var ProvenanceOwner =
|
|
4865
|
+
var ProvenanceOwner = chunkPS3TUWJM_cjs.defineNode(PROVENANCE_OWNER_KIND, {
|
|
4864
4866
|
schema: zod.z.object({
|
|
4865
4867
|
owner: zod.z.literal(PROVENANCE_OWNER),
|
|
4866
4868
|
version: zod.z.literal(PROVENANCE_OWNER_VERSION),
|
|
@@ -4871,7 +4873,7 @@ function provenanceGraphId(targetGraphId) {
|
|
|
4871
4873
|
return `${targetGraphId}::merge-provenance`;
|
|
4872
4874
|
}
|
|
4873
4875
|
function buildOwnedProvenanceGraph(targetGraphId) {
|
|
4874
|
-
return
|
|
4876
|
+
return chunk7B7I7YAW_cjs.defineInternalGraph({
|
|
4875
4877
|
id: provenanceGraphId(targetGraphId),
|
|
4876
4878
|
nodes: {
|
|
4877
4879
|
Provenance: { type: Provenance },
|
|
@@ -4881,14 +4883,14 @@ function buildOwnedProvenanceGraph(targetGraphId) {
|
|
|
4881
4883
|
});
|
|
4882
4884
|
}
|
|
4883
4885
|
function buildProvenanceGraph(targetGraphId) {
|
|
4884
|
-
return
|
|
4886
|
+
return chunk7B7I7YAW_cjs.defineInternalGraph({
|
|
4885
4887
|
id: provenanceGraphId(targetGraphId),
|
|
4886
4888
|
nodes: { Provenance: { type: Provenance } },
|
|
4887
4889
|
edges: {}
|
|
4888
4890
|
});
|
|
4889
4891
|
}
|
|
4890
4892
|
async function openProvenanceStore(...args) {
|
|
4891
|
-
const [backend, targetGraphId] = args.length === 1 ? [
|
|
4893
|
+
const [backend, targetGraphId] = args.length === 1 ? [chunk2CVDZCXH_cjs.storeBackend(args[0]), args[0].graphId] : args;
|
|
4892
4894
|
const graph = buildOwnedProvenanceGraph(targetGraphId);
|
|
4893
4895
|
const preflight = await inspectSidecarGraphId(backend, graph, targetGraphId);
|
|
4894
4896
|
if (preflight.state === "refuse") {
|
|
@@ -4900,7 +4902,7 @@ async function openProvenanceStore(...args) {
|
|
|
4900
4902
|
throw provenanceGraphIdCollision(graph.id, targetGraphId, claim.reason);
|
|
4901
4903
|
}
|
|
4902
4904
|
}
|
|
4903
|
-
const [store] = await
|
|
4905
|
+
const [store] = await chunkWRBV2FNH_cjs.createStoreWithSchema(graph, backend);
|
|
4904
4906
|
return store;
|
|
4905
4907
|
}
|
|
4906
4908
|
async function claimSidecarOwnership(backend, graph, targetGraphId) {
|
|
@@ -4926,13 +4928,26 @@ async function claimSidecarOwnership(backend, graph, targetGraphId) {
|
|
|
4926
4928
|
});
|
|
4927
4929
|
}
|
|
4928
4930
|
async function drainUnfencedRowWriters(tx) {
|
|
4929
|
-
|
|
4930
|
-
const
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
)
|
|
4931
|
+
const plan = chunkNUQ2YFFH_cjs.resolveWriteFencePlan(tx);
|
|
4932
|
+
const fence = chunkNUQ2YFFH_cjs.requireWriteFence(
|
|
4933
|
+
plan,
|
|
4934
|
+
"graph-merge provenance fence",
|
|
4935
|
+
"table-lock"
|
|
4936
|
+
);
|
|
4937
|
+
switch (fence.kind) {
|
|
4938
|
+
case "lock": {
|
|
4939
|
+
const schema = chunkNUQ2YFFH_cjs.createSqlSchema(tx.tableNames);
|
|
4940
|
+
await tx.executeStatement(
|
|
4941
|
+
chunkH5IJSROF_cjs.asCompiledStatementSql(
|
|
4942
|
+
chunkH5IJSROF_cjs.sql`LOCK TABLE ${schema.nodesTable}, ${schema.edgesTable} IN SHARE ROW EXCLUSIVE MODE`
|
|
4943
|
+
)
|
|
4944
|
+
);
|
|
4945
|
+
return;
|
|
4946
|
+
}
|
|
4947
|
+
case "engine-serialized": {
|
|
4948
|
+
return;
|
|
4949
|
+
}
|
|
4950
|
+
}
|
|
4936
4951
|
}
|
|
4937
4952
|
async function inspectSidecarGraphId(port, graph, targetGraphId) {
|
|
4938
4953
|
const activeSchema = await port.getActiveSchema(graph.id);
|
|
@@ -4949,14 +4964,14 @@ async function inspectSidecarGraphId(port, graph, targetGraphId) {
|
|
|
4949
4964
|
if (activeSchema === void 0) {
|
|
4950
4965
|
return { state: "refuse", reason: "application-graph" };
|
|
4951
4966
|
}
|
|
4952
|
-
const ownedHash = await
|
|
4953
|
-
|
|
4967
|
+
const ownedHash = await chunkJHRUZ73O_cjs.computeSchemaHash(
|
|
4968
|
+
chunkJHRUZ73O_cjs.serializeSchema(graph, activeSchema.version)
|
|
4954
4969
|
);
|
|
4955
4970
|
if (activeSchema.schema_hash === ownedHash) {
|
|
4956
4971
|
return { state: "refuse", reason: "unowned-exact-schema-graph" };
|
|
4957
4972
|
}
|
|
4958
|
-
const legacyHash = await
|
|
4959
|
-
|
|
4973
|
+
const legacyHash = await chunkJHRUZ73O_cjs.computeSchemaHash(
|
|
4974
|
+
chunkJHRUZ73O_cjs.serializeSchema(buildProvenanceGraph(targetGraphId), activeSchema.version)
|
|
4960
4975
|
);
|
|
4961
4976
|
if (activeSchema.schema_hash !== legacyHash) {
|
|
4962
4977
|
return { state: "refuse", reason: "application-graph" };
|
|
@@ -5060,12 +5075,12 @@ async function* readRowsOfKind(port, graphId, kind) {
|
|
|
5060
5075
|
}
|
|
5061
5076
|
}
|
|
5062
5077
|
async function hasRowsUnderGraphId(port, graphId, scope) {
|
|
5063
|
-
const schema =
|
|
5064
|
-
const kindFilter = scope === "any" ?
|
|
5078
|
+
const schema = chunkNUQ2YFFH_cjs.createSqlSchema(port.tableNames);
|
|
5079
|
+
const kindFilter = scope === "any" ? chunkH5IJSROF_cjs.sql.empty() : chunkH5IJSROF_cjs.sql` AND kind <> ${PROVENANCE_KIND}`;
|
|
5065
5080
|
if (await hasRowsInTable(port, schema.tables.nodes, graphId, kindFilter)) {
|
|
5066
5081
|
return true;
|
|
5067
5082
|
}
|
|
5068
|
-
if (await hasRowsInTable(port, schema.tables.edges, graphId,
|
|
5083
|
+
if (await hasRowsInTable(port, schema.tables.edges, graphId, chunkH5IJSROF_cjs.sql.empty())) {
|
|
5069
5084
|
return true;
|
|
5070
5085
|
}
|
|
5071
5086
|
for (const tableName of secondaryRowTableNames(schema.tables)) {
|
|
@@ -5092,8 +5107,8 @@ function secondaryRowTableNames(tables) {
|
|
|
5092
5107
|
}
|
|
5093
5108
|
async function hasRowsInTable(port, tableName, graphId, filter) {
|
|
5094
5109
|
const rows = await port.execute(
|
|
5095
|
-
|
|
5096
|
-
|
|
5110
|
+
chunkH5IJSROF_cjs.asCompiledRowsSql(
|
|
5111
|
+
chunkH5IJSROF_cjs.sql`SELECT 1 AS present FROM ${chunkH5IJSROF_cjs.sql.identifier(tableName)} WHERE graph_id = ${graphId}${filter} LIMIT 1`
|
|
5097
5112
|
)
|
|
5098
5113
|
);
|
|
5099
5114
|
return rows.length > 0;
|
|
@@ -5101,10 +5116,10 @@ async function hasRowsInTable(port, tableName, graphId, filter) {
|
|
|
5101
5116
|
async function hasRowsInSecondaryTable(port, tableName, graphId) {
|
|
5102
5117
|
const tableExists = port.tableExists;
|
|
5103
5118
|
if (tableExists !== void 0) {
|
|
5104
|
-
return await tableExists(tableName) && await hasRowsInTable(port, tableName, graphId,
|
|
5119
|
+
return await tableExists(tableName) && await hasRowsInTable(port, tableName, graphId, chunkH5IJSROF_cjs.sql.empty());
|
|
5105
5120
|
}
|
|
5106
5121
|
try {
|
|
5107
|
-
return await hasRowsInTable(port, tableName, graphId,
|
|
5122
|
+
return await hasRowsInTable(port, tableName, graphId, chunkH5IJSROF_cjs.sql.empty());
|
|
5108
5123
|
} catch {
|
|
5109
5124
|
return false;
|
|
5110
5125
|
}
|
|
@@ -5149,7 +5164,7 @@ function contributionKey(record) {
|
|
|
5149
5164
|
]);
|
|
5150
5165
|
}
|
|
5151
5166
|
function encodeProvenanceTuple(values) {
|
|
5152
|
-
return values.some((value) => value.includes(ID_SEPARATOR)) ?
|
|
5167
|
+
return values.some((value) => value.includes(ID_SEPARATOR)) ? chunkCRZ56SZU_cjs.encodeTupleKey(values) : values.join(ID_SEPARATOR);
|
|
5153
5168
|
}
|
|
5154
5169
|
async function provenanceNodeId(targetGraphId, record) {
|
|
5155
5170
|
const tuple = encodeProvenanceTuple([
|
|
@@ -5657,7 +5672,7 @@ async function stageBranches(baseStore, branches, captureTargetStateFor) {
|
|
|
5657
5672
|
const windowedEdges = [];
|
|
5658
5673
|
const newIdentityAssertions = [];
|
|
5659
5674
|
const retractedIdentityAssertions = [];
|
|
5660
|
-
const baseIdentityAssertions = await
|
|
5675
|
+
const baseIdentityAssertions = await chunk2CVDZCXH_cjs.storeRuntime(baseStore).readCurrentIdentityAssertions("state");
|
|
5661
5676
|
let targetNodeVersions = /* @__PURE__ */ new Map();
|
|
5662
5677
|
let targetEdgeSignatures = /* @__PURE__ */ new Map();
|
|
5663
5678
|
for (const branch2 of branches) {
|
|
@@ -6800,7 +6815,7 @@ async function applyNodeRows(target, txBackend, nodesApi, deletions, upserts) {
|
|
|
6800
6815
|
afterImages.set(mergeKey(kind, item.id), props);
|
|
6801
6816
|
}
|
|
6802
6817
|
}
|
|
6803
|
-
return
|
|
6818
|
+
return chunk2CVDZCXH_cjs.storeRuntime(target).applyResolvedNodeUniqueness(
|
|
6804
6819
|
txBackend,
|
|
6805
6820
|
{
|
|
6806
6821
|
upserts: upserts.map((upsert) => ({
|
|
@@ -6848,7 +6863,7 @@ async function applyEdgeRows(edgesApi, deletions, upserts) {
|
|
|
6848
6863
|
}
|
|
6849
6864
|
async function applyIdentityRows(target, txBackend, assertions, retractions, assertConsistent) {
|
|
6850
6865
|
try {
|
|
6851
|
-
const applied = await
|
|
6866
|
+
const applied = await chunk2CVDZCXH_cjs.storeRuntime(target).applyIdentityMergeAtTarget(
|
|
6852
6867
|
txBackend,
|
|
6853
6868
|
retractions,
|
|
6854
6869
|
assertions
|
|
@@ -6946,7 +6961,7 @@ async function applyInternalMergePlan(plan, nodesApi, edgesApi, target, txBacken
|
|
|
6946
6961
|
};
|
|
6947
6962
|
}
|
|
6948
6963
|
async function commitPlan(target, plan, expectedBaseVersion) {
|
|
6949
|
-
if (!
|
|
6964
|
+
if (!chunk2CVDZCXH_cjs.storeBackend(target).capabilities.transactions) {
|
|
6950
6965
|
throw new MergeError(
|
|
6951
6966
|
"merge() requires a transaction-capable target backend. The merged plan (canonical upserts, soft-deletes, edge upserts) must commit atomically; a non-transactional fallback would leave a partially-merged graph on a mid-commit failure. (mergeIncremental() enforces the same requirement.)",
|
|
6952
6967
|
{ details: { capability: "transactions" } }
|
|
@@ -6957,14 +6972,14 @@ async function commitPlan(target, plan, expectedBaseVersion) {
|
|
|
6957
6972
|
() => target.transaction(async (tx) => {
|
|
6958
6973
|
if (expectedBaseVersion !== void 0) {
|
|
6959
6974
|
await assertTargetUnchanged(
|
|
6960
|
-
|
|
6975
|
+
chunk2CVDZCXH_cjs.transactionBackend(tx),
|
|
6961
6976
|
target,
|
|
6962
6977
|
expectedBaseVersion
|
|
6963
6978
|
);
|
|
6964
6979
|
}
|
|
6965
6980
|
await assertPlannedIdentityIdsFresh(
|
|
6966
6981
|
target,
|
|
6967
|
-
|
|
6982
|
+
chunk2CVDZCXH_cjs.transactionBackend(tx),
|
|
6968
6983
|
plan
|
|
6969
6984
|
);
|
|
6970
6985
|
return applyInternalMergePlan(
|
|
@@ -6972,7 +6987,7 @@ async function commitPlan(target, plan, expectedBaseVersion) {
|
|
|
6972
6987
|
tx.nodes,
|
|
6973
6988
|
tx.edges,
|
|
6974
6989
|
target,
|
|
6975
|
-
|
|
6990
|
+
chunk2CVDZCXH_cjs.transactionBackend(tx)
|
|
6976
6991
|
);
|
|
6977
6992
|
}, mergeCommitTransactionOptions(target))
|
|
6978
6993
|
)
|
|
@@ -6993,9 +7008,9 @@ function mergeCommitTransactionOptions(target) {
|
|
|
6993
7008
|
}
|
|
6994
7009
|
async function assertTargetUnchanged(txBackend, target, expectedBaseVersion) {
|
|
6995
7010
|
if (hasRevisionAnchor(expectedBaseVersion)) {
|
|
6996
|
-
await
|
|
7011
|
+
await chunkJQKMEKKW_cjs.lockRecordedGraphWrite(txBackend, target.graphId);
|
|
6997
7012
|
const expectedOrigin = revisionOriginOf(expectedBaseVersion);
|
|
6998
|
-
const liveOrigin = await
|
|
7013
|
+
const liveOrigin = await chunkJQKMEKKW_cjs.readRevisionOrigin(
|
|
6999
7014
|
txBackend,
|
|
7000
7015
|
target.revisionSchema,
|
|
7001
7016
|
target.graphId
|
|
@@ -7009,7 +7024,7 @@ async function assertTargetUnchanged(txBackend, target, expectedBaseVersion) {
|
|
|
7009
7024
|
}
|
|
7010
7025
|
);
|
|
7011
7026
|
}
|
|
7012
|
-
const liveRevision = await
|
|
7027
|
+
const liveRevision = await chunkJQKMEKKW_cjs.readRecordedClock(
|
|
7013
7028
|
txBackend,
|
|
7014
7029
|
target.revisionSchema,
|
|
7015
7030
|
target.graphId
|
|
@@ -7030,7 +7045,7 @@ async function assertTargetUnchanged(txBackend, target, expectedBaseVersion) {
|
|
|
7030
7045
|
txBackend,
|
|
7031
7046
|
target.graphId,
|
|
7032
7047
|
target.graph,
|
|
7033
|
-
await
|
|
7048
|
+
await chunk2CVDZCXH_cjs.storeRuntime(target).identityAssertionsAtTarget(txBackend, "state")
|
|
7034
7049
|
);
|
|
7035
7050
|
const expectedContent = contentComponentOf(expectedBaseVersion);
|
|
7036
7051
|
if (liveContent !== expectedContent) {
|
|
@@ -7122,7 +7137,7 @@ async function tryOpenProvenanceStore(target) {
|
|
|
7122
7137
|
}
|
|
7123
7138
|
}
|
|
7124
7139
|
function assertPublicPlanCapability(target) {
|
|
7125
|
-
if (!
|
|
7140
|
+
if (!chunk2CVDZCXH_cjs.storeBackend(target).capabilities.transactions) {
|
|
7126
7141
|
throw new MergePlanCapabilityError(
|
|
7127
7142
|
"Public merge plans require a transaction-capable target backend.",
|
|
7128
7143
|
{ details: { capability: "transactions" } }
|
|
@@ -7141,7 +7156,7 @@ function assertPublicPlanCapability(target) {
|
|
|
7141
7156
|
async function captureMergePlanTargetFence(target) {
|
|
7142
7157
|
assertPublicPlanCapability(target);
|
|
7143
7158
|
const [activeSchema, schemaHash, origin, revision] = await Promise.all([
|
|
7144
|
-
|
|
7159
|
+
chunk2CVDZCXH_cjs.storeBackend(target).getActiveSchema(target.graphId),
|
|
7145
7160
|
computeSchemaComponent(target),
|
|
7146
7161
|
target.revisionOriginNow(),
|
|
7147
7162
|
target.revisionNow()
|
|
@@ -7307,7 +7322,7 @@ async function resolveMerge(store, target, branches, options, useBaseSources, in
|
|
|
7307
7322
|
}
|
|
7308
7323
|
}
|
|
7309
7324
|
for (const branch2 of branches) {
|
|
7310
|
-
const branchSchemaRow = await
|
|
7325
|
+
const branchSchemaRow = await chunk2CVDZCXH_cjs.storeBackend(branch2.store).getActiveSchema(
|
|
7311
7326
|
branch2.store.graphId
|
|
7312
7327
|
);
|
|
7313
7328
|
let drifted;
|
|
@@ -7315,7 +7330,7 @@ async function resolveMerge(store, target, branches, options, useBaseSources, in
|
|
|
7315
7330
|
const anchor = branch2.schemaAnchor;
|
|
7316
7331
|
drifted = anchor === void 0 ? branchSchemaRow !== void 0 : branchSchemaRow?.version !== anchor.version || branchSchemaRow.schema_hash !== anchor.hash;
|
|
7317
7332
|
} else {
|
|
7318
|
-
const sourceSchemaRow = await
|
|
7333
|
+
const sourceSchemaRow = await chunk2CVDZCXH_cjs.storeBackend(store).getActiveSchema(
|
|
7319
7334
|
store.graphId
|
|
7320
7335
|
);
|
|
7321
7336
|
drifted = branchSchemaRow?.schema_hash !== sourceSchemaRow?.schema_hash;
|
|
@@ -7360,7 +7375,7 @@ async function resolveMerge(store, target, branches, options, useBaseSources, in
|
|
|
7360
7375
|
options.embedder
|
|
7361
7376
|
);
|
|
7362
7377
|
const ctx = {
|
|
7363
|
-
backend:
|
|
7378
|
+
backend: chunk2CVDZCXH_cjs.storeBackend(store),
|
|
7364
7379
|
...embeddings === void 0 ? {} : { embeddings }
|
|
7365
7380
|
};
|
|
7366
7381
|
const candidates = await generateAllCandidates(
|
|
@@ -7388,7 +7403,7 @@ async function resolveMerge(store, target, branches, options, useBaseSources, in
|
|
|
7388
7403
|
])
|
|
7389
7404
|
])
|
|
7390
7405
|
];
|
|
7391
|
-
const targetPeers = identityProbeIds === void 0 ? [] : await
|
|
7406
|
+
const targetPeers = identityProbeIds === void 0 ? [] : await chunk2CVDZCXH_cjs.storeRuntime(target).liveNodesSharingIds(identityProbeIds);
|
|
7392
7407
|
const stagedIdentityIds = [
|
|
7393
7408
|
.../* @__PURE__ */ new Set([
|
|
7394
7409
|
...staging.newIdentityAssertions.map((staged) => staged.assertion.id),
|
|
@@ -7397,7 +7412,7 @@ async function resolveMerge(store, target, branches, options, useBaseSources, in
|
|
|
7397
7412
|
)
|
|
7398
7413
|
])
|
|
7399
7414
|
];
|
|
7400
|
-
const storedIdentityRowsById = stagedIdentityIds.length === 0 || target.graph.identity === void 0 ? NO_STORED_ASSERTIONS : await
|
|
7415
|
+
const storedIdentityRowsById = stagedIdentityIds.length === 0 || target.graph.identity === void 0 ? NO_STORED_ASSERTIONS : await chunk2CVDZCXH_cjs.storeRuntime(target).identityAssertionRowsByIds(
|
|
7401
7416
|
stagedIdentityIds
|
|
7402
7417
|
);
|
|
7403
7418
|
const identityContext = {
|
|
@@ -7422,14 +7437,14 @@ async function resolveMerge(store, target, branches, options, useBaseSources, in
|
|
|
7422
7437
|
if (plan.identityAssertions.length > 0) {
|
|
7423
7438
|
assertOneIdOneTruth(
|
|
7424
7439
|
plan.identityAssertions,
|
|
7425
|
-
await
|
|
7440
|
+
await chunk2CVDZCXH_cjs.storeRuntime(target).identityAssertionRowsByIds(
|
|
7426
7441
|
plan.identityAssertions.map((assertion) => assertion.id)
|
|
7427
7442
|
)
|
|
7428
7443
|
);
|
|
7429
7444
|
}
|
|
7430
7445
|
let identityGuard;
|
|
7431
7446
|
if (identityProbeIds !== void 0 && incremental !== void 0) {
|
|
7432
|
-
const freshPeers = await
|
|
7447
|
+
const freshPeers = await chunk2CVDZCXH_cjs.storeRuntime(target).liveNodesSharingIds(identityProbeIds);
|
|
7433
7448
|
const built = await buildIdentityPeerProbe(
|
|
7434
7449
|
target,
|
|
7435
7450
|
identityProbeIds,
|
|
@@ -7627,7 +7642,7 @@ async function planMergeIncremental(args) {
|
|
|
7627
7642
|
computeSchemaComponent(target)
|
|
7628
7643
|
]);
|
|
7629
7644
|
if (forkSchema !== targetSchema) return chunkRJMHU2MG_cjs.err(incrementalSchemaError());
|
|
7630
|
-
const forkActiveSchema = await
|
|
7645
|
+
const forkActiveSchema = await chunk2CVDZCXH_cjs.storeBackend(forkPoint).getActiveSchema(
|
|
7631
7646
|
forkPoint.graphId
|
|
7632
7647
|
);
|
|
7633
7648
|
const targetBranch = {
|
|
@@ -7868,7 +7883,7 @@ async function preflightWireMergeWrites(target, nodesApi, edgesApi, artifact) {
|
|
|
7868
7883
|
}
|
|
7869
7884
|
for (const upsert of artifact.writes.edgeUpserts) {
|
|
7870
7885
|
const registration = chunkN66HCGCY_cjs.requireDefined(graphEdges[upsert.kind]);
|
|
7871
|
-
const endpointError =
|
|
7886
|
+
const endpointError = chunkCRZ56SZU_cjs.validateEdgeEndpoints(
|
|
7872
7887
|
upsert.kind,
|
|
7873
7888
|
upsert.from.kind,
|
|
7874
7889
|
upsert.to.kind,
|
|
@@ -7971,7 +7986,7 @@ async function preflightWireMergeWrites(target, nodesApi, edgesApi, artifact) {
|
|
|
7971
7986
|
}
|
|
7972
7987
|
}
|
|
7973
7988
|
async function assertMergePlanFenceInsideTransaction(target, txBackend, artifact) {
|
|
7974
|
-
await
|
|
7989
|
+
await chunkJQKMEKKW_cjs.lockRecordedGraphWrite(txBackend, target.graphId);
|
|
7975
7990
|
const activeSchema = await txBackend.getActiveSchema(target.graphId);
|
|
7976
7991
|
const liveSchema = {
|
|
7977
7992
|
managed: activeSchema !== void 0,
|
|
@@ -7984,7 +7999,7 @@ async function assertMergePlanFenceInsideTransaction(target, txBackend, artifact
|
|
|
7984
7999
|
{ details: { expected: artifact.target.schema, live: liveSchema } }
|
|
7985
8000
|
);
|
|
7986
8001
|
}
|
|
7987
|
-
const liveOrigin = await
|
|
8002
|
+
const liveOrigin = await chunkJQKMEKKW_cjs.readRevisionOrigin(
|
|
7988
8003
|
txBackend,
|
|
7989
8004
|
target.revisionSchema,
|
|
7990
8005
|
target.graphId
|
|
@@ -8000,7 +8015,7 @@ async function assertMergePlanFenceInsideTransaction(target, txBackend, artifact
|
|
|
8000
8015
|
}
|
|
8001
8016
|
);
|
|
8002
8017
|
}
|
|
8003
|
-
const liveRevision = await
|
|
8018
|
+
const liveRevision = await chunkJQKMEKKW_cjs.readRecordedClock(
|
|
8004
8019
|
txBackend,
|
|
8005
8020
|
target.revisionSchema,
|
|
8006
8021
|
target.graphId
|
|
@@ -8076,7 +8091,7 @@ async function applyWireMergeWrites(target, nodesApi, edgesApi, txBackend, artif
|
|
|
8076
8091
|
txBackend,
|
|
8077
8092
|
identityAssertions,
|
|
8078
8093
|
identityRetractions,
|
|
8079
|
-
() =>
|
|
8094
|
+
() => chunk2CVDZCXH_cjs.storeRuntime(target).assertIdentityClassesConsistentAtTarget(
|
|
8080
8095
|
txBackend,
|
|
8081
8096
|
identityConsistencySeeds(
|
|
8082
8097
|
artifact,
|
|
@@ -8084,8 +8099,8 @@ async function applyWireMergeWrites(target, nodesApi, edgesApi, txBackend, artif
|
|
|
8084
8099
|
)
|
|
8085
8100
|
)
|
|
8086
8101
|
);
|
|
8087
|
-
if (!
|
|
8088
|
-
await
|
|
8102
|
+
if (!chunkJQKMEKKW_cjs.forceRecordedGraphRevision(txBackend, target.graphId) && !chunkJQKMEKKW_cjs.forceWriteTransactionRevision(txBackend)) {
|
|
8103
|
+
await chunkJQKMEKKW_cjs.advanceRevisionClock(
|
|
8089
8104
|
txBackend,
|
|
8090
8105
|
target.revisionSchema,
|
|
8091
8106
|
target.graphId,
|
|
@@ -8156,7 +8171,7 @@ async function applyMergePlan(target, input) {
|
|
|
8156
8171
|
}
|
|
8157
8172
|
const merged = await withTxConflictRetry(
|
|
8158
8173
|
() => target.transaction(async (tx) => {
|
|
8159
|
-
const txBackend =
|
|
8174
|
+
const txBackend = chunk2CVDZCXH_cjs.transactionBackend(tx);
|
|
8160
8175
|
await assertMergePlanFenceInsideTransaction(
|
|
8161
8176
|
target,
|
|
8162
8177
|
txBackend,
|
|
@@ -8649,7 +8664,7 @@ async function assertForkPointUnchanged(precondition) {
|
|
|
8649
8664
|
);
|
|
8650
8665
|
}
|
|
8651
8666
|
async function commitIncrementalPlan(target, plan, guard) {
|
|
8652
|
-
if (!
|
|
8667
|
+
if (!chunk2CVDZCXH_cjs.storeBackend(target).capabilities.transactions) {
|
|
8653
8668
|
throw new MergeError(
|
|
8654
8669
|
"mergeIncremental() requires a transaction-capable target backend. Incremental writes must preflight existing rows and commit atomically; non-transactional fallback would allow partial graph writes.",
|
|
8655
8670
|
{ details: { capability: "transactions" } }
|
|
@@ -8659,7 +8674,7 @@ async function commitIncrementalPlan(target, plan, guard) {
|
|
|
8659
8674
|
() => withTxConflictRetry(
|
|
8660
8675
|
() => target.transaction(async (tx) => {
|
|
8661
8676
|
if (target.revisionTrackingEnabled) {
|
|
8662
|
-
await
|
|
8677
|
+
await chunkJQKMEKKW_cjs.lockRecordedGraphWrite(chunk2CVDZCXH_cjs.transactionBackend(tx), target.graphId);
|
|
8663
8678
|
}
|
|
8664
8679
|
await assertForkPointUnchanged(guard.forkPoint);
|
|
8665
8680
|
const nodesApi = tx.nodes;
|
|
@@ -8670,12 +8685,12 @@ async function commitIncrementalPlan(target, plan, guard) {
|
|
|
8670
8685
|
);
|
|
8671
8686
|
await assertPlannedIdentityIdsFresh(
|
|
8672
8687
|
target,
|
|
8673
|
-
|
|
8688
|
+
chunk2CVDZCXH_cjs.transactionBackend(tx),
|
|
8674
8689
|
plan
|
|
8675
8690
|
);
|
|
8676
8691
|
await assertIdentityPeersStable(
|
|
8677
8692
|
target,
|
|
8678
|
-
|
|
8693
|
+
chunk2CVDZCXH_cjs.transactionBackend(tx),
|
|
8679
8694
|
guard.identityPeerProbe,
|
|
8680
8695
|
plan
|
|
8681
8696
|
);
|
|
@@ -8687,7 +8702,7 @@ async function commitIncrementalPlan(target, plan, guard) {
|
|
|
8687
8702
|
nodesApi,
|
|
8688
8703
|
edgesApi,
|
|
8689
8704
|
target,
|
|
8690
|
-
|
|
8705
|
+
chunk2CVDZCXH_cjs.transactionBackend(tx)
|
|
8691
8706
|
);
|
|
8692
8707
|
}, mergeCommitTransactionOptions(target))
|
|
8693
8708
|
)
|