@nicia-ai/typegraph 0.50.0 → 0.51.1
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-WCLMKNQE.cjs → chunk-5FVZSE3B.cjs} +1356 -1108
- package/dist/chunk-5FVZSE3B.cjs.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-7CCMCMJO.cjs → chunk-AOGOC6JF.cjs} +77 -68
- package/dist/chunk-AOGOC6JF.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-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-2Q45FAIE.js → chunk-EVYW3532.js} +28 -19
- package/dist/chunk-EVYW3532.js.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-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-MX7EKQPM.js → chunk-K6OZIHKI.js} +345 -97
- package/dist/chunk-K6OZIHKI.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-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-MM3JHVKZ.cjs → chunk-TUWSVL6I.cjs} +4 -4
- package/dist/{chunk-MM3JHVKZ.cjs.map → chunk-TUWSVL6I.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-R7MRFE5P.js → chunk-WS5MT2UJ.js} +3 -3
- package/dist/{chunk-R7MRFE5P.js.map → chunk-WS5MT2UJ.js.map} +1 -1
- package/dist/chunk-XORONCV3.js +202 -0
- package/dist/chunk-XORONCV3.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-JC7OBRAW.js +75 -0
- package/dist/local-store-impl-JC7OBRAW.js.map +1 -0
- package/dist/local-store-impl-UOS2LUIG.cjs +77 -0
- package/dist/local-store-impl-UOS2LUIG.cjs.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-J5J5AA52.cjs +75 -0
- package/dist/pglite-store-impl-J5J5AA52.cjs.map +1 -0
- package/dist/pglite-store-impl-LDRH2DUH.js +73 -0
- package/dist/pglite-store-impl-LDRH2DUH.js.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,25 +1,26 @@
|
|
|
1
|
-
import { createEdgeRowMapper, createNodeRowMapper, SQLITE_ROW_MAPPER_CONFIG, POSTGRES_ROW_MAPPER_CONFIG, normalizeRowTimestamp, normalizeRequiredRowTimestamp, buildHardDeleteEdgeClaimsByNodeKind, buildHardDeleteUniquesByConcreteKind, buildHardDeleteEdgeClaimsByEdgeKind } from './chunk-
|
|
2
|
-
import { rowToNode, executeNodeBulkFindByIndex, executeNodeBulkFindByConstraint, executeNodeFindByConstraint, executeNodeBulkGetOrCreateByConstraint, executeNodeGetOrCreateByConstraint, executeNodeHardDelete, executeNodeDeleteBatch, executeNodeDelete, nodeUpsertDirtyCheck, executeNodeUpsertUpdate, executeNodeUpdateWhere, executeNodeUpdate, executeNodeCreateNoReturnBatch, executeNodeCreateBatch, executeNodeCreate, rowToEdge, assertValidityEndMutation, assertClearValidToSupported, runHookedWritePlan, edgeWritePlan, runWritePlan, edgeWriteNeedsConstraintFence, withAlreadyExistsTranslation, createEdgeBatchValidationBackend, rowToNodeMeta, rowToEdgeMeta, unfencedTarget, validityEndAfterMutation, checkCardinalityConstraint, assertsStoredWindowState } from './chunk-
|
|
3
|
-
import { storeRuntime, STORE_RUNTIME, applyResolvedNodeClaims, TRANSACTION_RUNTIME, AUTO_REFRESH_STATISTICS_ROW_THRESHOLD, getEmbeddingFields, computeFulltextContent } from './chunk-
|
|
4
|
-
import { edgeCardinalityClaimTarget, edgeCardinalityClaim } from './chunk-
|
|
5
|
-
import { loadAndMergeGraphExtensionDocument, serializeSchema, buildKindRegistry, ensureIdentitySchemaStorage, loadAndVerifyGraph, identitySchemaCommitPreflight, getSchemaChanges, requiresMigration, mergeGraphExtension, commitNewSchemaVersion, commitNewSchemaVersionWithPreflight, parseSerializedSchema, planRemovals, stripGraphExtension, applyDeprecatedKinds, identityKindCascadeNeeded, ensureSchema, loadActiveSchemaWithBootstrap, extensionKindNames, serializeSchemaProperties, buildGraphExtensionOntologyKeySet, compileTimeOntologyKey, commitNewSchemaVersionIfKindsEmpty, serializeIndexDeclaration } from './chunk-
|
|
6
|
-
import { getTypeName } from './chunk-
|
|
7
|
-
import { rebuildIdentityClosureForContext, loadCurrentStructuralClasses, loadAssertionsByIds, toTransferAssertion, liveNodeKindsSharingIds, createIdentityFacade, createIdentityReadFacade, validateIdentityForContext, removeIdentityKindsForContext, readIdentityAssertionsForInterchange, readIdentityAssertionPageAtTarget, lockIdentityGraph, foldIdentityForCreatedNodes, importIdentityAssertionsIntoTarget, assertAffectedIdentityClassesConsistent, applyIdentityChangesForContext, refKey, requireNodeValidityEndCompatible, detachIdentityForNode } from './chunk-
|
|
8
|
-
import { isParameterRef, resolveParameterValueType, fieldRef, buildFieldBuilderForTypeInfo, stringField, createFulltextAccessor, CURRENT_READ_INSTANT_PLACEHOLDER, withPinnedReadInstant, assertRevisionTrackableBackend, createRecordedBackend, lockRecordedGraphWrite, runInWriteTransaction, createRecordedTransactionScope, readRecordedClock, ensureRevisionOrigin, withRecordedFlushObserver, withWriteTransactionSession, recordedCaptureRequiresCallbackTransactionError, assertRecordedCaptureTransactionIsolation, lockSchemaVersionForStoreWrite, generateId, assertCurrentRecordedSchema, baseField, objectField, arrayField, dateField, numberField, advanceRevisionClock, validateEdgeProps, sqlValueList, getNodeRowsByIds, getEdgeRowsByIds, compileKindFilter, currentReadInstant, compileTemporalFilter, closeRecordedHardDeletedKind, buildPredicateIndex, historicalIdentityPeerClassQuery, IDENTITY_PEER_CLASS_COLUMNS, compileFieldValue, recordedBindParamBudget, extractVectorSimilarityPredicates, extractFulltextMatchPredicates, currentReadInstantFor, extractTemporalOptions, compilePredicateExpression, getPredicatesForAlias, getFieldPointer, getNodeKindsForAlias, getHybridTargetAlias, throwHistoryUnsafeSqlAccess, throwRevisionTrackingUnsafeSqlAccess, compilePredicateClauses } from './chunk-
|
|
9
|
-
import { withRecordedRelationsPrecondition, projectGraphBackend, deriveBackend, canonicalEqual, sortedReplacer, projectBackend, chunk, postgresReadWriteRefusedSqlState, isMissingTableError, groupBy, postgresTemporaryTableUnavailableSqlState, isPostgresConcurrentDdlRaceError } from './chunk-
|
|
10
|
-
import {
|
|
11
|
-
import { runOptionallyInTransaction, createTransactionReadBackend, rowPropsToObject, INTERNAL_TEMPORARY_WRITES } from './chunk-
|
|
12
|
-
import { isKnownKind } from './chunk-
|
|
13
|
-
import { compareClaimTargets, encodeTupleKey, uniquenessClaimTarget, subClassComponent, isSameClaimOwner, DISJOINT_CONSTRAINT_NAME, disjointnessClaimAxis, validateEdgeEndpoints } from './chunk-
|
|
1
|
+
import { createEdgeRowMapper, createNodeRowMapper, SQLITE_ROW_MAPPER_CONFIG, POSTGRES_ROW_MAPPER_CONFIG, normalizeRowTimestamp, normalizeRequiredRowTimestamp, buildHardDeleteEdgeClaimsByNodeKind, buildHardDeleteUniquesByConcreteKind, buildHardDeleteEdgeClaimsByEdgeKind } from './chunk-VUQZNUHU.js';
|
|
2
|
+
import { rowToNode, executeNodeBulkFindByIndex, executeNodeBulkFindByConstraint, executeNodeFindByConstraint, executeNodeBulkGetOrCreateByConstraint, executeNodeGetOrCreateByConstraint, executeNodeHardDelete, executeNodeDeleteBatch, executeNodeDelete, nodeUpsertDirtyCheck, executeNodeUpsertUpdate, executeNodeUpdateWhere, executeNodeUpdate, executeNodeCreateNoReturnBatch, executeNodeCreateBatch, executeNodeCreate, rowToEdge, assertValidityEndMutation, assertClearValidToSupported, runHookedWritePlan, edgeWritePlan, runWritePlan, edgeWriteNeedsConstraintFence, withAlreadyExistsTranslation, createEdgeBatchValidationBackend, rowToNodeMeta, rowToEdgeMeta, unfencedTarget, validityEndAfterMutation, checkCardinalityConstraint, assertsStoredWindowState } from './chunk-TYEYRCXL.js';
|
|
3
|
+
import { storeRuntime, STORE_RUNTIME, applyResolvedNodeClaims, TRANSACTION_RUNTIME, AUTO_REFRESH_STATISTICS_ROW_THRESHOLD, getEmbeddingFields, computeFulltextContent } from './chunk-4DKY6RIU.js';
|
|
4
|
+
import { edgeCardinalityClaimTarget, edgeCardinalityClaim } from './chunk-NGQDGL5X.js';
|
|
5
|
+
import { loadAndMergeGraphExtensionDocument, serializeSchema, buildKindRegistry, ensureIdentitySchemaStorage, loadAndVerifyGraph, identitySchemaCommitPreflight, getSchemaChanges, requiresMigration, mergeGraphExtension, commitNewSchemaVersion, commitNewSchemaVersionWithPreflight, parseSerializedSchema, planRemovals, stripGraphExtension, applyDeprecatedKinds, identityKindCascadeNeeded, ensureSchema, loadActiveSchemaWithBootstrap, extensionKindNames, serializeSchemaProperties, buildGraphExtensionOntologyKeySet, compileTimeOntologyKey, commitNewSchemaVersionIfKindsEmpty, serializeIndexDeclaration } from './chunk-EVYW3532.js';
|
|
6
|
+
import { getTypeName } from './chunk-LI4K2KEJ.js';
|
|
7
|
+
import { rebuildIdentityClosureForContext, loadCurrentStructuralClasses, loadAssertionsByIds, toTransferAssertion, liveNodeKindsSharingIds, createIdentityFacade, createIdentityReadFacade, validateIdentityForContext, removeIdentityKindsForContext, readIdentityAssertionsForInterchange, readIdentityAssertionPageAtTarget, lockIdentityGraph, foldIdentityForCreatedNodes, importIdentityAssertionsIntoTarget, assertAffectedIdentityClassesConsistent, applyIdentityChangesForContext, refKey, requireNodeValidityEndCompatible, detachIdentityForNode } from './chunk-WFSYYU4W.js';
|
|
8
|
+
import { isParameterRef, resolveParameterValueType, fieldRef, buildFieldBuilderForTypeInfo, stringField, createFulltextAccessor, CURRENT_READ_INSTANT_PLACEHOLDER, withPinnedReadInstant, assertRevisionTrackableBackend, createRecordedBackend, lockRecordedGraphWrite, runInWriteTransaction, createRecordedTransactionScope, readRecordedClock, ensureRevisionOrigin, withRecordedFlushObserver, withWriteTransactionSession, recordedCaptureRequiresCallbackTransactionError, assertRecordedCaptureTransactionIsolation, lockSchemaVersionForStoreWrite, generateId, assertCurrentRecordedSchema, assertRecursiveTraversalSupported, baseField, objectField, arrayField, dateField, numberField, advanceRevisionClock, validateEdgeProps, sqlValueList, getNodeRowsByIds, getEdgeRowsByIds, compileKindFilter, currentReadInstant, compileTemporalFilter, closeRecordedHardDeletedKind, buildPredicateIndex, requireRecursiveTraversalVerdict, historicalIdentityPeerClassQuery, IDENTITY_PEER_CLASS_COLUMNS, compileFieldValue, recordedBindParamBudget, extractVectorSimilarityPredicates, extractFulltextMatchPredicates, currentReadInstantFor, extractTemporalOptions, compilePredicateExpression, getPredicatesForAlias, getFieldPointer, getNodeKindsForAlias, getHybridTargetAlias, throwHistoryUnsafeSqlAccess, throwRevisionTrackingUnsafeSqlAccess, compilePredicateClauses } from './chunk-VAAC7L57.js';
|
|
9
|
+
import { withRecordedRelationsPrecondition, projectGraphBackend, deriveBackend, canonicalEqual, sortedReplacer, projectBackend, chunk, postgresReadWriteRefusedSqlState, isMissingTableError, groupBy, postgresTemporaryTableUnavailableSqlState, isPostgresConcurrentDdlRaceError } from './chunk-QG5VEOKX.js';
|
|
10
|
+
import { assumeRecursiveTraversalSupported, batchPointReadVerdict, resolveRecursiveTraversal, statementExecutionVerdict, createClaimsVerdictThunk, uniqueSidecarBatchVerdict, contributionHealthVerdict, recordedRevisionOriginsVerdict, requireExtras, assertRecursiveTraversal } from './chunk-XORONCV3.js';
|
|
11
|
+
import { createSqlSchema, requireSqlSchema, DEFAULT_SQL_SCHEMA, recordedReadSchemaFor, resolveWriteFencePlan, refuseUnfencedOperationalIdentity, refuseUnfencedClockAllocation, requireExternalRecordedReadSource, createRecordedReadBinding, runOptionallyInTransaction, createTransactionReadBackend, bindExtraIfReachable, BATCH_POINT_READ, CONTRIBUTION_HEALTH, bindExtra, vectorSlotKey, recordedReadSqlSchema, requireRecordedReadBinding, rowPropsToObject, INTERNAL_TEMPORARY_WRITES, ALIAS_CTE_PREFIX, EMBEDDINGS_CTE_ALIAS, FULLTEXT_CTE_ALIAS, HYBRID_CANDIDATES_CTE_ALIAS } from './chunk-LKZDQ2B4.js';
|
|
12
|
+
import { isKnownKind } from './chunk-M3VTS3F6.js';
|
|
13
|
+
import { compareClaimTargets, encodeTupleKey, uniquenessClaimTarget, subClassComponent, isSameClaimOwner, DISJOINT_CONSTRAINT_NAME, disjointnessClaimAxis, validateEdgeEndpoints } from './chunk-RVUL2HXY.js';
|
|
14
14
|
import { resolveReadCoordinate, withRecordedCoordinate, describeCoordinate, coordinateContext, recordedInstantWallTime, asRecordedInstant, assertValidRecordedInstant, optionalRecordedInstantParts } from './chunk-6NKSE5AU.js';
|
|
15
15
|
import { nowIso, validityWindowContainsInstant, validateOptionalCanonicalIsoDate, assertOrderedValidityWindow, preservesImmutableLowerBound, assertWritableValidityWindow, isCanonicalIsoDate, statedBoundMatchesStored } from './chunk-K46SDNQD.js';
|
|
16
|
-
import { generateIndexDDL } from './chunk-
|
|
17
|
-
import { SYSTEM_INDEX_DECLARATIONS, resolveSystemIndexTableName, systemIndexName, resolveSystemIndexNames, generateSystemIndexDDL } from './chunk-
|
|
18
|
-
import { NODE_META_KEYS, EDGE_META_KEYS } from './chunk-
|
|
16
|
+
import { generateIndexDDL } from './chunk-6NLYIMJO.js';
|
|
17
|
+
import { SYSTEM_INDEX_DECLARATIONS, resolveSystemIndexTableName, systemIndexName, resolveSystemIndexNames, generateSystemIndexDDL } from './chunk-36VYWVQU.js';
|
|
18
|
+
import { NODE_META_KEYS, EDGE_META_KEYS } from './chunk-LZMQ3SFK.js';
|
|
19
19
|
import { sha256Hex, fnv1aBase36 } from './chunk-K34OPSJK.js';
|
|
20
|
+
import { getDialect } from './chunk-7G5IYROL.js';
|
|
20
21
|
import { DEFAULT_PAGINATION_LIMIT, DEFAULT_STREAM_BATCH_SIZE, SQLITE_PATH_DELIMITER, PG_ARRAY_START, PG_ARRAY_END, PG_PATH_ELEMENT_SEPARATOR, MAX_PG_IDENTIFIER_LENGTH } from './chunk-2EBMPJBO.js';
|
|
21
|
-
import {
|
|
22
|
-
import { isSqlPlaceholder, bindSqlValue, markAnnIndexScan, asCompiledSelectSql, isRawExecutable, renderSql, annIndexScanTypes, sql, asCompiledRowsSql, markForceCustomPlan, asCompiledStatementSql, asCompiledTemporaryStatementSql } from './chunk-
|
|
22
|
+
import { assertVectorMinScore, assertApproximateMetricSupported, vectorScoreExpression, vectorMinScoreCondition } from './chunk-PC5NGH5A.js';
|
|
23
|
+
import { isSqlPlaceholder, bindSqlValue, markAnnIndexScan, asCompiledSelectSql, isRawExecutable, renderSql, annIndexScanTypes, sql, asCompiledRowsSql, markForceCustomPlan, asCompiledStatementSql, asCompiledTemporaryStatementSql } from './chunk-7QFRK6PU.js';
|
|
23
24
|
import { createSchemaIntrospector } from './chunk-AMKPPFUO.js';
|
|
24
25
|
import { resolveEmbeddingFields, resolveGraphVectorSlots, resolveDeclaredFulltextLanguage, getSearchableFields } from './chunk-PC2UBAUB.js';
|
|
25
26
|
import { IncompatibleChangeError } from './chunk-XZW2CTNO.js';
|
|
@@ -1105,11 +1106,16 @@ function compileIdentityClassCte(input) {
|
|
|
1105
1106
|
if (!expandsIdentity) return void 0;
|
|
1106
1107
|
const coordinate = historicalCoordinate({ ast, temporalFilterPass });
|
|
1107
1108
|
if (coordinate === void 0) return void 0;
|
|
1109
|
+
const recursiveTraversal = requireRecursiveTraversalVerdict(
|
|
1110
|
+
ctx,
|
|
1111
|
+
"historical identity expansion"
|
|
1112
|
+
);
|
|
1108
1113
|
const peerClasses = historicalIdentityPeerClassQuery({
|
|
1109
1114
|
schema: ctx.schema,
|
|
1110
1115
|
graphId,
|
|
1111
1116
|
coordinate,
|
|
1112
|
-
sameIdAcrossKinds: ctx.identitySameIdAcrossKinds ?? "fold"
|
|
1117
|
+
sameIdAcrossKinds: ctx.identitySameIdAcrossKinds ?? "fold",
|
|
1118
|
+
recursiveTraversal
|
|
1113
1119
|
});
|
|
1114
1120
|
return sql`
|
|
1115
1121
|
${sql.identifier(IDENTITY_CLASS_CTE_ALIAS)}(${IDENTITY_PEER_CLASS_COLUMNS}) AS MATERIALIZED (
|
|
@@ -2908,6 +2914,7 @@ function runRecursiveQueryPassPipeline(ast, graphId, ctx) {
|
|
|
2908
2914
|
return state;
|
|
2909
2915
|
}
|
|
2910
2916
|
function compileVariableLengthQuery(ast, graphId, ctx) {
|
|
2917
|
+
assertRecursiveTraversalSupported(ctx, "variable-length traversal");
|
|
2911
2918
|
const strategy = ctx.dialect.capabilities.recursiveQueryStrategy;
|
|
2912
2919
|
const handler = RECURSIVE_QUERY_STRATEGY_HANDLERS[strategy];
|
|
2913
2920
|
return handler(ast, graphId, ctx);
|
|
@@ -3413,6 +3420,7 @@ function decodeByValueType(value, valueType) {
|
|
|
3413
3420
|
|
|
3414
3421
|
// src/store/recursive-cte.ts
|
|
3415
3422
|
function buildReachableCte(options) {
|
|
3423
|
+
assertRecursiveTraversal(options.recursiveTraversal, options.operation);
|
|
3416
3424
|
const trackPath = options.cyclePolicy === "prevent" || options.includePath;
|
|
3417
3425
|
const edgeKindFilter = compileKindFilter(
|
|
3418
3426
|
sql.raw("e.kind"),
|
|
@@ -3609,7 +3617,9 @@ async function executeSubgraph(params) {
|
|
|
3609
3617
|
dialect: ctx.dialect,
|
|
3610
3618
|
// Base schema: buildReachableCte derives the recorded swap from recordedAsOf.
|
|
3611
3619
|
schema: baseSchema,
|
|
3612
|
-
...ctx.recordedReadBinding === void 0 ? {} : { recordedReadBinding: ctx.recordedReadBinding }
|
|
3620
|
+
...ctx.recordedReadBinding === void 0 ? {} : { recordedReadBinding: ctx.recordedReadBinding },
|
|
3621
|
+
recursiveTraversal: resolveRecursiveTraversal(params.backend.capabilities),
|
|
3622
|
+
operation: "subgraph"
|
|
3613
3623
|
});
|
|
3614
3624
|
const includedIdsCte = buildIncludedIdsCte(ctx);
|
|
3615
3625
|
let membership;
|
|
@@ -4496,6 +4506,7 @@ function runStandardQueryPassPipeline(ast, graphId, ctx) {
|
|
|
4496
4506
|
}
|
|
4497
4507
|
|
|
4498
4508
|
// src/query/compiler/index.ts
|
|
4509
|
+
var COMPILER_DEFAULT_RECURSIVE_TRAVERSAL = assumeRecursiveTraversalSupported("compileQuery called without a backend");
|
|
4499
4510
|
function compileQuery(ast, graphId, options = "sqlite") {
|
|
4500
4511
|
const options_ = typeof options === "string" ? { dialect: options } : options;
|
|
4501
4512
|
const dialect = options_.dialect ?? "sqlite";
|
|
@@ -4521,6 +4532,7 @@ function compileQuery(ast, graphId, options = "sqlite") {
|
|
|
4521
4532
|
),
|
|
4522
4533
|
...options_.vectorStrategy === void 0 ? {} : { vectorStrategy: options_.vectorStrategy },
|
|
4523
4534
|
windowFunctions: options_.windowFunctions ?? true,
|
|
4535
|
+
recursiveTraversal: options_.recursiveTraversal ?? COMPILER_DEFAULT_RECURSIVE_TRAVERSAL,
|
|
4524
4536
|
...options_.vectorSlots === void 0 ? {} : { vectorSlots: options_.vectorSlots },
|
|
4525
4537
|
...options_.fulltextLanguages === void 0 ? {} : { fulltextLanguages: options_.fulltextLanguages }
|
|
4526
4538
|
};
|
|
@@ -4620,6 +4632,7 @@ function propagateOptions(options_) {
|
|
|
4620
4632
|
...options_.fulltextStrategy === void 0 ? {} : { fulltextStrategy: options_.fulltextStrategy },
|
|
4621
4633
|
...options_.vectorStrategy === void 0 ? {} : { vectorStrategy: options_.vectorStrategy },
|
|
4622
4634
|
windowFunctions: options_.windowFunctions ?? true,
|
|
4635
|
+
recursiveTraversal: options_.recursiveTraversal ?? COMPILER_DEFAULT_RECURSIVE_TRAVERSAL,
|
|
4623
4636
|
...options_.vectorSlots === void 0 ? {} : { vectorSlots: options_.vectorSlots },
|
|
4624
4637
|
...options_.fulltextLanguages === void 0 ? {} : { fulltextLanguages: options_.fulltextLanguages },
|
|
4625
4638
|
...options_.recordedReadBinding === void 0 ? {} : { recordedReadBinding: options_.recordedReadBinding },
|
|
@@ -7024,6 +7037,7 @@ function buildCompileOptions(config) {
|
|
|
7024
7037
|
dialect: config.dialect ?? "sqlite",
|
|
7025
7038
|
schema: config.schema,
|
|
7026
7039
|
windowFunctions: config.backend?.capabilities.windowFunctions ?? true,
|
|
7040
|
+
recursiveTraversal: config.backend === void 0 ? COMPILER_DEFAULT_RECURSIVE_TRAVERSAL : resolveRecursiveTraversal(config.backend.capabilities),
|
|
7027
7041
|
identitySameIdAcrossKinds: config.identitySameIdAcrossKinds,
|
|
7028
7042
|
...fulltextStrategy === void 0 ? {} : {
|
|
7029
7043
|
fulltextStrategy,
|
|
@@ -10135,7 +10149,7 @@ function searchNodeKey(kind, nodeId) {
|
|
|
10135
10149
|
function scoreDescending(metric) {
|
|
10136
10150
|
return metric === "cosine";
|
|
10137
10151
|
}
|
|
10138
|
-
async function fetchNodesForRows(backend, graphId, rows) {
|
|
10152
|
+
async function fetchNodesForRows(backend, batchPointRead, graphId, rows) {
|
|
10139
10153
|
const idsByKind = /* @__PURE__ */ new Map();
|
|
10140
10154
|
for (const row of rows) {
|
|
10141
10155
|
const ids = idsByKind.get(row.kind) ?? /* @__PURE__ */ new Set();
|
|
@@ -10145,7 +10159,13 @@ async function fetchNodesForRows(backend, graphId, rows) {
|
|
|
10145
10159
|
const map = /* @__PURE__ */ new Map();
|
|
10146
10160
|
await Promise.all(
|
|
10147
10161
|
[...idsByKind].map(async ([kind, ids]) => {
|
|
10148
|
-
const kindMap = await fetchNodesByIds(
|
|
10162
|
+
const kindMap = await fetchNodesByIds(
|
|
10163
|
+
backend,
|
|
10164
|
+
batchPointRead,
|
|
10165
|
+
graphId,
|
|
10166
|
+
kind,
|
|
10167
|
+
[...ids]
|
|
10168
|
+
);
|
|
10149
10169
|
for (const [id, node] of kindMap) {
|
|
10150
10170
|
map.set(searchNodeKey(kind, id), node);
|
|
10151
10171
|
}
|
|
@@ -10225,7 +10245,12 @@ async function executeFulltextSearch(ctx, nodeKind, options) {
|
|
|
10225
10245
|
(a, b) => b.score - a.score || compareCodePoints(a.kind, b.kind) || compareCodePoints(a.nodeId, b.nodeId)
|
|
10226
10246
|
).slice(offset, offset + options.limit);
|
|
10227
10247
|
if (merged.length === 0) return [];
|
|
10228
|
-
const nodeMap = await fetchNodesForRows(
|
|
10248
|
+
const nodeMap = await fetchNodesForRows(
|
|
10249
|
+
backend,
|
|
10250
|
+
requireDefined(ctx.batchPointRead),
|
|
10251
|
+
graphId,
|
|
10252
|
+
merged
|
|
10253
|
+
);
|
|
10229
10254
|
const hits = [];
|
|
10230
10255
|
let rank = 1;
|
|
10231
10256
|
for (const row of merged) {
|
|
@@ -10316,7 +10341,12 @@ async function executeVectorSearch(ctx, nodeKind, options) {
|
|
|
10316
10341
|
offset + options.limit
|
|
10317
10342
|
);
|
|
10318
10343
|
if (merged.length === 0) return [];
|
|
10319
|
-
const nodeMap = await fetchNodesForRows(
|
|
10344
|
+
const nodeMap = await fetchNodesForRows(
|
|
10345
|
+
backend,
|
|
10346
|
+
requireDefined(ctx.batchPointRead),
|
|
10347
|
+
graphId,
|
|
10348
|
+
merged
|
|
10349
|
+
);
|
|
10320
10350
|
const hits = [];
|
|
10321
10351
|
let rank = 1;
|
|
10322
10352
|
for (const row of merged) {
|
|
@@ -10583,6 +10613,7 @@ async function executeHybridSearch(ctx, nodeKind, options) {
|
|
|
10583
10613
|
).slice(offset, offset + options.limit);
|
|
10584
10614
|
const nodeMap = await fetchNodesForRows(
|
|
10585
10615
|
backend,
|
|
10616
|
+
requireDefined(ctx.batchPointRead),
|
|
10586
10617
|
graphId,
|
|
10587
10618
|
ranked.map((entry2) => ({
|
|
10588
10619
|
kind: entry2.kind,
|
|
@@ -10723,11 +10754,16 @@ function warnIfLanguageNotAdvertised(dialect, capabilities, language) {
|
|
|
10723
10754
|
`[typegraph] fulltext language "${language}" is not in the advertised list for dialect "${dialect}" (${capabilities.languages.join(", ")}). If your backend has this language installed this warning is safe to ignore.`
|
|
10724
10755
|
);
|
|
10725
10756
|
}
|
|
10726
|
-
async function fetchNodesByIds(backend, graphId, nodeKind, ids) {
|
|
10757
|
+
async function fetchNodesByIds(backend, batchPointRead, graphId, nodeKind, ids) {
|
|
10727
10758
|
if (ids.length === 0) return /* @__PURE__ */ new Map();
|
|
10728
10759
|
const map = /* @__PURE__ */ new Map();
|
|
10729
|
-
|
|
10730
|
-
|
|
10760
|
+
const bound = bindExtraIfReachable(
|
|
10761
|
+
backend,
|
|
10762
|
+
batchPointRead.extras.getNodes,
|
|
10763
|
+
BATCH_POINT_READ.id
|
|
10764
|
+
);
|
|
10765
|
+
if (bound !== void 0) {
|
|
10766
|
+
const rows = await bound.getNodes(graphId, nodeKind, ids);
|
|
10731
10767
|
for (const row of rows) {
|
|
10732
10768
|
if (row.deleted_at !== void 0) continue;
|
|
10733
10769
|
map.set(row.id, rowToNode(row));
|
|
@@ -10745,7 +10781,10 @@ async function fetchNodesByIds(backend, graphId, nodeKind, ids) {
|
|
|
10745
10781
|
var StoreSearch = class {
|
|
10746
10782
|
#context;
|
|
10747
10783
|
constructor(context) {
|
|
10748
|
-
this.#context =
|
|
10784
|
+
this.#context = {
|
|
10785
|
+
...context,
|
|
10786
|
+
batchPointRead: context.batchPointRead ?? batchPointReadVerdict(context.backend)
|
|
10787
|
+
};
|
|
10749
10788
|
}
|
|
10750
10789
|
/**
|
|
10751
10790
|
* Runs a fulltext search against nodes of the given kind.
|
|
@@ -10853,6 +10892,20 @@ function asRawBackend(backend) {
|
|
|
10853
10892
|
return backend;
|
|
10854
10893
|
}
|
|
10855
10894
|
|
|
10895
|
+
// src/backend/capabilities/recorded-time-ownership.ts
|
|
10896
|
+
function resolveRecordedTimeOwnership(capabilities) {
|
|
10897
|
+
return capabilities.recordedTimeOwnership ?? "typegraph-relations";
|
|
10898
|
+
}
|
|
10899
|
+
function refuseEngineNativeRecordedTimeNotYetImplemented() {
|
|
10900
|
+
throw new ConfigurationError(
|
|
10901
|
+
'This backend declares `recordedTimeOwnership: "engine-native"`, but TypeGraph still allocates its own recorded clock for `history` / `revisionTracking`; the engine-native path lands with a later release. Construct the store without `history` / `revisionTracking`, or declare `recordedTimeOwnership: "typegraph-relations"` and let TypeGraph own the clock.',
|
|
10902
|
+
{ code: "ENGINE_NATIVE_RECORDED_TIME_NOT_IMPLEMENTED" },
|
|
10903
|
+
{
|
|
10904
|
+
suggestion: 'Construct the store without `history`/`revisionTracking`, or declare `recordedTimeOwnership: "typegraph-relations"`.'
|
|
10905
|
+
}
|
|
10906
|
+
);
|
|
10907
|
+
}
|
|
10908
|
+
|
|
10856
10909
|
// src/graph-extension/classify.ts
|
|
10857
10910
|
function classifyModifications(existing, next) {
|
|
10858
10911
|
const incompatible = [];
|
|
@@ -11659,9 +11712,13 @@ async function reduceExpandedWorkingSet(operation, workingSet, direction, reduce
|
|
|
11659
11712
|
function nodeIdentityKey(node) {
|
|
11660
11713
|
return `${node.kind}\0${node.id}`;
|
|
11661
11714
|
}
|
|
11662
|
-
function
|
|
11715
|
+
function nodeIdentityFromRow(id, kind) {
|
|
11663
11716
|
if (typeof id !== "string" || typeof kind !== "string") return void 0;
|
|
11664
|
-
return
|
|
11717
|
+
return { id, kind };
|
|
11718
|
+
}
|
|
11719
|
+
function nodeIdentityKeyFromRow(id, kind) {
|
|
11720
|
+
const node = nodeIdentityFromRow(id, kind);
|
|
11721
|
+
return node === void 0 ? void 0 : nodeIdentityKey(node);
|
|
11665
11722
|
}
|
|
11666
11723
|
function compareNodeIdentity(left, right) {
|
|
11667
11724
|
return compareCodePoints(left.id, right.id) || compareCodePoints(left.kind, right.kind);
|
|
@@ -13518,7 +13575,10 @@ async function findWeightedShortestPathInWorkingTable(ctx, sourceId, targetId, m
|
|
|
13518
13575
|
return state.frontierCount === 0;
|
|
13519
13576
|
},
|
|
13520
13577
|
async extractResult(context) {
|
|
13521
|
-
|
|
13578
|
+
const recursiveTraversal = resolveRecursiveTraversal(
|
|
13579
|
+
ctx.backend.capabilities
|
|
13580
|
+
);
|
|
13581
|
+
return recursiveTraversal.supported ? extractPathFromWorkingTable(context, targetId, maxIterations) : extractPathByPredecessorWalk(context, targetId, maxIterations);
|
|
13522
13582
|
}
|
|
13523
13583
|
});
|
|
13524
13584
|
}
|
|
@@ -13640,23 +13700,13 @@ async function relaxFrontierRound(context, targetId, iteration, roundBound) {
|
|
|
13640
13700
|
return { frontierCount, bestTargetDistance };
|
|
13641
13701
|
}
|
|
13642
13702
|
async function extractPathFromWorkingTable(context, targetId, maxIterations) {
|
|
13643
|
-
const {
|
|
13644
|
-
const { dialect } = operation.ctx;
|
|
13703
|
+
const { workingTable, graphId, runId } = context;
|
|
13645
13704
|
const rows = await context.backend.execute(
|
|
13646
13705
|
asCompiledRowsSql(sql`
|
|
13647
13706
|
WITH RECURSIVE chain AS (
|
|
13648
13707
|
SELECT best.node_id, best.node_kind, best.distance, best.hops,
|
|
13649
13708
|
best.predecessor_id, best.predecessor_kind, 0 AS position
|
|
13650
|
-
FROM (
|
|
13651
|
-
SELECT node_id, node_kind, distance, hops,
|
|
13652
|
-
predecessor_id, predecessor_kind
|
|
13653
|
-
FROM ${workingTable}
|
|
13654
|
-
WHERE graph_id = ${graphId}
|
|
13655
|
-
AND run_id = ${runId}
|
|
13656
|
-
AND node_id = ${targetId}
|
|
13657
|
-
ORDER BY distance ASC, ${dialect.binaryText(sql`node_kind`)}
|
|
13658
|
-
LIMIT 1
|
|
13659
|
-
) best
|
|
13709
|
+
FROM (${selectCheapestTargetRowSql(context, targetId)}) best
|
|
13660
13710
|
UNION ALL
|
|
13661
13711
|
SELECT w.node_id, w.node_kind, w.distance, w.hops,
|
|
13662
13712
|
w.predecessor_id, w.predecessor_kind, c.position + 1
|
|
@@ -13681,6 +13731,65 @@ async function extractPathFromWorkingTable(context, targetId, maxIterations) {
|
|
|
13681
13731
|
totalWeight: Number(target.distance)
|
|
13682
13732
|
};
|
|
13683
13733
|
}
|
|
13734
|
+
function selectCheapestTargetRowSql(context, targetId) {
|
|
13735
|
+
const { operation, workingTable, graphId, runId } = context;
|
|
13736
|
+
const { dialect } = operation.ctx;
|
|
13737
|
+
return sql`
|
|
13738
|
+
SELECT node_id, node_kind, distance, hops,
|
|
13739
|
+
predecessor_id, predecessor_kind
|
|
13740
|
+
FROM ${workingTable}
|
|
13741
|
+
WHERE graph_id = ${graphId}
|
|
13742
|
+
AND run_id = ${runId}
|
|
13743
|
+
AND node_id = ${targetId}
|
|
13744
|
+
ORDER BY distance ASC, ${dialect.binaryText(sql`node_kind`)}
|
|
13745
|
+
LIMIT 1
|
|
13746
|
+
`;
|
|
13747
|
+
}
|
|
13748
|
+
async function collectPredecessorChain(first, readPredecessor, maxIterations) {
|
|
13749
|
+
const chain = [first];
|
|
13750
|
+
let current = first;
|
|
13751
|
+
for (let position = 0; position <= maxIterations; position++) {
|
|
13752
|
+
const predecessor = nodeIdentityFromRow(
|
|
13753
|
+
current.predecessor_id,
|
|
13754
|
+
current.predecessor_kind
|
|
13755
|
+
);
|
|
13756
|
+
if (predecessor === void 0) break;
|
|
13757
|
+
const predecessorRow = await readPredecessor(predecessor);
|
|
13758
|
+
if (predecessorRow === void 0) break;
|
|
13759
|
+
chain.push(predecessorRow);
|
|
13760
|
+
current = predecessorRow;
|
|
13761
|
+
}
|
|
13762
|
+
return chain;
|
|
13763
|
+
}
|
|
13764
|
+
async function extractPathByPredecessorWalk(context, targetId, maxIterations) {
|
|
13765
|
+
const rows = await context.backend.execute(
|
|
13766
|
+
asCompiledRowsSql(selectCheapestTargetRowSql(context, targetId))
|
|
13767
|
+
);
|
|
13768
|
+
const first = rows[0];
|
|
13769
|
+
if (first === void 0) return void 0;
|
|
13770
|
+
const { workingTable, graphId, runId } = context;
|
|
13771
|
+
const chain = await collectPredecessorChain(
|
|
13772
|
+
first,
|
|
13773
|
+
async (predecessor) => {
|
|
13774
|
+
const predecessorRows = await context.backend.execute(
|
|
13775
|
+
asCompiledRowsSql(sql`
|
|
13776
|
+
SELECT node_id, node_kind, distance, hops,
|
|
13777
|
+
predecessor_id, predecessor_kind
|
|
13778
|
+
FROM ${workingTable}
|
|
13779
|
+
WHERE graph_id = ${graphId} AND run_id = ${runId}
|
|
13780
|
+
AND node_kind = ${predecessor.kind} AND node_id = ${predecessor.id}
|
|
13781
|
+
`)
|
|
13782
|
+
);
|
|
13783
|
+
return predecessorRows[0];
|
|
13784
|
+
},
|
|
13785
|
+
maxIterations
|
|
13786
|
+
);
|
|
13787
|
+
return {
|
|
13788
|
+
nodes: chain.map((row) => ({ id: row.node_id, kind: row.node_kind })).toReversed(),
|
|
13789
|
+
depth: Number(first.hops),
|
|
13790
|
+
totalWeight: Number(first.distance)
|
|
13791
|
+
};
|
|
13792
|
+
}
|
|
13684
13793
|
async function findWeightedSelfPath(ctx, nodeId, options) {
|
|
13685
13794
|
return withInlineIterativeGraphOperation(ctx, options, async (operation) => {
|
|
13686
13795
|
await assertValidEdgeWeights(
|
|
@@ -14243,6 +14352,7 @@ function createEdgeCollection(config) {
|
|
|
14243
14352
|
graphId,
|
|
14244
14353
|
kind,
|
|
14245
14354
|
backend,
|
|
14355
|
+
batchPointRead,
|
|
14246
14356
|
defaultTemporalMode,
|
|
14247
14357
|
rowToEdge: rowToEdge2,
|
|
14248
14358
|
executeCreate: executeEdgeCreate2,
|
|
@@ -14348,7 +14458,12 @@ function createEdgeCollection(config) {
|
|
|
14348
14458
|
},
|
|
14349
14459
|
async getByIds(ids, options) {
|
|
14350
14460
|
if (ids.length === 0) return [];
|
|
14351
|
-
const rowsById = await getEdgeRowsByIds(
|
|
14461
|
+
const rowsById = await getEdgeRowsByIds(
|
|
14462
|
+
backend,
|
|
14463
|
+
batchPointRead,
|
|
14464
|
+
graphId,
|
|
14465
|
+
ids
|
|
14466
|
+
);
|
|
14352
14467
|
const matches = temporalRowMatcher(options);
|
|
14353
14468
|
return ids.map((id) => {
|
|
14354
14469
|
const row = rowsById.get(id);
|
|
@@ -14466,7 +14581,12 @@ function createEdgeCollection(config) {
|
|
|
14466
14581
|
}
|
|
14467
14582
|
const upsertAll = async (target) => {
|
|
14468
14583
|
const ids = items.map((item) => item.id);
|
|
14469
|
-
const existingMap = await getEdgeRowsByIds(
|
|
14584
|
+
const existingMap = await getEdgeRowsByIds(
|
|
14585
|
+
target,
|
|
14586
|
+
batchPointRead,
|
|
14587
|
+
graphId,
|
|
14588
|
+
ids
|
|
14589
|
+
);
|
|
14470
14590
|
const results2 = Array.from({ length: items.length });
|
|
14471
14591
|
const toCreate = [];
|
|
14472
14592
|
const toUpdate = [];
|
|
@@ -14785,6 +14905,7 @@ function createNodeCollection(config) {
|
|
|
14785
14905
|
graphId,
|
|
14786
14906
|
kind,
|
|
14787
14907
|
backend,
|
|
14908
|
+
batchPointRead,
|
|
14788
14909
|
defaultTemporalMode,
|
|
14789
14910
|
rowToNode: rowToNode2,
|
|
14790
14911
|
executeCreate: executeNodeCreate2,
|
|
@@ -14823,7 +14944,13 @@ function createNodeCollection(config) {
|
|
|
14823
14944
|
},
|
|
14824
14945
|
async getByIds(ids, options) {
|
|
14825
14946
|
if (ids.length === 0) return [];
|
|
14826
|
-
const rowsById = await getNodeRowsByIds(
|
|
14947
|
+
const rowsById = await getNodeRowsByIds(
|
|
14948
|
+
backend,
|
|
14949
|
+
batchPointRead,
|
|
14950
|
+
graphId,
|
|
14951
|
+
kind,
|
|
14952
|
+
ids
|
|
14953
|
+
);
|
|
14827
14954
|
const matches = temporalRowMatcher(options);
|
|
14828
14955
|
return ids.map((id) => {
|
|
14829
14956
|
const row = rowsById.get(id);
|
|
@@ -15034,7 +15161,12 @@ function createNodeCollection(config) {
|
|
|
15034
15161
|
const upsertAll = async (target) => {
|
|
15035
15162
|
const ids = items.map((item) => item.id);
|
|
15036
15163
|
const existingMap = /* @__PURE__ */ new Map();
|
|
15037
|
-
|
|
15164
|
+
const boundGetNodes = bindExtraIfReachable(
|
|
15165
|
+
target,
|
|
15166
|
+
batchPointRead.extras.getNodes,
|
|
15167
|
+
BATCH_POINT_READ.id
|
|
15168
|
+
);
|
|
15169
|
+
if (boundGetNodes === void 0) {
|
|
15038
15170
|
const rows = await Promise.all(
|
|
15039
15171
|
ids.map((id) => target.getNode(graphId, kind, id))
|
|
15040
15172
|
);
|
|
@@ -15042,7 +15174,7 @@ function createNodeCollection(config) {
|
|
|
15042
15174
|
if (row !== void 0) existingMap.set(row.id, row);
|
|
15043
15175
|
}
|
|
15044
15176
|
} else {
|
|
15045
|
-
const rows = await
|
|
15177
|
+
const rows = await boundGetNodes.getNodes(graphId, kind, ids);
|
|
15046
15178
|
for (const row of rows) {
|
|
15047
15179
|
existingMap.set(row.id, row);
|
|
15048
15180
|
}
|
|
@@ -15231,7 +15363,7 @@ function createNodeCollection(config) {
|
|
|
15231
15363
|
}
|
|
15232
15364
|
|
|
15233
15365
|
// src/store/collection-factory.ts
|
|
15234
|
-
function createNodeCollectionsProxy(graph, graphId, registry, backend, operations) {
|
|
15366
|
+
function createNodeCollectionsProxy(graph, graphId, registry, backend, batchPointRead, operations) {
|
|
15235
15367
|
const collectionCache = /* @__PURE__ */ new Map();
|
|
15236
15368
|
return new Proxy({}, {
|
|
15237
15369
|
get: (_, kind) => {
|
|
@@ -15246,6 +15378,7 @@ function createNodeCollectionsProxy(graph, graphId, registry, backend, operation
|
|
|
15246
15378
|
graphId,
|
|
15247
15379
|
kind,
|
|
15248
15380
|
backend,
|
|
15381
|
+
batchPointRead,
|
|
15249
15382
|
...operations
|
|
15250
15383
|
});
|
|
15251
15384
|
collectionCache.set(kind, collection);
|
|
@@ -15253,7 +15386,7 @@ function createNodeCollectionsProxy(graph, graphId, registry, backend, operation
|
|
|
15253
15386
|
}
|
|
15254
15387
|
});
|
|
15255
15388
|
}
|
|
15256
|
-
function createEdgeCollectionsProxy(graph, graphId, registry, backend, operations) {
|
|
15389
|
+
function createEdgeCollectionsProxy(graph, graphId, registry, backend, batchPointRead, operations) {
|
|
15257
15390
|
const collectionCache = /* @__PURE__ */ new Map();
|
|
15258
15391
|
return new Proxy({}, {
|
|
15259
15392
|
get: (_, kind) => {
|
|
@@ -15268,6 +15401,7 @@ function createEdgeCollectionsProxy(graph, graphId, registry, backend, operation
|
|
|
15268
15401
|
graphId,
|
|
15269
15402
|
kind,
|
|
15270
15403
|
backend,
|
|
15404
|
+
batchPointRead,
|
|
15271
15405
|
...operations
|
|
15272
15406
|
});
|
|
15273
15407
|
collectionCache.set(kind, collection);
|
|
@@ -16875,7 +17009,12 @@ async function executeEdgeCreate(ctx, input, backend) {
|
|
|
16875
17009
|
return edge;
|
|
16876
17010
|
}
|
|
16877
17011
|
async function primeEdgeBatchValidationCache(ctx, inputs, backend, seedEndpointRow) {
|
|
16878
|
-
|
|
17012
|
+
const bound = bindExtraIfReachable(
|
|
17013
|
+
backend,
|
|
17014
|
+
ctx.batchPointRead.extras.getNodes,
|
|
17015
|
+
BATCH_POINT_READ.id
|
|
17016
|
+
);
|
|
17017
|
+
if (bound === void 0) return;
|
|
16879
17018
|
const idsByKind = /* @__PURE__ */ new Map();
|
|
16880
17019
|
const addEndpoint = (kind, id) => {
|
|
16881
17020
|
const ids = idsByKind.get(kind) ?? /* @__PURE__ */ new Set();
|
|
@@ -16888,7 +17027,7 @@ async function primeEdgeBatchValidationCache(ctx, inputs, backend, seedEndpointR
|
|
|
16888
17027
|
}
|
|
16889
17028
|
for (const [kind, ids] of idsByKind) {
|
|
16890
17029
|
const orderedIds = [...ids];
|
|
16891
|
-
const rows = await
|
|
17030
|
+
const rows = await bound.getNodes(ctx.graphId, kind, orderedIds);
|
|
16892
17031
|
const rowsById = new Map(rows.map((row) => [row.id, row]));
|
|
16893
17032
|
for (const id of orderedIds) {
|
|
16894
17033
|
seedEndpointRow(ctx.graphId, kind, id, rowsById.get(id));
|
|
@@ -18535,6 +18674,32 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18535
18674
|
*/
|
|
18536
18675
|
#baseBackend;
|
|
18537
18676
|
#backend;
|
|
18677
|
+
/**
|
|
18678
|
+
* The `claims` bundle's memoized, at-most-once verdict thunk (ruling B7
|
|
18679
|
+
* refinement 2), minted from `#backend` — the same object every claimed
|
|
18680
|
+
* write actually executes through — once, here, and threaded into every
|
|
18681
|
+
* node/edge operation context this Store builds. Never resolved eagerly:
|
|
18682
|
+
* only the thunk's own first call may reach the bidirectional cross-check's
|
|
18683
|
+
* throw.
|
|
18684
|
+
*/
|
|
18685
|
+
#claimsVerdict;
|
|
18686
|
+
/**
|
|
18687
|
+
* Resolved EAGERLY, once, immediately after `#claimsVerdict` — unlike
|
|
18688
|
+
* `claims`, no pilot bundle below has a `crossCheck`, so `resolveBundle`
|
|
18689
|
+
* cannot throw on construction and the thunk's lazy-resolution rationale
|
|
18690
|
+
* does not apply (ruling B8 spec item 2). `batchPointRead` and
|
|
18691
|
+
* `uniqueSidecarBatch` resolve against `#backend`, the object every graph
|
|
18692
|
+
* write and read actually executes through.
|
|
18693
|
+
*/
|
|
18694
|
+
#batchPointRead;
|
|
18695
|
+
#uniqueSidecarBatch;
|
|
18696
|
+
/**
|
|
18697
|
+
* The contribution-health methods and `ensureRevisionOrigin` read
|
|
18698
|
+
* `#baseBackend`, not `#backend` (recorded capture never wraps them), so
|
|
18699
|
+
* their verdicts are resolved against `#baseBackend` too.
|
|
18700
|
+
*/
|
|
18701
|
+
#contributionHealth;
|
|
18702
|
+
#recordedRevisionOrigins;
|
|
18538
18703
|
#adapterBackend;
|
|
18539
18704
|
#captureEnabled;
|
|
18540
18705
|
#revisionTrackingEnabled;
|
|
@@ -18557,24 +18722,35 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18557
18722
|
#search;
|
|
18558
18723
|
constructor(graph, backend, options, schemaMetadata, adapterBackend) {
|
|
18559
18724
|
this.#graph = graph;
|
|
18560
|
-
|
|
18725
|
+
const statementExecution = statementExecutionVerdict(backend);
|
|
18726
|
+
if (graph.identity !== void 0 && (!backend.capabilities.transactions || !statementExecution.supported)) {
|
|
18561
18727
|
throw new ConfigurationError(
|
|
18562
18728
|
"Operational Identity requires an atomic transactional backend with statement execution support.",
|
|
18563
18729
|
{
|
|
18564
18730
|
code: "IDENTITY_REQUIRES_ATOMIC_BACKEND",
|
|
18565
18731
|
transactions: backend.capabilities.transactions,
|
|
18566
|
-
statementExecution:
|
|
18732
|
+
statementExecution: statementExecution.supported
|
|
18567
18733
|
},
|
|
18568
18734
|
{
|
|
18569
18735
|
suggestion: "Use a transactional SQLite or PostgreSQL driver; Cloudflare D1 and neon-http cannot host identity closure maintenance."
|
|
18570
18736
|
}
|
|
18571
18737
|
);
|
|
18572
18738
|
}
|
|
18739
|
+
if (graph.identity !== void 0 && resolveWriteFencePlan(backend).kind === "unfenced") {
|
|
18740
|
+
refuseUnfencedOperationalIdentity(backend.dialect);
|
|
18741
|
+
}
|
|
18573
18742
|
this.#baseBackend = asRawBackend(backend);
|
|
18574
18743
|
this.#adapterBackend = adapterBackend;
|
|
18575
18744
|
this.#captureEnabled = options?.history === true;
|
|
18576
18745
|
this.#revisionTrackingEnabled = this.#captureEnabled || options?.revisionTracking === true;
|
|
18577
18746
|
if (this.#revisionTrackingEnabled) {
|
|
18747
|
+
const ownership = resolveRecordedTimeOwnership(backend.capabilities);
|
|
18748
|
+
if (ownership === "engine-native") {
|
|
18749
|
+
refuseEngineNativeRecordedTimeNotYetImplemented();
|
|
18750
|
+
}
|
|
18751
|
+
if (resolveWriteFencePlan(backend).kind === "unfenced") {
|
|
18752
|
+
refuseUnfencedClockAllocation(backend.dialect);
|
|
18753
|
+
}
|
|
18578
18754
|
assertRevisionTrackableBackend(backend);
|
|
18579
18755
|
}
|
|
18580
18756
|
const explicitSchema = options?.schema === void 0 ? void 0 : requireSqlSchema(options.schema, "store schema");
|
|
@@ -18594,6 +18770,13 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18594
18770
|
);
|
|
18595
18771
|
this.#recordedReadBinding = this.#captureEnabled ? createRecordedReadBinding(readSchema) : externalRecordedRead;
|
|
18596
18772
|
this.#backend = this.#captureEnabled ? asGraphWriteBackend(createRecordedBackend(backend, resolvedSchema)) : asGraphWriteBackend(backend);
|
|
18773
|
+
this.#claimsVerdict = createClaimsVerdictThunk(this.#backend);
|
|
18774
|
+
this.#batchPointRead = batchPointReadVerdict(this.#backend);
|
|
18775
|
+
this.#uniqueSidecarBatch = uniqueSidecarBatchVerdict(this.#backend);
|
|
18776
|
+
this.#contributionHealth = contributionHealthVerdict(this.#baseBackend);
|
|
18777
|
+
this.#recordedRevisionOrigins = recordedRevisionOriginsVerdict(
|
|
18778
|
+
this.#baseBackend
|
|
18779
|
+
);
|
|
18597
18780
|
this.#schema = resolvedSchema;
|
|
18598
18781
|
const rowMapperConfig = rowMapperConfigFor(this.#backend);
|
|
18599
18782
|
this.#recordedReads = createRecordedReadService({
|
|
@@ -18610,6 +18793,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18610
18793
|
this.#schemaMetadata = schemaMetadata ?? UNKNOWN_SCHEMA_METADATA;
|
|
18611
18794
|
this[STORE_RUNTIME] = {
|
|
18612
18795
|
backend: this.#backend,
|
|
18796
|
+
uniqueSidecarBatch: this.#uniqueSidecarBatch,
|
|
18613
18797
|
// The query path's own construction, not a second spelling of it: a
|
|
18614
18798
|
// caller that could only rebuild this object could not observe the one
|
|
18615
18799
|
// the queries actually run on.
|
|
@@ -18662,7 +18846,13 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18662
18846
|
}
|
|
18663
18847
|
const lock = await lockRecordedGraphWrite(target, this.graphId);
|
|
18664
18848
|
return applyResolvedNodeClaims(
|
|
18665
|
-
{
|
|
18849
|
+
{
|
|
18850
|
+
graphId: this.graphId,
|
|
18851
|
+
registry: this.#registry,
|
|
18852
|
+
lock,
|
|
18853
|
+
claimsVerdict: this.#claimsVerdict,
|
|
18854
|
+
uniqueSidecarBatch: this.#uniqueSidecarBatch
|
|
18855
|
+
},
|
|
18666
18856
|
target,
|
|
18667
18857
|
upserts,
|
|
18668
18858
|
releases,
|
|
@@ -18835,6 +19025,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18835
19025
|
}
|
|
18836
19026
|
const scope = createRecordedTransactionScope(
|
|
18837
19027
|
target,
|
|
19028
|
+
this.#batchPointRead,
|
|
18838
19029
|
this.#sqlSchema(),
|
|
18839
19030
|
target.dialect === "sqlite"
|
|
18840
19031
|
);
|
|
@@ -19038,6 +19229,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
19038
19229
|
this.graphId,
|
|
19039
19230
|
this.#registry,
|
|
19040
19231
|
this.#backend,
|
|
19232
|
+
this.#batchPointRead,
|
|
19041
19233
|
this.#nodeOperations
|
|
19042
19234
|
);
|
|
19043
19235
|
}
|
|
@@ -19066,6 +19258,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
19066
19258
|
this.graphId,
|
|
19067
19259
|
this.#registry,
|
|
19068
19260
|
this.#backend,
|
|
19261
|
+
this.#batchPointRead,
|
|
19069
19262
|
this.#edgeOperations
|
|
19070
19263
|
);
|
|
19071
19264
|
}
|
|
@@ -19615,7 +19808,12 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
19615
19808
|
{ code: "REVISION_ORIGIN_REQUIRES_TRACKING" }
|
|
19616
19809
|
);
|
|
19617
19810
|
}
|
|
19618
|
-
const pendingOrigin = this.#revisionOrigin ?? ensureRevisionOrigin(
|
|
19811
|
+
const pendingOrigin = this.#revisionOrigin ?? ensureRevisionOrigin(
|
|
19812
|
+
this.#baseBackend,
|
|
19813
|
+
this.#recordedRevisionOrigins,
|
|
19814
|
+
this.#sqlSchema(),
|
|
19815
|
+
this.graphId
|
|
19816
|
+
);
|
|
19619
19817
|
this.#revisionOrigin = pendingOrigin;
|
|
19620
19818
|
try {
|
|
19621
19819
|
return await pendingOrigin;
|
|
@@ -19697,7 +19895,8 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
19697
19895
|
graphId: this.graphId,
|
|
19698
19896
|
backend: this.#backend,
|
|
19699
19897
|
registry: this.#registry,
|
|
19700
|
-
createQuery: () => this.query()
|
|
19898
|
+
createQuery: () => this.query(),
|
|
19899
|
+
batchPointRead: this.#batchPointRead
|
|
19701
19900
|
});
|
|
19702
19901
|
}
|
|
19703
19902
|
return this.#search;
|
|
@@ -20187,7 +20386,11 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
20187
20386
|
txBackend
|
|
20188
20387
|
);
|
|
20189
20388
|
}
|
|
20190
|
-
const scope = this.#captureEnabled ? createRecordedTransactionScope(
|
|
20389
|
+
const scope = this.#captureEnabled ? createRecordedTransactionScope(
|
|
20390
|
+
txBackend,
|
|
20391
|
+
this.#batchPointRead,
|
|
20392
|
+
this.#sqlSchema()
|
|
20393
|
+
) : {
|
|
20191
20394
|
backend: txBackend,
|
|
20192
20395
|
flush: () => Promise.resolve(EMPTY_RECORDED_FLUSH_INSTANTS)
|
|
20193
20396
|
};
|
|
@@ -20281,6 +20484,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
20281
20484
|
this.graphId,
|
|
20282
20485
|
this.#registry,
|
|
20283
20486
|
txBackend,
|
|
20487
|
+
this.#batchPointRead,
|
|
20284
20488
|
txNodeOperations
|
|
20285
20489
|
);
|
|
20286
20490
|
let edges = createEdgeCollectionsProxy(
|
|
@@ -20288,6 +20492,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
20288
20492
|
this.graphId,
|
|
20289
20493
|
this.#registry,
|
|
20290
20494
|
txBackend,
|
|
20495
|
+
this.#batchPointRead,
|
|
20291
20496
|
txEdgeOperations
|
|
20292
20497
|
);
|
|
20293
20498
|
if (receiptRecorder !== void 0) {
|
|
@@ -20377,9 +20582,14 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
20377
20582
|
}
|
|
20378
20583
|
return;
|
|
20379
20584
|
}
|
|
20380
|
-
const
|
|
20585
|
+
const boundGetNodes = bindExtraIfReachable(
|
|
20586
|
+
backend,
|
|
20587
|
+
this.#batchPointRead.extras.getNodes,
|
|
20588
|
+
BATCH_POINT_READ.id
|
|
20589
|
+
);
|
|
20590
|
+
const rows = boundGetNodes === void 0 ? await Promise.all(
|
|
20381
20591
|
ids.map((id) => backend.getNode(this.graphId, kind, id))
|
|
20382
|
-
) : await
|
|
20592
|
+
) : await boundGetNodes.getNodes(this.graphId, kind, ids);
|
|
20383
20593
|
const includeTombstoned = coordinate?.valid.mode === "includeTombstones";
|
|
20384
20594
|
for (const row of rows) {
|
|
20385
20595
|
if (row === void 0) continue;
|
|
@@ -20931,17 +21141,26 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
20931
21141
|
*/
|
|
20932
21142
|
async verifyContributions() {
|
|
20933
21143
|
const backend = this.#baseBackend;
|
|
20934
|
-
|
|
20935
|
-
|
|
20936
|
-
|
|
20937
|
-
|
|
20938
|
-
|
|
20939
|
-
|
|
20940
|
-
|
|
20941
|
-
|
|
20942
|
-
|
|
20943
|
-
|
|
20944
|
-
|
|
21144
|
+
requireExtras(
|
|
21145
|
+
CONTRIBUTION_HEALTH,
|
|
21146
|
+
this.#contributionHealth,
|
|
21147
|
+
"contribution verify",
|
|
21148
|
+
() => {
|
|
21149
|
+
throw new ConfigurationError(
|
|
21150
|
+
"verifyContributions requires a backend that can probe its catalog for contribution tables.",
|
|
21151
|
+
{
|
|
21152
|
+
backend: backend.dialect,
|
|
21153
|
+
capability: "contributions",
|
|
21154
|
+
operation: "verify"
|
|
21155
|
+
}
|
|
21156
|
+
);
|
|
21157
|
+
}
|
|
21158
|
+
);
|
|
21159
|
+
const { verifyContributions: verify } = bindExtra(
|
|
21160
|
+
backend,
|
|
21161
|
+
this.#contributionHealth.extras.verifyContributions,
|
|
21162
|
+
CONTRIBUTION_HEALTH.id
|
|
21163
|
+
);
|
|
20945
21164
|
const vectorSlots = backend.capabilities.vector?.supported === true ? resolveGraphVectorSlots(this.#graph) : [];
|
|
20946
21165
|
return verify(this.graphId, vectorSlots);
|
|
20947
21166
|
}
|
|
@@ -20998,17 +21217,26 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
20998
21217
|
*/
|
|
20999
21218
|
async repairContributions() {
|
|
21000
21219
|
const backend = this.#baseBackend;
|
|
21001
|
-
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
|
|
21220
|
+
requireExtras(
|
|
21221
|
+
CONTRIBUTION_HEALTH,
|
|
21222
|
+
this.#contributionHealth,
|
|
21223
|
+
"contribution repair",
|
|
21224
|
+
() => {
|
|
21225
|
+
throw new ConfigurationError(
|
|
21226
|
+
"repairContributions requires a backend that can probe and repair strategy-owned contribution tables.",
|
|
21227
|
+
{
|
|
21228
|
+
backend: backend.dialect,
|
|
21229
|
+
capability: "contributions",
|
|
21230
|
+
operation: "repair"
|
|
21231
|
+
}
|
|
21232
|
+
);
|
|
21233
|
+
}
|
|
21234
|
+
);
|
|
21235
|
+
const { repairContributions: repair } = bindExtra(
|
|
21236
|
+
backend,
|
|
21237
|
+
this.#contributionHealth.extras.repairContributions,
|
|
21238
|
+
CONTRIBUTION_HEALTH.id
|
|
21239
|
+
);
|
|
21012
21240
|
const { baseline } = await this.#loadCaughtUp("repair");
|
|
21013
21241
|
const vectorSlots = backend.capabilities.vector?.supported === true ? resolveGraphVectorSlots(baseline) : [];
|
|
21014
21242
|
return repair(this.graphId, vectorSlots);
|
|
@@ -21048,8 +21276,8 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
21048
21276
|
*/
|
|
21049
21277
|
async probeContributions() {
|
|
21050
21278
|
const backend = this.#baseBackend;
|
|
21051
|
-
const
|
|
21052
|
-
if (
|
|
21279
|
+
const probeVerdict = this.#contributionHealth.extras.probeContributions;
|
|
21280
|
+
if (!probeVerdict.present) {
|
|
21053
21281
|
if (backend.capabilities.contributions?.supported !== true) {
|
|
21054
21282
|
return { entries: [] };
|
|
21055
21283
|
}
|
|
@@ -21062,6 +21290,11 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
21062
21290
|
}
|
|
21063
21291
|
);
|
|
21064
21292
|
}
|
|
21293
|
+
const { probeContributions: probe } = bindExtra(
|
|
21294
|
+
backend,
|
|
21295
|
+
probeVerdict,
|
|
21296
|
+
CONTRIBUTION_HEALTH.id
|
|
21297
|
+
);
|
|
21065
21298
|
const vectorSlots = backend.capabilities.vector?.supported === true ? resolveGraphVectorSlots(this.#graph) : [];
|
|
21066
21299
|
const entries = await probe(this.graphId, vectorSlots);
|
|
21067
21300
|
const revision = await this.revisionNow();
|
|
@@ -21143,17 +21376,26 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
21143
21376
|
*/
|
|
21144
21377
|
async rebuildContribution(scope, options) {
|
|
21145
21378
|
const backend = this.#baseBackend;
|
|
21146
|
-
|
|
21147
|
-
|
|
21148
|
-
|
|
21149
|
-
|
|
21150
|
-
|
|
21151
|
-
|
|
21152
|
-
|
|
21153
|
-
|
|
21154
|
-
|
|
21155
|
-
|
|
21156
|
-
|
|
21379
|
+
requireExtras(
|
|
21380
|
+
CONTRIBUTION_HEALTH,
|
|
21381
|
+
this.#contributionHealth,
|
|
21382
|
+
"contribution rebuild",
|
|
21383
|
+
() => {
|
|
21384
|
+
throw new ConfigurationError(
|
|
21385
|
+
"rebuildContribution requires a backend that can drop, recreate, and re-stamp strategy-owned contribution tables.",
|
|
21386
|
+
{
|
|
21387
|
+
backend: backend.dialect,
|
|
21388
|
+
capability: "contributions",
|
|
21389
|
+
operation: "rebuild"
|
|
21390
|
+
}
|
|
21391
|
+
);
|
|
21392
|
+
}
|
|
21393
|
+
);
|
|
21394
|
+
const { rebuildContribution: rebuild } = bindExtra(
|
|
21395
|
+
backend,
|
|
21396
|
+
this.#contributionHealth.extras.rebuildContribution,
|
|
21397
|
+
CONTRIBUTION_HEALTH.id
|
|
21398
|
+
);
|
|
21157
21399
|
await this.#loadCaughtUp("rebuild");
|
|
21158
21400
|
const registry = this.#registry;
|
|
21159
21401
|
const graphId = this.graphId;
|
|
@@ -21474,6 +21716,9 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
21474
21716
|
coalesceUnchangedUpsertsEnabled: this.#coalescesUnchangedUpserts(),
|
|
21475
21717
|
revisionSchema: this.#sqlSchema(),
|
|
21476
21718
|
registry: this.#registry,
|
|
21719
|
+
claimsVerdict: this.#claimsVerdict,
|
|
21720
|
+
batchPointRead: this.#batchPointRead,
|
|
21721
|
+
uniqueSidecarBatch: this.#uniqueSidecarBatch,
|
|
21477
21722
|
...identityConfig === void 0 ? {} : {
|
|
21478
21723
|
identity: {
|
|
21479
21724
|
lock: (target) => lockIdentityGraph(target, this.graphId),
|
|
@@ -21529,6 +21774,9 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
21529
21774
|
coalesceUnchangedUpsertsEnabled: this.#coalescesUnchangedUpserts(),
|
|
21530
21775
|
revisionSchema: this.#sqlSchema(),
|
|
21531
21776
|
registry: this.#registry,
|
|
21777
|
+
claimsVerdict: this.#claimsVerdict,
|
|
21778
|
+
batchPointRead: this.#batchPointRead,
|
|
21779
|
+
uniqueSidecarBatch: this.#uniqueSidecarBatch,
|
|
21532
21780
|
createOperationContext: (operation, entity, kind, id) => this.#createOperationContext(operation, entity, kind, id),
|
|
21533
21781
|
withOperationHooks: runHooks
|
|
21534
21782
|
};
|
|
@@ -22146,5 +22394,5 @@ async function createVerifiedAdapterStore(graph, backend, options) {
|
|
|
22146
22394
|
}
|
|
22147
22395
|
|
|
22148
22396
|
export { ExecutableAggregateQuery, ExecutableQuery, MAX_EXPLICIT_RECURSIVE_DEPTH, MAX_RECURSIVE_DEPTH, PreparedQuery, QueryBuilder, RecordedStoreView, StoreSearch, StoreView, UnionableQuery, avg, composeFragments, count, countDistinct, countDistinctEdges, countEdges, createAdapterStore, createAdapterStoreWithSchema, createFragment, createQueryBuilder, createStore, createStoreWithSchema, createVerifiedAdapterStore, createVerifiedStore, defineSubgraphProject, field, having, havingEq, havingGt, havingGte, havingLt, havingLte, limitFragment, max, min, offsetFragment, orderByFragment, sum };
|
|
22149
|
-
//# sourceMappingURL=chunk-
|
|
22150
|
-
//# sourceMappingURL=chunk-
|
|
22397
|
+
//# sourceMappingURL=chunk-K6OZIHKI.js.map
|
|
22398
|
+
//# sourceMappingURL=chunk-K6OZIHKI.js.map
|