@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
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { CLAIMS, UNIQUE_SIDECAR_BATCH, BATCH_POINT_READ, STATEMENT_EXECUTION, CONTRIBUTION_HEALTH, RECORDED_REVISION_ORIGINS } from './chunk-LKZDQ2B4.js';
|
|
2
|
+
import { ConfigurationError } from './chunk-YDEJQWOL.js';
|
|
3
|
+
import { requireDefined, createDataKeyedBag } from './chunk-DYATYRY4.js';
|
|
4
|
+
|
|
5
|
+
// src/backend/capabilities/resolve.ts
|
|
6
|
+
function resolveExtras(backend, extras) {
|
|
7
|
+
const verdicts = createDataKeyedBag();
|
|
8
|
+
const missingExtras = [];
|
|
9
|
+
for (const extra of extras) {
|
|
10
|
+
const missing = extra.members.filter(
|
|
11
|
+
(member) => backend[member] === void 0
|
|
12
|
+
);
|
|
13
|
+
if (missing.length === 0) {
|
|
14
|
+
verdicts[extra.id] = { present: true, members: extra.members };
|
|
15
|
+
} else {
|
|
16
|
+
verdicts[extra.id] = {
|
|
17
|
+
present: false,
|
|
18
|
+
missing,
|
|
19
|
+
disposition: extra.disposition
|
|
20
|
+
};
|
|
21
|
+
missingExtras.push(extra.id);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
extras: verdicts,
|
|
26
|
+
missingExtras
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function assertClaimsBidirectionalAgreement(backend, definition) {
|
|
30
|
+
if (definition.declaration === void 0) return;
|
|
31
|
+
const declared = backend.capabilities[definition.declaration] === true;
|
|
32
|
+
const present = definition.core.filter(
|
|
33
|
+
(member) => backend[member] !== void 0
|
|
34
|
+
);
|
|
35
|
+
if (declared && present.length === definition.core.length) return;
|
|
36
|
+
if (!declared && present.length === 0) return;
|
|
37
|
+
const missing = definition.core.filter(
|
|
38
|
+
(member) => backend[member] === void 0
|
|
39
|
+
);
|
|
40
|
+
const declarationName = definition.declaration;
|
|
41
|
+
throw new ConfigurationError(
|
|
42
|
+
declared ? `This backend declares \`${declarationName}: true\` but does not implement ${missing.join(", ")}. A declared constraint would then be written without the fence the declaration promises.` : `This backend implements ${present.join(", ")} but does not declare \`${declarationName}: true\`. Claim support is read from the declaration, so these members would never be called.`,
|
|
43
|
+
{ code: definition.portSurfaceCode, missing, present },
|
|
44
|
+
{
|
|
45
|
+
suggestion: declared ? `Implement the missing members, or drop \`${declarationName}\` from the backend's capabilities.` : `Declare \`${declarationName}: true\` in the backend's capabilities, or drop the claim members.`
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
function resolveBundle(backend, definition) {
|
|
50
|
+
const extras = definition.extras ?? [];
|
|
51
|
+
const { extras: extraVerdicts, missingExtras } = resolveExtras(
|
|
52
|
+
backend,
|
|
53
|
+
extras
|
|
54
|
+
);
|
|
55
|
+
if (definition.crossCheck === "bidirectional") {
|
|
56
|
+
const memberSet = definition.kind === "gated" ? definition.core : extras.flatMap((extra) => extra.members);
|
|
57
|
+
assertClaimsBidirectionalAgreement(backend, {
|
|
58
|
+
...definition.declaration === void 0 ? {} : { declaration: definition.declaration },
|
|
59
|
+
core: memberSet,
|
|
60
|
+
portSurfaceCode: definition.portSurfaceCode
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if (definition.kind === "graduated") {
|
|
64
|
+
return {
|
|
65
|
+
bundle: definition.id,
|
|
66
|
+
extras: extraVerdicts,
|
|
67
|
+
missingExtras
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
const missing = definition.core.filter(
|
|
71
|
+
(member) => backend[member] === void 0
|
|
72
|
+
);
|
|
73
|
+
if (missing.length > 0) {
|
|
74
|
+
return {
|
|
75
|
+
supported: false,
|
|
76
|
+
bundle: definition.id,
|
|
77
|
+
missing,
|
|
78
|
+
disposition: definition.disposition
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
supported: true,
|
|
83
|
+
bundle: definition.id,
|
|
84
|
+
members: definition.core,
|
|
85
|
+
extras: extraVerdicts,
|
|
86
|
+
missingExtras
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function missingRequiredExtras(definition, verdict, operation) {
|
|
90
|
+
const row = definition.operations.find(
|
|
91
|
+
(candidate) => candidate.operation === operation
|
|
92
|
+
);
|
|
93
|
+
if (row === void 0) {
|
|
94
|
+
throw new ConfigurationError(
|
|
95
|
+
`Unknown operation "${operation}" for capability bundle "${definition.id}".`,
|
|
96
|
+
{ bundle: definition.id, operation }
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
const required = row.requires ?? [];
|
|
100
|
+
const extras = "extras" in verdict ? verdict.extras : void 0;
|
|
101
|
+
return required.filter(
|
|
102
|
+
(id) => extras === void 0 || extras[id]?.present !== true
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
function requireExtras(definition, verdict, operation, refuse) {
|
|
106
|
+
const missing = missingRequiredExtras(definition, verdict, operation);
|
|
107
|
+
if (missing.length === 0) return;
|
|
108
|
+
if (refuse !== void 0) refuse(missing);
|
|
109
|
+
const { disposition } = requireDefined(
|
|
110
|
+
definition.operations.find(
|
|
111
|
+
(candidate) => candidate.operation === operation
|
|
112
|
+
)
|
|
113
|
+
);
|
|
114
|
+
if (disposition.kind === "refuse") {
|
|
115
|
+
throw new ConfigurationError(
|
|
116
|
+
`Operation "${operation}" on capability bundle "${definition.id}" requires ${missing.join(", ")}.`,
|
|
117
|
+
{ code: disposition.code, bundle: definition.id, operation, missing }
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
throw new ConfigurationError(
|
|
121
|
+
`Operation "${operation}" on capability bundle "${definition.id}" requires ${missing.join(", ")}, and the registry names no refusal code for this fallback-dispositioned row.`,
|
|
122
|
+
{ bundle: definition.id, operation, missing }
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
function claimsVerdict(backend) {
|
|
126
|
+
return resolveBundle(backend, CLAIMS);
|
|
127
|
+
}
|
|
128
|
+
function uniqueSidecarBatchVerdict(backend) {
|
|
129
|
+
return resolveBundle(backend, UNIQUE_SIDECAR_BATCH);
|
|
130
|
+
}
|
|
131
|
+
function batchPointReadVerdict(backend) {
|
|
132
|
+
return resolveBundle(backend, BATCH_POINT_READ);
|
|
133
|
+
}
|
|
134
|
+
function statementExecutionVerdict(backend) {
|
|
135
|
+
return resolveBundle(backend, STATEMENT_EXECUTION);
|
|
136
|
+
}
|
|
137
|
+
function contributionHealthVerdict(backend) {
|
|
138
|
+
return resolveBundle(backend, CONTRIBUTION_HEALTH);
|
|
139
|
+
}
|
|
140
|
+
function recordedRevisionOriginsVerdict(backend) {
|
|
141
|
+
return resolveBundle(backend, RECORDED_REVISION_ORIGINS);
|
|
142
|
+
}
|
|
143
|
+
var CLAIMS_VERDICT_THUNKS = /* @__PURE__ */ new WeakMap();
|
|
144
|
+
function createClaimsVerdictThunk(backend) {
|
|
145
|
+
const existing = CLAIMS_VERDICT_THUNKS.get(backend);
|
|
146
|
+
if (existing !== void 0) return existing;
|
|
147
|
+
let memo;
|
|
148
|
+
const thunk = () => {
|
|
149
|
+
if (memo === void 0) {
|
|
150
|
+
try {
|
|
151
|
+
memo = { state: "resolved", verdict: resolveBundle(backend, CLAIMS) };
|
|
152
|
+
} catch (error) {
|
|
153
|
+
memo = { state: "thrown", error };
|
|
154
|
+
throw error;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (memo.state === "thrown") throw memo.error;
|
|
158
|
+
return memo.verdict;
|
|
159
|
+
};
|
|
160
|
+
CLAIMS_VERDICT_THUNKS.set(backend, thunk);
|
|
161
|
+
return thunk;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// src/backend/capabilities/recursive-traversal.ts
|
|
165
|
+
function resolveRecursiveTraversal(capabilities) {
|
|
166
|
+
const declared = capabilities.recursiveTraversal;
|
|
167
|
+
if (declared === void 0) {
|
|
168
|
+
return { supported: true };
|
|
169
|
+
}
|
|
170
|
+
if (declared.supported) {
|
|
171
|
+
return { supported: true };
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
supported: false,
|
|
175
|
+
reason: declared.reason ?? "backend declares recursiveTraversal: { supported: false }"
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
function assumeRecursiveTraversalSupported(reason) {
|
|
179
|
+
return { supported: true };
|
|
180
|
+
}
|
|
181
|
+
function recursiveTraversalUnsupportedError(verdict, operation) {
|
|
182
|
+
return new ConfigurationError(
|
|
183
|
+
`${operation} requires recursive traversal, but this backend declares recursiveTraversal: { supported: false }.`,
|
|
184
|
+
{
|
|
185
|
+
code: "RECURSIVE_TRAVERSAL_UNSUPPORTED",
|
|
186
|
+
capability: "recursiveTraversal",
|
|
187
|
+
operation,
|
|
188
|
+
reason: verdict.reason
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
suggestion: "Use a backend that supports recursive traversal, or avoid this query shape."
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
function assertRecursiveTraversal(verdict, operation) {
|
|
196
|
+
if (verdict.supported) return;
|
|
197
|
+
throw recursiveTraversalUnsupportedError(verdict, operation);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export { assertRecursiveTraversal, assumeRecursiveTraversalSupported, batchPointReadVerdict, claimsVerdict, contributionHealthVerdict, createClaimsVerdictThunk, missingRequiredExtras, recordedRevisionOriginsVerdict, recursiveTraversalUnsupportedError, requireExtras, resolveBundle, resolveRecursiveTraversal, statementExecutionVerdict, uniqueSidecarBatchVerdict };
|
|
201
|
+
//# sourceMappingURL=chunk-XORONCV3.js.map
|
|
202
|
+
//# sourceMappingURL=chunk-XORONCV3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/backend/capabilities/resolve.ts","../src/backend/capabilities/recursive-traversal.ts"],"names":[],"mappings":";;;;;AA6IA,SAAS,aAAA,CAMP,SACA,MAAA,EAIC;AACD,EAAA,MAAM,WACJ,kBAAA,EAA6D;AAC/D,EAAA,MAAM,gBAA0B,EAAC;AACjC,EAAA,KAAA,MAAW,SAAS,MAAA,EAAQ;AAC1B,IAAA,MAAM,OAAA,GAAU,MAAM,OAAA,CAAQ,MAAA;AAAA,MAC5B,CAAC,MAAA,KAAW,OAAA,CAAQ,MAAM,CAAA,KAAM;AAAA,KAClC;AACA,IAAA,IAAI,OAAA,CAAQ,WAAW,CAAA,EAAG;AACxB,MAAA,QAAA,CAAS,KAAA,CAAM,EAAE,CAAA,GAAI,EAAE,SAAS,IAAA,EAAM,OAAA,EAAS,MAAM,OAAA,EAAQ;AAAA,IAC/D,CAAA,MAAO;AAC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A,EAAK;AAC3B;AAGO,SAAS,kCAAA,CACd,SACA,SAAA,EACoB;AACpB,EAAA,OAAO,IAAI,kBAAA;AAAA,IACT,GAAG,SAAS,CAAA,kGAAA,CAAA;AAAA,IACZ;AAAA,MACE,IAAA,EAAM,iCAAA;AAAA,MACN,UAAA,EAAY,oBAAA;AAAA,MACZ,SAAA;AAAA,MACA,QAAQ,OAAA,CAAQ;AAAA,KAClB;AAAA,IACA;AAAA,MACE,UAAA,EACE;AAAA;AACJ,GACF;AACF;AAGO,SAAS,wBAAA,CACd,SACA,SAAA,EAC4E;AAC5E,EAAA,IAAI,QAAQ,SAAA,EAAW;AACvB,EAAA,MAAM,kCAAA,CAAmC,SAAS,SAAS,CAAA;AAC7D","file":"chunk-XORONCV3.js","sourcesContent":["/**\n * The bundle verdict resolver — generalizing `claimSupport`\n * (`store/claims/backing.ts`).\n *\n * Resolution splits in two (ruling B1): the VERDICT — the support decision,\n * resolved once against `GraphBackend` and threaded — and the BINDING\n * (`bind.ts`) — the actual member functions, bound at the call site off\n * whichever port the site holds. A verdict carries names, never functions\n * (I19), so it crosses transaction boundaries safely.\n */\nimport { ConfigurationError } from \"../../errors\";\nimport { createDataKeyedBag } from \"../../utils/object\";\nimport { requireDefined } from \"../../utils/presence\";\nimport { type BackendCapabilities, type GraphBackend } from \"../types\";\nimport {\n BATCH_POINT_READ,\n type CapabilityBundleDefinition,\n type CapabilityBundleDisposition,\n type CapabilityBundleExtra,\n CLAIMS,\n CONTRIBUTION_HEALTH,\n type OptionalGraphBackendMember,\n RECORDED_REVISION_ORIGINS,\n STATEMENT_EXECUTION,\n UNIQUE_SIDECAR_BATCH,\n} from \"./bundle-registry\";\n\n/**\n * A bundle's extras, as a type-level map from extra id to the UNION of\n * member names that extra covers — derived from the definition's `extras`\n * array by `const` inference, never hand-written.\n */\nexport type CapabilityExtraSpec = Readonly<\n Record<string, OptionalGraphBackendMember>\n>;\n\n/**\n * One extra's verdict. `present: true` carries the member NAMES, not the\n * member functions (ruling B1) — the names are what the accessor binds\n * from, at the site, off the port.\n */\nexport type ExtraVerdict<M extends OptionalGraphBackendMember> =\n | Readonly<{ present: true; members: readonly M[] }>\n | Readonly<{\n present: false;\n missing: readonly M[];\n disposition: CapabilityBundleDisposition;\n }>;\n\n/** The verdict map: one entry per extra id, never a boolean. */\nexport type ExtraVerdicts<X extends CapabilityExtraSpec> = Readonly<{\n [K in keyof X]: ExtraVerdict<X[K]>;\n}>;\n\nexport type GatedBundleVerdict<\n MCore extends OptionalGraphBackendMember,\n X extends CapabilityExtraSpec,\n> =\n | Readonly<{\n supported: true;\n bundle: string;\n /** The core, guaranteed present. Names, not functions. */\n members: readonly MCore[];\n extras: ExtraVerdicts<X>;\n /** The `present: false` keys of `extras`. */\n missingExtras: readonly (keyof X)[];\n }>\n | Readonly<{\n supported: false;\n bundle: string;\n missing: readonly MCore[];\n /** Why it is unsupported: the bundle's own `disposition`, verbatim. */\n disposition: CapabilityBundleDisposition;\n }>;\n\n/** No `supported` field: a graduated bundle has no bundle-level verdict. */\nexport type GraduatedBundleVerdict<X extends CapabilityExtraSpec> = Readonly<{\n bundle: string;\n extras: ExtraVerdicts<X>;\n missingExtras: readonly (keyof X)[];\n}>;\n\n/**\n * Recovers the id→members map from a definition's `extras` TUPLE (not\n * `readonly CapabilityBundleExtra<XId, MExtra>[]` — over the array type the\n * id→members association is erased and `ExtraVerdicts<X>` degenerates to an\n * index signature).\n */\nexport type SpecOf<\n XS extends readonly CapabilityBundleExtra<\n string,\n OptionalGraphBackendMember\n >[],\n> = { [K in XS[number] as K[\"id\"]]: K[\"members\"][number] };\n\nexport type ExtrasOf<D extends CapabilityBundleDefinition> = SpecOf<\n NonNullable<D[\"extras\"]>\n>;\nexport type ExtraMember<\n D extends CapabilityBundleDefinition,\n X extends keyof ExtrasOf<D>,\n> = Extract<ExtrasOf<D>[X], OptionalGraphBackendMember>;\n\n/**\n * The definition union and the return-type mapping. Structural, matching\n * `bundle-registry.ts`'s `BundleMembers` helper's own lesson: reading `core`\n * off `D` directly (rather than re-matching `GatedBundleDefinition`) avoids\n * an unmatched `infer` silently widening to the member constraint.\n */\nexport type BundleVerdictOf<D extends CapabilityBundleDefinition> =\n D extends (\n {\n kind: \"graduated\";\n extras: infer XS extends readonly CapabilityBundleExtra<\n string,\n OptionalGraphBackendMember\n >[];\n }\n ) ?\n GraduatedBundleVerdict<SpecOf<XS>>\n : D extends (\n {\n kind: \"gated\";\n core: readonly (infer MCore extends OptionalGraphBackendMember)[];\n extras?: infer XS extends\n | readonly CapabilityBundleExtra<string, OptionalGraphBackendMember>[]\n | undefined;\n }\n ) ?\n GatedBundleVerdict<\n MCore,\n SpecOf<\n XS extends (\n readonly CapabilityBundleExtra<string, OptionalGraphBackendMember>[]\n ) ?\n XS\n : []\n >\n >\n : never;\n\nfunction resolveExtras<\n const XS extends readonly CapabilityBundleExtra<\n string,\n OptionalGraphBackendMember\n >[],\n>(\n backend: GraphBackend,\n extras: XS,\n): Readonly<{\n extras: ExtraVerdicts<SpecOf<XS>>;\n missingExtras: readonly (keyof SpecOf<XS>)[];\n}> {\n const verdicts =\n createDataKeyedBag<ExtraVerdict<OptionalGraphBackendMember>>();\n const missingExtras: string[] = [];\n for (const extra of extras) {\n const missing = extra.members.filter(\n (member) => backend[member] === undefined,\n );\n if (missing.length === 0) {\n verdicts[extra.id] = { present: true, members: extra.members };\n } else {\n verdicts[extra.id] = {\n present: false,\n missing,\n disposition: extra.disposition,\n };\n missingExtras.push(extra.id);\n }\n }\n return {\n extras: verdicts as ExtraVerdicts<SpecOf<XS>>,\n missingExtras: missingExtras,\n };\n}\n\n/**\n * The `claims` bidirectional cross-check (ruling F2), reproducing\n * `store/claims/backing.ts`'s pre-B7 message text, code and suggestion\n * BYTE-FOR-BYTE. B7 made `claimSupport` (`backing.ts`) delegate to\n * {@link resolveBundle}, so this is now the ONLY place the check runs — there\n * is no second copy left to keep in sync. `bidirectional` is `claims`-only by\n * design (§5.2.1): the two trailing sentences below name \"claim\"/\"fence\"\n * vocabulary that is specific to that one bundle, and a future bundle raising\n * `crossCheck` to `\"bidirectional\"` must carry its own justification row and,\n * with it, its own message pair here.\n *\n * @throws {ConfigurationError} when the declaration and the member surface\n * disagree in either direction.\n */\nfunction assertClaimsBidirectionalAgreement(\n backend: GraphBackend,\n definition: Readonly<{\n declaration?: keyof BackendCapabilities;\n core: readonly OptionalGraphBackendMember[];\n portSurfaceCode: string;\n }>,\n): void {\n if (definition.declaration === undefined) return;\n const declared = backend.capabilities[definition.declaration] === true;\n const present = definition.core.filter(\n (member) => backend[member] !== undefined,\n );\n if (declared && present.length === definition.core.length) return;\n if (!declared && present.length === 0) return;\n\n const missing = definition.core.filter(\n (member) => backend[member] === undefined,\n );\n const declarationName = definition.declaration;\n throw new ConfigurationError(\n declared ?\n `This backend declares \\`${declarationName}: true\\` but does not implement ${missing.join(\", \")}. ` +\n \"A declared constraint would then be written without the fence the declaration promises.\"\n : `This backend implements ${present.join(\", \")} but does not declare \\`${declarationName}: true\\`. ` +\n \"Claim support is read from the declaration, so these members would never be called.\",\n { code: definition.portSurfaceCode, missing, present },\n {\n suggestion:\n declared ?\n `Implement the missing members, or drop \\`${declarationName}\\` from the backend's capabilities.`\n : `Declare \\`${declarationName}: true\\` in the backend's capabilities, or drop the claim members.`,\n },\n );\n}\n\n/**\n * Resolved ONCE, at construction or entry, against the top-level backend —\n * never against a `TransactionBackend` (I15's `@ts-expect-error` row).\n *\n * Rules: the member surface is read always; the declaration is read only\n * when the definition names one AND `crossCheck !== \"none\"` (only `claims`\n * qualifies in the pilot registry); a gated bundle's core must be complete\n * or the bundle is unsupported with `missing`; a graduated bundle has no\n * bundle-level verdict, only per-extra verdicts. `missingExtras` is built by\n * the SAME fold that builds `extras` (one pass, one owner).\n */\nexport function resolveBundle<const D extends CapabilityBundleDefinition>(\n backend: GraphBackend,\n definition: D,\n): BundleVerdictOf<D> {\n const extras = (definition.extras ?? []) as readonly CapabilityBundleExtra<\n string,\n OptionalGraphBackendMember\n >[];\n const { extras: extraVerdicts, missingExtras } = resolveExtras(\n backend,\n extras,\n );\n\n // Rule 1: the declaration is read whenever `crossCheck !== \"none\"`,\n // regardless of kind — a graduated bundle's \"core\" for this purpose is the\n // union of every extra's members, since it has no core of its own. Only\n // `claims` (gated) exercises this in the pilot registry, but the check\n // itself must not silently no-op for a hypothetical graduated bidirectional\n // bundle (T11's mutation pins exactly this).\n if (definition.crossCheck === \"bidirectional\") {\n const memberSet =\n definition.kind === \"gated\" ?\n definition.core\n : extras.flatMap((extra) => extra.members);\n assertClaimsBidirectionalAgreement(backend, {\n ...(definition.declaration === undefined ?\n {}\n : { declaration: definition.declaration }),\n core: memberSet,\n portSurfaceCode: definition.portSurfaceCode,\n });\n }\n\n if (definition.kind === \"graduated\") {\n return {\n bundle: definition.id,\n extras: extraVerdicts,\n missingExtras,\n } as unknown as BundleVerdictOf<D>;\n }\n\n const missing = definition.core.filter(\n (member) => backend[member] === undefined,\n );\n if (missing.length > 0) {\n return {\n supported: false,\n bundle: definition.id,\n missing,\n disposition: definition.disposition,\n } as unknown as BundleVerdictOf<D>;\n }\n return {\n supported: true,\n bundle: definition.id,\n members: definition.core,\n extras: extraVerdicts,\n missingExtras,\n } as unknown as BundleVerdictOf<D>;\n}\n\n/** The literal operation names a bundle's `operations` table declares. */\nexport type OperationNames<D extends CapabilityBundleDefinition> =\n D[\"operations\"][number][\"operation\"];\n\n/** The extras a named operation `requires`, read from the ROW — never re-spelled at the call site. */\nexport type RequiredExtrasOf<\n D extends CapabilityBundleDefinition,\n Op extends OperationNames<D>,\n> =\n Extract<D[\"operations\"][number], { operation: Op }> extends (\n { requires: infer R extends readonly string[] }\n ) ?\n R[number]\n : never;\n\n/**\n * The registry's row lookup plus the presence fold, extracted verbatim from\n * {@link requireExtras}'s body (ruling B8 spec item 3): the ONE owner of\n * \"what this operation requires\" that both `requireExtras`'s default throw\n * and a call site's own `refuse` callback consult.\n *\n * `operation` is the literal key of the bundle's `operations` tuple, so the\n * required extras are looked up TYPE-LEVEL from the registry — no second\n * spelling of `requires` at the call site.\n *\n * @throws {ConfigurationError} naming the unknown operation when `operation`\n * is not a row of `definition.operations`.\n */\nexport function missingRequiredExtras<\n const D extends CapabilityBundleDefinition,\n Op extends OperationNames<D>,\n>(\n definition: D,\n verdict: BundleVerdictOf<D>,\n operation: Op,\n): readonly string[] {\n const row = definition.operations.find(\n (candidate) => candidate.operation === operation,\n );\n if (row === undefined) {\n throw new ConfigurationError(\n `Unknown operation \"${operation}\" for capability bundle \"${definition.id}\".`,\n { bundle: definition.id, operation },\n );\n }\n const required = row.requires ?? [];\n const extras:\n | Readonly<Record<string, ExtraVerdict<OptionalGraphBackendMember>>>\n | undefined = \"extras\" in verdict ? verdict.extras : undefined;\n return required.filter(\n (id) => extras === undefined || extras[id]?.present !== true,\n );\n}\n\n/**\n * The refusal for an operation whose `requires` extras are absent — how a\n * GRADUATED bundle refuses where the tree refuses today: the row names the\n * operation and the extras, this asserts they are present, and\n * {@link bindExtra} (`bind.ts`) binds them off the port.\n *\n * `refuse`, when supplied, is called instead of the registry-coded throw\n * below — this is how a call site keeps its OWN existing error text (message,\n * `details` shape, order relative to other refusals) while the registry\n * stays the one owner of \"what this operation requires\" (ruling B8 spec item\n * 3). Omitting it keeps the default behavior byte-identical to before this\n * parameter existed.\n *\n * @throws {ConfigurationError} naming the row's own `code` when one or more\n * required extras is absent from the verdict and no `refuse` callback is\n * supplied; otherwise calls `refuse(missing)`, which never returns.\n */\nexport function requireExtras<\n const D extends CapabilityBundleDefinition,\n Op extends OperationNames<D>,\n>(\n definition: D,\n verdict: BundleVerdictOf<D>,\n operation: Op,\n refuse?: (missing: readonly string[]) => never,\n): asserts verdict is BundleVerdictOf<D> & {\n extras: {\n [K in RequiredExtrasOf<D, Op> & keyof ExtrasOf<D>]: Extract<\n ExtraVerdict<ExtraMember<D, K>>,\n { present: true }\n >;\n };\n} {\n const missing = missingRequiredExtras(definition, verdict, operation);\n if (missing.length === 0) return;\n\n if (refuse !== undefined) refuse(missing);\n\n // `missingRequiredExtras` already threw the unknown-operation error above\n // when the row would be undefined, so `requireDefined` here is a redundant\n // (never-failing) narrowing, not a second lookup that could disagree.\n const { disposition } = requireDefined(\n definition.operations.find(\n (candidate) => candidate.operation === operation,\n ),\n );\n if (disposition.kind === \"refuse\") {\n throw new ConfigurationError(\n `Operation \"${operation}\" on capability bundle \"${definition.id}\" requires ${missing.join(\", \")}.`,\n { code: disposition.code, bundle: definition.id, operation, missing },\n );\n }\n // No pilot row reaches this: every row with a non-empty `requires` in the\n // registry disposes `refuse` (a graduated bundle's fallback rows never\n // name `requires` — the fallback IS the degrade path). Kept as a named,\n // typed refusal rather than a silent pass so a future `fallback` +\n // `requires` row cannot pass `requireExtras` unnoticed.\n throw new ConfigurationError(\n `Operation \"${operation}\" on capability bundle \"${definition.id}\" requires ${missing.join(\", \")}, and the registry names no refusal code for this fallback-dispositioned row.`,\n { bundle: definition.id, operation, missing },\n );\n}\n\n// ---------------------------------------------------------------------------\n// The six named verdict accessors — GraphBackend-only, no exceptions (I15).\n// ---------------------------------------------------------------------------\n\nexport function claimsVerdict(\n backend: GraphBackend,\n): BundleVerdictOf<typeof CLAIMS> {\n return resolveBundle(backend, CLAIMS);\n}\n\nexport function uniqueSidecarBatchVerdict(\n backend: GraphBackend,\n): BundleVerdictOf<typeof UNIQUE_SIDECAR_BATCH> {\n return resolveBundle(backend, UNIQUE_SIDECAR_BATCH);\n}\n\nexport function batchPointReadVerdict(\n backend: GraphBackend,\n): BundleVerdictOf<typeof BATCH_POINT_READ> {\n return resolveBundle(backend, BATCH_POINT_READ);\n}\n\nexport function statementExecutionVerdict(\n backend: GraphBackend,\n): BundleVerdictOf<typeof STATEMENT_EXECUTION> {\n return resolveBundle(backend, STATEMENT_EXECUTION);\n}\n\nexport function contributionHealthVerdict(\n backend: GraphBackend,\n): BundleVerdictOf<typeof CONTRIBUTION_HEALTH> {\n return resolveBundle(backend, CONTRIBUTION_HEALTH);\n}\n\nexport function recordedRevisionOriginsVerdict(\n backend: GraphBackend,\n): BundleVerdictOf<typeof RECORDED_REVISION_ORIGINS> {\n return resolveBundle(backend, RECORDED_REVISION_ORIGINS);\n}\n\n// ---------------------------------------------------------------------------\n// The claims verdict THUNK — the reference implementation of §5.2.3's INTENT\n// (one owner, at-most-once resolution, no re-derivation) moved to WHEN it\n// resolves rather than IF (ruling B7 refinement 2).\n// ---------------------------------------------------------------------------\n\n/**\n * A memoized, at-most-once resolution of the `claims` bundle's verdict\n * against ONE backend.\n *\n * Eager resolution at store construction is forbidden: T14's\n * contradictory-declaration backends must still be able to construct a store\n * and create nodes — only a constrained edge write may legally reach the\n * bidirectional cross-check's throw, and it must do so lazily, at the first\n * write that needs the verdict.\n *\n * A cached verdict cannot go stale because `GraphBackend` is deep-frozen (B1):\n * nothing can flip `capabilities.constraintClaims` or add/remove a claim\n * member on a backend object after this thunk has already resolved it, so\n * \"resolve once and reuse forever\" is exactly as safe as \"resolve every\n * time\" — for one backend object, they observe the same immutable answer.\n */\nexport type ClaimsVerdictThunk = () => BundleVerdictOf<typeof CLAIMS>;\n\n/**\n * Interning: the same backend object always gets back the SAME thunk object.\n * This is what makes \"one shared thunk per backend\" structural rather than a\n * convention every population site has to honor — a second call to\n * {@link createClaimsVerdictThunk} for a backend already minted cannot produce\n * a second, independently-memoized verdict.\n */\nconst CLAIMS_VERDICT_THUNKS = new WeakMap<GraphBackend, ClaimsVerdictThunk>();\n\n/**\n * Mints — or returns the already-minted — {@link ClaimsVerdictThunk} for\n * `backend`.\n *\n * The thunk resolves {@link resolveBundle}`(backend, CLAIMS)` on its first\n * call and caches the outcome, INCLUDING a thrown `ConfigurationError`: a\n * refusal is cached and re-thrown on every subsequent call, never\n * re-resolved. Both layers — interning here, memoization inside the thunk —\n * are required: interning alone would still let two independently-memoized\n * thunks exist for one backend if a caller ignored the shared one; memoizing\n * alone would still let two different call sites mint two different thunks\n * that could disagree about whether they had already resolved.\n */\nexport function createClaimsVerdictThunk(\n backend: GraphBackend,\n): ClaimsVerdictThunk {\n const existing = CLAIMS_VERDICT_THUNKS.get(backend);\n if (existing !== undefined) return existing;\n\n type Memo =\n | Readonly<{ state: \"resolved\"; verdict: BundleVerdictOf<typeof CLAIMS> }>\n | Readonly<{ state: \"thrown\"; error: unknown }>;\n let memo: Memo | undefined;\n\n const thunk: ClaimsVerdictThunk = () => {\n if (memo === undefined) {\n try {\n memo = { state: \"resolved\", verdict: resolveBundle(backend, CLAIMS) };\n } catch (error) {\n memo = { state: \"thrown\", error };\n throw error;\n }\n }\n if (memo.state === \"thrown\") throw memo.error;\n return memo.verdict;\n };\n\n CLAIMS_VERDICT_THUNKS.set(backend, thunk);\n return thunk;\n}\n","/**\n * The `recursiveTraversal` capability: whether this engine can compute a\n * BOUNDED TRANSITIVE CLOSURE of a relation in one round trip — the traversal\n * primitive, not the SQL syntax.\n */\nimport { ConfigurationError } from \"../../errors\";\nimport { type BackendCapabilities } from \"../types\";\n\n/**\n * Whether this engine can compute a BOUNDED TRANSITIVE CLOSURE of a relation\n * in one round trip — the traversal primitive, not the SQL syntax. A SQL\n * engine satisfies it with `WITH RECURSIVE`; a graph-native engine satisfies\n * it with a native expansion operator. What the capability promises is the\n * SEMANTICS: given a seed set, a step relation, and a hop bound, the engine\n * returns the reachable set (optionally with depth and path) without the\n * client issuing one statement per hop.\n *\n * Absent means SUPPORTED. Every engine TypeGraph ships supports it, and every\n * custom backend already has the six emission sites run against it\n * unconditionally: making absence mean `false` would refuse traversals that\n * work today. This mirrors `returning`, not `constraintClaims` — absence is\n * only allowed to mean \"false\" where absence is SAFE, and here it is not. A\n * backend that genuinely lacks the primitive must say so.\n */\nexport type RecursiveTraversalCapability = Readonly<{\n supported: boolean;\n /**\n * Why the engine lacks it — surfaced in every refusal's details so the\n * state is named rather than implied. Required when `supported: false` and\n * forbidden when `true`, so the union cannot carry a dangling reason.\n */\n reason?: string;\n}>;\n\n/**\n * The brand. Declared but never exported, and never assigned at runtime — it\n * exists only so that an object literal outside this module is not assignable\n * to {@link RecursiveTraversalVerdict}. Compare `VectorSlot`'s construction\n * discipline: the type is public, the constructor is the seam.\n */\ndeclare const RECURSIVE_TRAVERSAL_VERDICT: unique symbol;\n\n/**\n * The decision, branded so it can only originate from this module's\n * constructors. Round 1 made the verdict a required *field*, which forces a\n * token, not a verdict: any caller could satisfy it by writing\n * `{ supported: true }` inline, and nothing tied the value to the resolver.\n * The brand closes that at the type level.\n */\nexport type RecursiveTraversalVerdict = Readonly<\n { [RECURSIVE_TRAVERSAL_VERDICT]: true } & (\n { supported: true } | { supported: false; reason: string }\n )\n>;\n\n/** THE one reader of `capabilities.recursiveTraversal`, and THE one constructor. */\nexport function resolveRecursiveTraversal(\n capabilities: BackendCapabilities,\n): RecursiveTraversalVerdict {\n const declared = capabilities.recursiveTraversal;\n if (declared === undefined) {\n return { supported: true } as RecursiveTraversalVerdict;\n }\n if (declared.supported) {\n return { supported: true } as RecursiveTraversalVerdict;\n }\n // A raw custom-backend object may never have passed the §4 assert\n // (`assertBundledCapabilityDeclarations`), so `reason` is not guaranteed to\n // be present even though the type says it is. Naming the state explicitly\n // beats a default that would hide a contradictory declaration.\n return {\n supported: false,\n reason:\n declared.reason ??\n \"backend declares recursiveTraversal: { supported: false }\",\n } as RecursiveTraversalVerdict;\n}\n\n/**\n * The ONE sanctioned way to obtain a verdict without a backend: the query\n * compiler's public entry point `compileQuery(ast, graphId, \"postgres\")`\n * takes no backend at all, so it has no capabilities to resolve from. The\n * reason string is required and is echoed in nothing — it exists so the call\n * site states why it is allowed to assume.\n */\nexport function assumeRecursiveTraversalSupported(\n reason: string,\n): RecursiveTraversalVerdict {\n // `reason` is intentionally unused in the returned verdict: it documents\n // the assumption at the call site rather than becoming part of the value.\n void reason;\n return { supported: true } as RecursiveTraversalVerdict;\n}\n\n/** THE one refusal builder. */\nexport function recursiveTraversalUnsupportedError(\n verdict: Extract<RecursiveTraversalVerdict, { supported: false }>,\n operation: string,\n): ConfigurationError {\n return new ConfigurationError(\n `${operation} requires recursive traversal, but this backend declares recursiveTraversal: { supported: false }.`,\n {\n code: \"RECURSIVE_TRAVERSAL_UNSUPPORTED\",\n capability: \"recursiveTraversal\",\n operation,\n reason: verdict.reason,\n },\n {\n suggestion:\n \"Use a backend that supports recursive traversal, or avoid this query shape.\",\n },\n );\n}\n\n/** THE one assertion: refuses when the verdict says the engine cannot. */\nexport function assertRecursiveTraversal(\n verdict: RecursiveTraversalVerdict,\n operation: string,\n): asserts verdict is Extract<RecursiveTraversalVerdict, { supported: true }> {\n if (verdict.supported) return;\n throw recursiveTraversalUnsupportedError(verdict, operation);\n}\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { META_EDGE_BRAND, getTypeName, defineEdge, defineNode } from './chunk-
|
|
2
|
-
import { separationRebuildRequired, hasAssertionsTouchingKinds, lockIdentityGraph, lockIdentityEnablementNodes, purgeAssertionsWithUnregisteredKinds, deleteAssertionsTouchingKinds, rebuildIdentityClosureForContext } from './chunk-
|
|
3
|
-
import { lockRecordedGraphWrite, withRecordedIdentityMutationTarget } from './chunk-
|
|
4
|
-
import { canonicalEqual, sortedReplacer, isMissingTableError, errorChain, isPostgresConcurrentDdlRaceError } from './chunk-
|
|
5
|
-
import { createSqlSchema, requireSqlSchema } from './chunk-
|
|
6
|
-
import { getNodeKinds, getEdgeKinds, autoDeriveVectorIndexes, mergeVectorIndexes } from './chunk-
|
|
7
|
-
import { captureWherePredicate } from './chunk-
|
|
1
|
+
import { META_EDGE_BRAND, getTypeName, defineEdge, defineNode } from './chunk-LI4K2KEJ.js';
|
|
2
|
+
import { separationRebuildRequired, hasAssertionsTouchingKinds, lockIdentityGraph, lockIdentityEnablementNodes, purgeAssertionsWithUnregisteredKinds, deleteAssertionsTouchingKinds, rebuildIdentityClosureForContext } from './chunk-WFSYYU4W.js';
|
|
3
|
+
import { lockRecordedGraphWrite, withRecordedIdentityMutationTarget } from './chunk-VAAC7L57.js';
|
|
4
|
+
import { canonicalEqual, sortedReplacer, isMissingTableError, errorChain, isPostgresConcurrentDdlRaceError } from './chunk-QG5VEOKX.js';
|
|
5
|
+
import { createSqlSchema, requireSqlSchema, resolveWriteFencePlan, requireWriteFence } from './chunk-LKZDQ2B4.js';
|
|
6
|
+
import { getNodeKinds, getEdgeKinds, autoDeriveVectorIndexes, mergeVectorIndexes } from './chunk-M3VTS3F6.js';
|
|
7
|
+
import { captureWherePredicate } from './chunk-RVUL2HXY.js';
|
|
8
8
|
import { nowIso } from './chunk-K46SDNQD.js';
|
|
9
|
-
import { defineNodeIndex, defineEdgeIndex } from './chunk-
|
|
9
|
+
import { defineNodeIndex, defineEdgeIndex } from './chunk-LZMQ3SFK.js';
|
|
10
10
|
import { sha256Hex } from './chunk-K34OPSJK.js';
|
|
11
|
-
import { asCompiledRowsSql, sql } from './chunk-
|
|
11
|
+
import { asCompiledRowsSql, sql } from './chunk-7QFRK6PU.js';
|
|
12
12
|
import { resolveGraphVectorSlots, embedding, searchable } from './chunk-PC2UBAUB.js';
|
|
13
13
|
import { LEGACY_GRAPH_EXTENSION_VERSION, computeClosuresFromOntology, unwrap, validateGraphExtension, KindCollisionError, GraphExtensionUnresolvedEndpointError, isExternalIri, GraphExtensionUnresolvedOntologyEndpointError, RemoveCompileTimeKindError, KindHasReferentsError, KindRegistry, createEmptyClosures, validateOntologyRelations, computeClosuresFromNamedOntology } from './chunk-XZW2CTNO.js';
|
|
14
14
|
import { ALL_META_EDGE_NAMES, META_EDGE_IMPLIES, META_EDGE_INVERSE_OF, META_EDGE_PART_OF, META_EDGE_HAS_PART, META_EDGE_DISJOINT_WITH, META_EDGE_DIFFERENT_FROM, META_EDGE_SAME_AS, META_EDGE_EQUIVALENT_TO, META_EDGE_RELATED_TO, META_EDGE_BROADER, META_EDGE_NARROWER, META_EDGE_SUB_CLASS_OF } from './chunk-JXXDZTMN.js';
|
|
@@ -2109,12 +2109,21 @@ async function withIdentityDdlRaceRetry(attempt) {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
2111
|
async function lockIdentityDdl(target) {
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2112
|
+
const plan = resolveWriteFencePlan(target);
|
|
2113
|
+
const fence = requireWriteFence(plan, "identity DDL", "advisory-lock");
|
|
2114
|
+
switch (fence.kind) {
|
|
2115
|
+
case "lock": {
|
|
2116
|
+
await target.execute(
|
|
2117
|
+
asCompiledRowsSql(sql`
|
|
2118
|
+
SELECT pg_advisory_xact_lock(hashtext(${IDENTITY_DDL_LOCK_KEY}), 0)
|
|
2119
|
+
`)
|
|
2120
|
+
);
|
|
2121
|
+
return;
|
|
2122
|
+
}
|
|
2123
|
+
case "engine-serialized": {
|
|
2124
|
+
return;
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2118
2127
|
}
|
|
2119
2128
|
var IDENTITY_DDL_LOCK_KEY = "typegraph:identity-ddl";
|
|
2120
2129
|
function identityDerivedUpgradeUnsupportedError(graphId, missingPorts) {
|
|
@@ -3246,5 +3255,5 @@ async function getCommittedSchemaVersion(backend, graphId) {
|
|
|
3246
3255
|
}
|
|
3247
3256
|
|
|
3248
3257
|
export { applyDeprecatedKinds, assertSchemaCurrent, broader, buildGraphExtensionOntologyKeySet, buildKindRegistry, buildValidatedKindRegistry, classifySchemaChanges, commitNewSchemaVersion, commitNewSchemaVersionIfKindsEmpty, commitNewSchemaVersionWithPreflight, compileTimeOntologyKey, computeSchemaDiff, computeSchemaHash, core, deserializeWherePredicate, differentFrom, disjointWith, ensureIdentitySchemaStorage, ensureSchema, equivalentTo, extensionKindNames, getActiveSchema, getCommittedSchemaVersion, getMigrationActions, getSchemaChanges, hasPart, identityKindCascadeNeeded, identitySchemaCommitPreflight, implies, initializeSchema, inverseOf, isBackwardsCompatible, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, loadAndVerifyGraph, mergeGraphExtension, migrateSchema, narrower, parseSerializedSchema, partOf, planRemovals, relatedTo, requiresMigration, rollbackSchema, sameAs, serializeIndexDeclaration, serializeSchema, serializeSchemaProperties, stripGraphExtension, subClassOf };
|
|
3249
|
-
//# sourceMappingURL=chunk-
|
|
3250
|
-
//# sourceMappingURL=chunk-
|
|
3258
|
+
//# sourceMappingURL=chunk-YT2IVFAI.js.map
|
|
3259
|
+
//# sourceMappingURL=chunk-YT2IVFAI.js.map
|