@nicia-ai/typegraph 0.46.2 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -1
- package/dist/backend/drizzle/indexes.cjs +9 -9
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/drizzle/indexes.js +5 -5
- package/dist/backend/index.cjs +58 -49
- package/dist/backend/index.d.cts +37 -55
- package/dist/backend/index.d.ts +37 -55
- package/dist/backend/index.js +11 -10
- package/dist/backend/postgres/index.cjs +27 -26
- package/dist/backend/postgres/index.d.cts +21 -7
- package/dist/backend/postgres/index.d.ts +21 -7
- package/dist/backend/postgres/index.js +14 -13
- package/dist/backend/postgres/pglite-store.cjs +34 -33
- 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 +30 -29
- package/dist/backend/postgres/pglite-store.js.map +1 -1
- package/dist/backend/postgres/pglite.cjs +16 -15
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +15 -14
- package/dist/backend/sqlite/index.cjs +24 -23
- package/dist/backend/sqlite/index.d.cts +20 -7
- package/dist/backend/sqlite/index.d.ts +20 -7
- package/dist/backend/sqlite/index.js +12 -11
- package/dist/backend/sqlite/libsql.cjs +19 -18
- 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 +14 -13
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local-store.cjs +35 -34
- 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 +31 -30
- package/dist/backend/sqlite/local-store.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +17 -16
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +15 -14
- package/dist/{chunk-TCT66A7N.cjs → chunk-26YKDNUD.cjs} +10 -10
- package/dist/{chunk-TCT66A7N.cjs.map → chunk-26YKDNUD.cjs.map} +1 -1
- package/dist/{chunk-E4OSGBCM.cjs → chunk-2HIYYMWY.cjs} +139 -136
- package/dist/chunk-2HIYYMWY.cjs.map +1 -0
- package/dist/chunk-2QGYQBS2.cjs +161 -0
- package/dist/chunk-2QGYQBS2.cjs.map +1 -0
- package/dist/{chunk-GWXXHOLU.js → chunk-2SYZXD54.js} +21 -18
- package/dist/chunk-2SYZXD54.js.map +1 -0
- package/dist/{chunk-KA4L2NZ3.js → chunk-2TYSSBU5.js} +14 -14
- package/dist/{chunk-KA4L2NZ3.js.map → chunk-2TYSSBU5.js.map} +1 -1
- package/dist/{chunk-QOJ2L2AD.js → chunk-3DMMGT6S.js} +3 -3
- package/dist/{chunk-QOJ2L2AD.js.map → chunk-3DMMGT6S.js.map} +1 -1
- package/dist/{chunk-F36KZDFX.cjs → chunk-3FPR224C.cjs} +91 -91
- package/dist/{chunk-F36KZDFX.cjs.map → chunk-3FPR224C.cjs.map} +1 -1
- package/dist/{chunk-32UETY6S.cjs → chunk-3KOY4FH3.cjs} +207 -28
- package/dist/chunk-3KOY4FH3.cjs.map +1 -0
- package/dist/{chunk-QU7QLJA4.cjs → chunk-3U5ABFDW.cjs} +26 -26
- package/dist/{chunk-QU7QLJA4.cjs.map → chunk-3U5ABFDW.cjs.map} +1 -1
- package/dist/{chunk-RFDEYLIK.js → chunk-4WMMBDS5.js} +7 -7
- package/dist/chunk-4WMMBDS5.js.map +1 -0
- package/dist/{chunk-R7EWHKID.js → chunk-5K2BKEBD.js} +19 -145
- package/dist/chunk-5K2BKEBD.js.map +1 -0
- package/dist/chunk-5PRKMB24.cjs +124 -0
- package/dist/chunk-5PRKMB24.cjs.map +1 -0
- package/dist/chunk-6LN7FIVU.js +107 -0
- package/dist/chunk-6LN7FIVU.js.map +1 -0
- package/dist/{chunk-D6GCNNMK.cjs → chunk-6NGW27EO.cjs} +10 -10
- package/dist/{chunk-D6GCNNMK.cjs.map → chunk-6NGW27EO.cjs.map} +1 -1
- package/dist/{chunk-WHS2Y43J.js → chunk-6SWPJEYN.js} +5 -5
- package/dist/{chunk-WHS2Y43J.js.map → chunk-6SWPJEYN.js.map} +1 -1
- package/dist/{chunk-7TKNK32B.js → chunk-7SQSZN2J.js} +5 -5
- package/dist/{chunk-7TKNK32B.js.map → chunk-7SQSZN2J.js.map} +1 -1
- package/dist/{chunk-UTVQPZPN.cjs → chunk-7XUYFFR4.cjs} +20 -20
- package/dist/chunk-7XUYFFR4.cjs.map +1 -0
- package/dist/{chunk-KXSMF6PL.js → chunk-ACGSAMD3.js} +39 -34
- package/dist/chunk-ACGSAMD3.js.map +1 -0
- package/dist/{chunk-PYKF7UIL.cjs → chunk-AOSSQDVO.cjs} +13 -13
- package/dist/{chunk-PYKF7UIL.cjs.map → chunk-AOSSQDVO.cjs.map} +1 -1
- package/dist/{chunk-AT3MLMJV.js → chunk-AX6JGVTZ.js} +91 -20
- package/dist/chunk-AX6JGVTZ.js.map +1 -0
- package/dist/{chunk-WA64ZSCA.cjs → chunk-BFUOME67.cjs} +11 -11
- package/dist/{chunk-WA64ZSCA.cjs.map → chunk-BFUOME67.cjs.map} +1 -1
- package/dist/{chunk-YQ4JONWE.js → chunk-BRRP76WO.js} +401 -131
- package/dist/chunk-BRRP76WO.js.map +1 -0
- package/dist/{chunk-FCIZNUW5.js → chunk-CHAOFCHV.js} +3 -3
- package/dist/{chunk-FCIZNUW5.js.map → chunk-CHAOFCHV.js.map} +1 -1
- package/dist/chunk-CICO5GXD.cjs +12 -0
- package/dist/{chunk-73MWKDFK.cjs.map → chunk-CICO5GXD.cjs.map} +1 -1
- package/dist/{chunk-S3G5VLSW.js → chunk-CT3ZKTOF.js} +7 -6
- package/dist/chunk-CT3ZKTOF.js.map +1 -0
- package/dist/{chunk-SXWLLQ3D.js → chunk-D5R42W5D.js} +4 -4
- package/dist/{chunk-SXWLLQ3D.js.map → chunk-D5R42W5D.js.map} +1 -1
- package/dist/{chunk-BZZI7B43.cjs → chunk-DO7SAMEK.cjs} +47 -47
- package/dist/{chunk-BZZI7B43.cjs.map → chunk-DO7SAMEK.cjs.map} +1 -1
- package/dist/chunk-DZAICA5J.js +147 -0
- package/dist/chunk-DZAICA5J.js.map +1 -0
- package/dist/{chunk-2ZWM2RFH.cjs → chunk-EDN4Y4ZG.cjs} +9 -9
- package/dist/{chunk-2ZWM2RFH.cjs.map → chunk-EDN4Y4ZG.cjs.map} +1 -1
- package/dist/{chunk-A4R3H7RU.cjs → chunk-EZEEWCFJ.cjs} +264 -361
- package/dist/chunk-EZEEWCFJ.cjs.map +1 -0
- package/dist/{chunk-BEB4OFZF.cjs → chunk-FA2AFWLP.cjs} +51 -59
- package/dist/chunk-FA2AFWLP.cjs.map +1 -0
- package/dist/{chunk-ZBVZ7HXD.cjs → chunk-FQPEMEWX.cjs} +12 -12
- package/dist/{chunk-ZBVZ7HXD.cjs.map → chunk-FQPEMEWX.cjs.map} +1 -1
- package/dist/{chunk-LNIWCQR4.js → chunk-GLHXM7C4.js} +3 -3
- package/dist/{chunk-LNIWCQR4.js.map → chunk-GLHXM7C4.js.map} +1 -1
- package/dist/{chunk-6BD6ZBKT.cjs → chunk-GYEG3ZLZ.cjs} +10 -10
- package/dist/{chunk-6BD6ZBKT.cjs.map → chunk-GYEG3ZLZ.cjs.map} +1 -1
- package/dist/{chunk-A7NMUYEL.cjs → chunk-HDL2ARHX.cjs} +27 -27
- package/dist/{chunk-A7NMUYEL.cjs.map → chunk-HDL2ARHX.cjs.map} +1 -1
- package/dist/{chunk-5ZJOB5YS.js → chunk-HEV35TGT.js} +4 -4
- package/dist/{chunk-5ZJOB5YS.js.map → chunk-HEV35TGT.js.map} +1 -1
- package/dist/{chunk-LHYSY6SE.js → chunk-I4GAZH5Z.js} +186 -9
- package/dist/chunk-I4GAZH5Z.js.map +1 -0
- package/dist/{chunk-BQM5P2NO.cjs → chunk-JB6T4GLL.cjs} +260 -223
- package/dist/chunk-JB6T4GLL.cjs.map +1 -0
- package/dist/{chunk-QPOQX2DI.cjs → chunk-JFRT7S3B.cjs} +1026 -369
- package/dist/chunk-JFRT7S3B.cjs.map +1 -0
- package/dist/{chunk-JCNTKRAK.js → chunk-JONXFAPO.js} +5 -5
- package/dist/{chunk-JCNTKRAK.js.map → chunk-JONXFAPO.js.map} +1 -1
- package/dist/{chunk-WEJHA7AD.js → chunk-KF6K7TGH.js} +109 -75
- package/dist/chunk-KF6K7TGH.js.map +1 -0
- package/dist/{chunk-EDJDDY6H.js → chunk-KKBDXCLQ.js} +4 -4
- package/dist/{chunk-EDJDDY6H.js.map → chunk-KKBDXCLQ.js.map} +1 -1
- package/dist/{chunk-ZHOAZD7Q.cjs → chunk-L3LQNR34.cjs} +161 -161
- package/dist/{chunk-ZHOAZD7Q.cjs.map → chunk-L3LQNR34.cjs.map} +1 -1
- package/dist/{chunk-AF3TWL5C.cjs → chunk-LRQKXRXO.cjs} +4 -4
- package/dist/{chunk-AF3TWL5C.cjs.map → chunk-LRQKXRXO.cjs.map} +1 -1
- package/dist/chunk-MKJ4KXL5.cjs +12 -0
- package/dist/{chunk-6LAXM4J2.cjs.map → chunk-MKJ4KXL5.cjs.map} +1 -1
- package/dist/{chunk-KCH7WQA5.cjs → chunk-MRDBBHIZ.cjs} +48 -2
- package/dist/chunk-MRDBBHIZ.cjs.map +1 -0
- package/dist/{chunk-FXNHZFZV.js → chunk-MYKHJI2J.js} +3 -3
- package/dist/{chunk-FXNHZFZV.js.map → chunk-MYKHJI2J.js.map} +1 -1
- package/dist/{chunk-Z43KWLZF.js → chunk-NACVVDWB.js} +213 -12
- package/dist/chunk-NACVVDWB.js.map +1 -0
- package/dist/{chunk-72WUT4GG.js → chunk-NVY5CJFP.js} +4 -4
- package/dist/{chunk-72WUT4GG.js.map → chunk-NVY5CJFP.js.map} +1 -1
- package/dist/{chunk-WYFB7BN3.js → chunk-OD4SSY2U.js} +166 -48
- package/dist/chunk-OD4SSY2U.js.map +1 -0
- package/dist/{chunk-ZIH42CRX.cjs → chunk-OI2GQ25X.cjs} +7 -7
- package/dist/{chunk-ZIH42CRX.cjs.map → chunk-OI2GQ25X.cjs.map} +1 -1
- package/dist/{chunk-AU3IJNNP.js → chunk-OMZ37BM2.js} +5 -5
- package/dist/{chunk-AU3IJNNP.js.map → chunk-OMZ37BM2.js.map} +1 -1
- package/dist/{chunk-C4DYN2SD.cjs → chunk-OORXGFL5.cjs} +48 -48
- package/dist/{chunk-C4DYN2SD.cjs.map → chunk-OORXGFL5.cjs.map} +1 -1
- package/dist/{chunk-HNYLMPQQ.cjs → chunk-OTUPEF2W.cjs} +149 -78
- package/dist/chunk-OTUPEF2W.cjs.map +1 -0
- package/dist/{chunk-BRN3RGD2.js → chunk-OVI7IXYX.js} +3 -3
- package/dist/{chunk-BRN3RGD2.js.map → chunk-OVI7IXYX.js.map} +1 -1
- package/dist/{chunk-WMKEGJG4.js → chunk-P6YLZTRE.js} +3 -3
- package/dist/{chunk-WMKEGJG4.js.map → chunk-P6YLZTRE.js.map} +1 -1
- package/dist/{chunk-C2ZP5YS6.cjs → chunk-PFBRJBUL.cjs} +278 -160
- package/dist/chunk-PFBRJBUL.cjs.map +1 -0
- package/dist/{chunk-EJSYWAEV.js → chunk-QTD6HX4O.js} +5 -5
- package/dist/{chunk-EJSYWAEV.js.map → chunk-QTD6HX4O.js.map} +1 -1
- package/dist/{chunk-JL5UEBWT.cjs → chunk-ROR5ZR6A.cjs} +45 -45
- package/dist/{chunk-JL5UEBWT.cjs.map → chunk-ROR5ZR6A.cjs.map} +1 -1
- package/dist/{chunk-EDHV4CBU.js → chunk-S5TERQVW.js} +37 -134
- package/dist/chunk-S5TERQVW.js.map +1 -0
- package/dist/{chunk-FSLTU57P.js → chunk-SDBBMD4N.js} +3 -3
- package/dist/{chunk-FSLTU57P.js.map → chunk-SDBBMD4N.js.map} +1 -1
- package/dist/{chunk-36LIJXWC.js → chunk-SHFBB23Q.js} +4 -4
- package/dist/{chunk-36LIJXWC.js.map → chunk-SHFBB23Q.js.map} +1 -1
- package/dist/chunk-SIT26LAZ.cjs +614 -0
- package/dist/chunk-SIT26LAZ.cjs.map +1 -0
- package/dist/{chunk-C6KE2HSQ.cjs → chunk-SR725PWF.cjs} +1662 -1392
- package/dist/chunk-SR725PWF.cjs.map +1 -0
- package/dist/{chunk-S7WIRFNS.cjs → chunk-TKZXMWQF.cjs} +13 -12
- package/dist/chunk-TKZXMWQF.cjs.map +1 -0
- package/dist/{chunk-5PDSCELM.cjs → chunk-TQHGE7UC.cjs} +29 -164
- package/dist/chunk-TQHGE7UC.cjs.map +1 -0
- package/dist/{chunk-XBHRKLZU.cjs → chunk-TUNPBZY3.cjs} +4 -4
- package/dist/{chunk-XBHRKLZU.cjs.map → chunk-TUNPBZY3.cjs.map} +1 -1
- package/dist/{chunk-KOAI3KIV.cjs → chunk-TZEGUG6D.cjs} +4 -4
- package/dist/{chunk-KOAI3KIV.cjs.map → chunk-TZEGUG6D.cjs.map} +1 -1
- package/dist/chunk-UGHG7PGX.js +592 -0
- package/dist/chunk-UGHG7PGX.js.map +1 -0
- package/dist/{chunk-N3QTGPC7.cjs → chunk-UMGZDVOA.cjs} +303 -101
- package/dist/chunk-UMGZDVOA.cjs.map +1 -0
- package/dist/{chunk-RHDOAQCT.cjs → chunk-WCCATHMB.cjs} +140 -135
- package/dist/chunk-WCCATHMB.cjs.map +1 -0
- package/dist/{chunk-DYPRZ53S.cjs → chunk-WODMN3Q2.cjs} +27 -27
- package/dist/{chunk-DYPRZ53S.cjs.map → chunk-WODMN3Q2.cjs.map} +1 -1
- package/dist/{chunk-OZJCH7ZS.js → chunk-XVWOYKIK.js} +3 -3
- package/dist/{chunk-OZJCH7ZS.js.map → chunk-XVWOYKIK.js.map} +1 -1
- package/dist/{chunk-IHRDX7K6.js → chunk-YIURNGXI.js} +46 -56
- package/dist/chunk-YIURNGXI.js.map +1 -0
- package/dist/{chunk-GWUWRZXW.js → chunk-YVF2EM7B.js} +3 -3
- package/dist/{chunk-GWUWRZXW.js.map → chunk-YVF2EM7B.js.map} +1 -1
- package/dist/{chunk-EAMVXR5B.js → chunk-ZDKTPBGV.js} +4 -4
- package/dist/{chunk-EAMVXR5B.js.map → chunk-ZDKTPBGV.js.map} +1 -1
- package/dist/{chunk-A2LJG5GM.js → chunk-ZFMCDJGB.js} +803 -148
- package/dist/chunk-ZFMCDJGB.js.map +1 -0
- package/dist/{chunk-62ZXBMSD.js → chunk-ZLONH2UD.js} +46 -3
- package/dist/chunk-ZLONH2UD.js.map +1 -0
- package/dist/core/index.cjs +28 -27
- package/dist/core/index.d.cts +4 -4
- package/dist/core/index.d.ts +4 -4
- package/dist/core/index.js +8 -7
- package/dist/ddl-BL1NZLMY.d.cts +78 -0
- package/dist/ddl-D_oW-EVO.d.ts +78 -0
- package/dist/graph-extension/index.cjs +20 -20
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +4 -4
- package/dist/graph-merge/index.cjs +3418 -706
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +550 -58
- package/dist/graph-merge/index.d.ts +550 -58
- package/dist/graph-merge/index.js +3191 -497
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-Deyu8IXL.d.ts → index-COs_z6nV.d.cts} +47 -3
- package/dist/{index-DrRS51Ld.d.cts → index-D7d1u2gr.d.ts} +47 -3
- package/dist/index.cjs +233 -216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +35 -34
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/indexes/index.js +6 -6
- package/dist/interchange/index.cjs +53 -52
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +17 -13
- package/dist/interchange/index.d.ts +17 -13
- package/dist/interchange/index.js +17 -16
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-ptr3JLRP.d.cts → manager-CYaff3n3.d.cts} +2 -2
- package/dist/{manager-DX983gJ0.d.ts → manager-D9eRT_ns.d.ts} +2 -2
- package/dist/{materialize-indexes-CpXoggWU.d.ts → materialize-indexes-DJ3ykH59.d.ts} +1 -1
- package/dist/{materialize-indexes-BXz77YqO.d.cts → materialize-indexes-DTtAnvfY.d.cts} +1 -1
- package/dist/{postgres-DwgEXSPI.d.cts → postgres-CcL4bAHS.d.ts} +1 -1
- package/dist/{postgres-QdOMHTBz.d.ts → postgres-DMj39MEu.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 +46 -46
- 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 +13 -13
- package/dist/provenance/index.js.map +1 -1
- package/dist/repair-validity-windows-BFNZvd_H.d.cts +166 -0
- package/dist/repair-validity-windows-DlUSqwCg.d.ts +166 -0
- package/dist/schema/index.cjs +45 -44
- package/dist/schema/index.d.cts +6 -6
- package/dist/schema/index.d.ts +6 -6
- package/dist/schema/index.js +18 -17
- package/dist/{searchable-BOUuA83f.d.ts → searchable-DHJMh_nj.d.cts} +1 -1
- package/dist/{searchable-BrUh0pdc.d.cts → searchable-bpE1bBfc.d.ts} +1 -1
- package/dist/{sqlite-BfYcV61E.d.cts → sqlite-D7Oz0SQh.d.ts} +1 -1
- package/dist/{sqlite-DK40XVR1.d.ts → sqlite-YppHrNFb.d.cts} +1 -1
- package/dist/{store-FTqBpuJD.d.cts → store-JUVvtmR4.d.cts} +228 -92
- package/dist/{store-Bo1psfVZ.d.ts → store-UzrGvZOo.d.ts} +228 -92
- package/dist/{temporal-DPtn0HOu.d.ts → temporal-5GqpYCk2.d.cts} +1 -1
- package/dist/{temporal-CXewwLTB.d.cts → temporal-CbnLzTmM.d.ts} +1 -1
- package/dist/{types-Du78EvpN.d.ts → types-BqFZTQmV.d.cts} +60 -9
- package/dist/{types-Du78EvpN.d.cts → types-BqFZTQmV.d.ts} +60 -9
- package/dist/{types-CeT7xM4M.d.ts → types-Bx74kaTt.d.ts} +1 -1
- package/dist/{types-XR1nHERK.d.cts → types-CXAhpW-c.d.cts} +1 -1
- package/dist/{where-CJsp-YUf.d.cts → where-DI_Fqz-X.d.cts} +1 -1
- package/dist/{where-CMbFiWwp.d.ts → where-O-k2wgYm.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-32UETY6S.cjs.map +0 -1
- package/dist/chunk-5PDSCELM.cjs.map +0 -1
- package/dist/chunk-62ZXBMSD.js.map +0 -1
- package/dist/chunk-6LAXM4J2.cjs +0 -12
- package/dist/chunk-73MWKDFK.cjs +0 -12
- package/dist/chunk-A2LJG5GM.js.map +0 -1
- package/dist/chunk-A4R3H7RU.cjs.map +0 -1
- package/dist/chunk-ANKOXPCC.cjs +0 -267
- package/dist/chunk-ANKOXPCC.cjs.map +0 -1
- package/dist/chunk-AT3MLMJV.js.map +0 -1
- package/dist/chunk-BEB4OFZF.cjs.map +0 -1
- package/dist/chunk-BQM5P2NO.cjs.map +0 -1
- package/dist/chunk-C2ZP5YS6.cjs.map +0 -1
- package/dist/chunk-C6KE2HSQ.cjs.map +0 -1
- package/dist/chunk-DSAWGCMP.js +0 -254
- package/dist/chunk-DSAWGCMP.js.map +0 -1
- package/dist/chunk-E4OSGBCM.cjs.map +0 -1
- package/dist/chunk-EDHV4CBU.js.map +0 -1
- package/dist/chunk-FA6Z7B5L.js +0 -244
- package/dist/chunk-FA6Z7B5L.js.map +0 -1
- package/dist/chunk-GVAMRRZR.cjs +0 -268
- package/dist/chunk-GVAMRRZR.cjs.map +0 -1
- package/dist/chunk-GWXXHOLU.js.map +0 -1
- package/dist/chunk-HNYLMPQQ.cjs.map +0 -1
- package/dist/chunk-IHRDX7K6.js.map +0 -1
- package/dist/chunk-KCH7WQA5.cjs.map +0 -1
- package/dist/chunk-KXSMF6PL.js.map +0 -1
- package/dist/chunk-LHYSY6SE.js.map +0 -1
- package/dist/chunk-N3QTGPC7.cjs.map +0 -1
- package/dist/chunk-QPOQX2DI.cjs.map +0 -1
- package/dist/chunk-R7EWHKID.js.map +0 -1
- package/dist/chunk-RFDEYLIK.js.map +0 -1
- package/dist/chunk-RHDOAQCT.cjs.map +0 -1
- package/dist/chunk-S3G5VLSW.js.map +0 -1
- package/dist/chunk-S7WIRFNS.cjs.map +0 -1
- package/dist/chunk-UTVQPZPN.cjs.map +0 -1
- package/dist/chunk-WEJHA7AD.js.map +0 -1
- package/dist/chunk-WYFB7BN3.js.map +0 -1
- package/dist/chunk-YQ4JONWE.js.map +0 -1
- package/dist/chunk-Z43KWLZF.js.map +0 -1
- package/dist/ddl-mE07h_EM.d.cts +0 -38
- package/dist/ddl-opIn8DfX.d.ts +0 -38
|
@@ -1,14 +1,139 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { a as Store,
|
|
4
|
-
import {
|
|
1
|
+
import { dP as NodeId, dg as NodeType, bh as JsonValue, dw as EdgeId, d8 as GraphDef, dQ as NodeKinds, dD as GetNodeType, aM as GraphBackend, bi as KindAnnotations, dN as MetaEdge, dr as EdgeType, S as DeleteBehavior, ce as TemporalMode, I as IndexDeclaration, aQ as GraphExtensionVersion, ak as ExtensionNodeDef, ae as ExtensionEdgeDef, ap as ExtensionOntologyRelation, ai as ExtensionIndex } from '../types-BqFZTQmV.js';
|
|
2
|
+
export { u as ContributionDiagnostic, v as ContributionDiagnosticState, J as ContributionRepairEntry, K as ContributionRepairResult } from '../types-BqFZTQmV.js';
|
|
3
|
+
import { a as Store, aP as Node, ce as UniqueIntrospection } from '../store-UzrGvZOo.js';
|
|
4
|
+
import { aj as TypeGraphError, ak as TypeGraphErrorOptions } from '../index-D7d1u2gr.js';
|
|
5
5
|
import { R as Result } from '../result-DWo6mUVz.js';
|
|
6
6
|
export { i as isErr, a as isOk, u as unwrap } from '../result-DWo6mUVz.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import '../temporal-
|
|
9
|
-
import '../searchable-
|
|
10
|
-
import '../manager-
|
|
11
|
-
import '../materialize-indexes-
|
|
8
|
+
import '../temporal-CbnLzTmM.js';
|
|
9
|
+
import '../searchable-bpE1bBfc.js';
|
|
10
|
+
import '../manager-D9eRT_ns.js';
|
|
11
|
+
import '../materialize-indexes-DJ3ykH59.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The composite MERGE IDENTITY key for a node: the pair `(kind, id)`.
|
|
15
|
+
*
|
|
16
|
+
* TypeGraph node identity is the PAIR `(kind, id)` — a bare id string is NOT unique
|
|
17
|
+
* on its own (a `Patient` and an `Encounter` may both carry the id "x" as two
|
|
18
|
+
* DISTINCT committed nodes; ids are caller-supplied). Every place the merge pipeline
|
|
19
|
+
* groups, clusters, de-dupes, repoints, retypes, or deletes BY NODE IDENTITY must
|
|
20
|
+
* key on this pair — never the bare id — or two different-kind nodes that happen to
|
|
21
|
+
* share an id string silently fuse into one cluster (wrong merge, dropped node,
|
|
22
|
+
* incoherent commit) and the §6.4-A base guard is bypassed.
|
|
23
|
+
*
|
|
24
|
+
* Represented as a NUL-joined string (a branded {@link MergeKey}) so it doubles as a
|
|
25
|
+
* `Map`/`Set` key and a deterministic ordering key. `kind` is a schema identifier
|
|
26
|
+
* (NUL-free), so the FIRST NUL unambiguously delimits kind from id even when a
|
|
27
|
+
* caller-supplied id itself contains a NUL byte. This matches the `(kind, id)`
|
|
28
|
+
* separator the commit-time write guard already uses.
|
|
29
|
+
*
|
|
30
|
+
* {@link compareMergeKeys} orders by the bare id FIRST (kind only breaks a same-id
|
|
31
|
+
* tie), so the merge's "minimum-id survivor" / id-sorted-members semantics are
|
|
32
|
+
* preserved unchanged for the common single-kind cluster — the composite key changes
|
|
33
|
+
* WHICH nodes share an identity, never the ordering among genuinely distinct ids.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* A composite `(kind, id)` node-identity key. Branded so it cannot be confused with
|
|
38
|
+
* a bare {@link NodeId} at the type level — the whole point is that the two are NOT
|
|
39
|
+
* interchangeable as identities.
|
|
40
|
+
*/
|
|
41
|
+
type MergeKey = string & {
|
|
42
|
+
readonly __mergeKey: unique symbol;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** A complete graph-merge node identity. */
|
|
46
|
+
type EntityRef = Readonly<{
|
|
47
|
+
kind: string;
|
|
48
|
+
id: NodeId<NodeType>;
|
|
49
|
+
}>;
|
|
50
|
+
/** Structured attribution for one candidate-recall path. */
|
|
51
|
+
type MatchSource = Readonly<{
|
|
52
|
+
kind: "block";
|
|
53
|
+
sourceId: string;
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
kind: "unique";
|
|
56
|
+
sourceId: string;
|
|
57
|
+
constraintName: string;
|
|
58
|
+
}> | Readonly<{
|
|
59
|
+
kind: "baseUnique";
|
|
60
|
+
sourceId: string;
|
|
61
|
+
constraintName: string;
|
|
62
|
+
}> | Readonly<{
|
|
63
|
+
kind: "baseIndex";
|
|
64
|
+
sourceId: string;
|
|
65
|
+
indexName: string;
|
|
66
|
+
}> | Readonly<{
|
|
67
|
+
kind: "keyless";
|
|
68
|
+
sourceId: string;
|
|
69
|
+
}> | Readonly<{
|
|
70
|
+
kind: "retype";
|
|
71
|
+
sourceId: string;
|
|
72
|
+
}> | Readonly<{
|
|
73
|
+
kind: "custom";
|
|
74
|
+
sourceId: string;
|
|
75
|
+
metadata?: JsonValue | undefined;
|
|
76
|
+
}>;
|
|
77
|
+
/** JSON-safe description of the strategy that actually scored a pair. */
|
|
78
|
+
type MatchStrategy = Readonly<{
|
|
79
|
+
kind: "fulltext";
|
|
80
|
+
fields: readonly string[];
|
|
81
|
+
}> | Readonly<{
|
|
82
|
+
kind: "vector";
|
|
83
|
+
fields: readonly string[];
|
|
84
|
+
}> | Readonly<{
|
|
85
|
+
kind: "hybrid";
|
|
86
|
+
fields: readonly string[];
|
|
87
|
+
weights: Readonly<{
|
|
88
|
+
vector: number;
|
|
89
|
+
fulltext: number;
|
|
90
|
+
}>;
|
|
91
|
+
}> | Readonly<{
|
|
92
|
+
kind: "custom";
|
|
93
|
+
}>;
|
|
94
|
+
/** Serializable explanation for one accepted identity edge. */
|
|
95
|
+
type MatchEvidence = Readonly<{
|
|
96
|
+
a: EntityRef;
|
|
97
|
+
b: EntityRef;
|
|
98
|
+
sources: readonly MatchSource[];
|
|
99
|
+
decision: "definitional";
|
|
100
|
+
}> | Readonly<{
|
|
101
|
+
a: EntityRef;
|
|
102
|
+
b: EntityRef;
|
|
103
|
+
sources: readonly MatchSource[];
|
|
104
|
+
decision: "scored";
|
|
105
|
+
strategy: MatchStrategy;
|
|
106
|
+
score: number;
|
|
107
|
+
threshold: number;
|
|
108
|
+
}>;
|
|
109
|
+
/** One opt-in scorer observation, retained independently of cluster membership. */
|
|
110
|
+
type CandidateDiagnostic = Readonly<{
|
|
111
|
+
evidence: Extract<MatchEvidence, Readonly<{
|
|
112
|
+
decision: "scored";
|
|
113
|
+
}>>;
|
|
114
|
+
scoreDecision: "accepted" | "rejected";
|
|
115
|
+
reason?: "noComparableValues";
|
|
116
|
+
clusterDisposition?: "retained" | Readonly<{
|
|
117
|
+
kind: "excluded";
|
|
118
|
+
reason: "diameter" | "baseAmbiguity";
|
|
119
|
+
}>;
|
|
120
|
+
}> | Readonly<{
|
|
121
|
+
evidence: Extract<MatchEvidence, Readonly<{
|
|
122
|
+
decision: "definitional";
|
|
123
|
+
}>>;
|
|
124
|
+
scoreDecision: "accepted";
|
|
125
|
+
clusterDisposition: Readonly<{
|
|
126
|
+
kind: "excluded";
|
|
127
|
+
reason: "diameter" | "baseAmbiguity";
|
|
128
|
+
}>;
|
|
129
|
+
}>;
|
|
130
|
+
/** Bounded public diagnostic collection assembled by the merge planner. */
|
|
131
|
+
type CandidateDiagnostics = Readonly<{
|
|
132
|
+
entries: readonly CandidateDiagnostic[];
|
|
133
|
+
total: number;
|
|
134
|
+
limit: number;
|
|
135
|
+
truncated: boolean;
|
|
136
|
+
}>;
|
|
12
137
|
|
|
13
138
|
/**
|
|
14
139
|
* Core type model for the graph-merge primitive.
|
|
@@ -75,6 +200,33 @@ type GraphBranch<G extends GraphDef> = Readonly<{
|
|
|
75
200
|
hash: string;
|
|
76
201
|
}> | undefined;
|
|
77
202
|
}>;
|
|
203
|
+
declare const INGESTION_BRANCH_BRAND: unique symbol;
|
|
204
|
+
/**
|
|
205
|
+
* Node collections exposed by an {@link IngestionBranch}. They retain normal
|
|
206
|
+
* validation, reads, and staging writes, but omit APIs that claim a declared
|
|
207
|
+
* uniqueness constraint exists on the relaxed physical working copy.
|
|
208
|
+
*/
|
|
209
|
+
type IngestionNodeCollections<G extends GraphDef> = Readonly<{
|
|
210
|
+
[K in keyof Store<G>["nodes"]]-?: Pick<Store<G>["nodes"][K], "create" | "getById" | "getByIds" | "update" | "updateWhere" | "delete" | "hardDelete" | "find" | "count" | "createFromRecord" | "upsertById" | "upsertByIdFromRecord" | "bulkCreate" | "bulkUpsertById" | "bulkInsert" | "bulkDelete" | "bulkFindByIndex">;
|
|
211
|
+
}>;
|
|
212
|
+
/**
|
|
213
|
+
* Opaque handle for an untrusted ingestion working copy.
|
|
214
|
+
*
|
|
215
|
+
* The ordinary {@link Store} is intentionally absent: callers may stage and
|
|
216
|
+
* inspect graph data through the typed collections, then pass this handle to
|
|
217
|
+
* merge planning, but cannot access schema evolution, transactions, or runtime
|
|
218
|
+
* internals. `close()` releases the private working-copy backend.
|
|
219
|
+
*/
|
|
220
|
+
type IngestionBranch<G extends GraphDef> = Readonly<{
|
|
221
|
+
[INGESTION_BRANCH_BRAND]: true;
|
|
222
|
+
id: BranchId;
|
|
223
|
+
base: BaseVersion;
|
|
224
|
+
nodes: IngestionNodeCollections<G>;
|
|
225
|
+
edges: Store<G>["edges"];
|
|
226
|
+
close: () => Promise<void>;
|
|
227
|
+
}>;
|
|
228
|
+
/** A normal branch or an opaque ingestion branch accepted by merge entrypoints. */
|
|
229
|
+
type MergeBranch<G extends GraphDef> = GraphBranch<G> | IngestionBranch<G>;
|
|
78
230
|
/**
|
|
79
231
|
* Options for {@link GraphBranch} creation. `id` is optional — when omitted a
|
|
80
232
|
* fresh id is generated.
|
|
@@ -226,6 +378,15 @@ type DeleteModifyPolicy = "deleteWins" | "modifyWins" | "flag";
|
|
|
226
378
|
* and records a report warning.
|
|
227
379
|
*/
|
|
228
380
|
type ComparisonCeilingPolicy = "error" | "mergeByIdOnly";
|
|
381
|
+
/**
|
|
382
|
+
* Opt-in retention policy for candidate-level scoring diagnostics. The limit is
|
|
383
|
+
* a deterministic global ceiling over the canonically ordered scored pairs;
|
|
384
|
+
* planning still evaluates candidates according to the normal comparison
|
|
385
|
+
* ceiling, then retains at most this many accepted/rejected decisions.
|
|
386
|
+
*/
|
|
387
|
+
type CandidateDiagnosticsOptions = Readonly<{
|
|
388
|
+
limit: number;
|
|
389
|
+
}>;
|
|
229
390
|
/**
|
|
230
391
|
* Ontology type-reconciliation mode. `"off"` is a no-op (default); `"ontology"`
|
|
231
392
|
* collapses compatible types to the most-specific via the public subClassOf
|
|
@@ -298,6 +459,11 @@ type MergeOptions<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
298
459
|
target?: Store<G>;
|
|
299
460
|
/** Safety ceiling on candidate comparisons per kind. Default: unbounded. */
|
|
300
461
|
maxComparisonsPerKind?: number;
|
|
462
|
+
/**
|
|
463
|
+
* Retain bounded accepted/rejected scored-pair diagnostics. Omitted by
|
|
464
|
+
* default so ordinary plans and reports contain only decisive evidence.
|
|
465
|
+
*/
|
|
466
|
+
candidateDiagnostics?: CandidateDiagnosticsOptions;
|
|
301
467
|
/**
|
|
302
468
|
* Optional single-link diameter guard. When set, clusters whose pairwise
|
|
303
469
|
* distance exceeds it are split by the deterministic drop-weakest rule (T8).
|
|
@@ -331,7 +497,7 @@ type MergeOptions<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
331
497
|
type MergeIncrementalArgs<G extends GraphDef = GraphDef> = Readonly<{
|
|
332
498
|
forkPoint: Store<G>;
|
|
333
499
|
target: Store<G>;
|
|
334
|
-
branches: readonly
|
|
500
|
+
branches: readonly MergeBranch<G>[];
|
|
335
501
|
options?: Omit<MergeOptions<G>, "target">;
|
|
336
502
|
}>;
|
|
337
503
|
/**
|
|
@@ -342,6 +508,8 @@ type EntityResolution = Readonly<{
|
|
|
342
508
|
memberIds: readonly NodeId<NodeType>[];
|
|
343
509
|
kind: string;
|
|
344
510
|
branchOrigins: readonly BranchId[];
|
|
511
|
+
/** Deterministic minimal accepted-edge witness for this resolution. */
|
|
512
|
+
decisiveEdges: readonly MatchEvidence[];
|
|
345
513
|
}>;
|
|
346
514
|
/**
|
|
347
515
|
* One candidate value contributing to a property conflict, tagged by its origin
|
|
@@ -384,6 +552,8 @@ type TypeReconciliation = Readonly<{
|
|
|
384
552
|
entityId: NodeId<NodeType>;
|
|
385
553
|
fromTypes: readonly string[];
|
|
386
554
|
toType: string;
|
|
555
|
+
/** Accepted ontology-retype witness, when emitted by graph merge. */
|
|
556
|
+
decisiveEdges?: readonly MatchEvidence[];
|
|
387
557
|
}>;
|
|
388
558
|
/**
|
|
389
559
|
* An item omitted from the merged result (e.g. an edge whose endpoint was
|
|
@@ -414,9 +584,9 @@ type DroppedItem = Readonly<{
|
|
|
414
584
|
*/
|
|
415
585
|
declare const VALIDITY_END_TARGET_PRECEDENCE: "target";
|
|
416
586
|
/**
|
|
417
|
-
* One inherited row whose end-of-validity the merge RESOLVED: the
|
|
418
|
-
* stands and every branch that claimed
|
|
419
|
-
*
|
|
587
|
+
* One inherited row whose end-of-validity the merge RESOLVED: the explicit set or
|
|
588
|
+
* clear that stands and every branch that claimed a change for the row (including
|
|
589
|
+
* the ones whose claim lost arbitration).
|
|
420
590
|
*
|
|
421
591
|
* `id` is bare because `entity` + `kind` already disambiguate it — a node and an
|
|
422
592
|
* edge, or two kinds, that share an id string are distinct entries.
|
|
@@ -425,26 +595,28 @@ type ValidityEndResolution = Readonly<{
|
|
|
425
595
|
entity: "node" | "edge";
|
|
426
596
|
kind: string;
|
|
427
597
|
id: string;
|
|
428
|
-
/**
|
|
429
|
-
* The row's end-of-validity as a canonical UTC ISO 8601 string: the instant the
|
|
430
|
-
* commit WROTE, or — under {@link VALIDITY_END_TARGET_PRECEDENCE} — the instant
|
|
431
|
-
* the target already held and the merge left alone.
|
|
432
|
-
*/
|
|
433
|
-
validTo: string;
|
|
434
|
-
/** Every branch that claimed an end, sorted; length > 1 means arbitration. */
|
|
598
|
+
/** Every branch that claimed a change, sorted; length > 1 means arbitration. */
|
|
435
599
|
claimedBy: readonly BranchId[];
|
|
436
600
|
/**
|
|
437
601
|
* Present only as {@link VALIDITY_END_TARGET_PRECEDENCE}, marking an entry the
|
|
438
|
-
* merge did NOT decide: the incremental target had already
|
|
439
|
-
*
|
|
440
|
-
* discarded, and nothing was written or credited for the row.
|
|
602
|
+
* merge did NOT decide: the incremental target had already changed this end, so
|
|
603
|
+
* the set/clear fields describe the target's own committed state, every claim in
|
|
604
|
+
* `claimedBy` was discarded, and nothing was written or credited for the row.
|
|
441
605
|
*
|
|
442
|
-
* ABSENT means the merge decided the
|
|
443
|
-
* `claimedBy` names the claims it arbitrated between. A consumer
|
|
444
|
-
* field therefore keeps reading the entries it always read.
|
|
606
|
+
* ABSENT means the merge decided the change — `validTo` or `clearValidTo` names
|
|
607
|
+
* what it wrote and `claimedBy` names the claims it arbitrated between. A consumer
|
|
608
|
+
* that ignores the field therefore keeps reading the entries it always read.
|
|
445
609
|
*/
|
|
446
610
|
precedence?: typeof VALIDITY_END_TARGET_PRECEDENCE;
|
|
447
|
-
}
|
|
611
|
+
}> & (Readonly<{
|
|
612
|
+
/** The canonical instant the merge set, or the target already held. */
|
|
613
|
+
validTo: string;
|
|
614
|
+
clearValidTo?: never;
|
|
615
|
+
}> | Readonly<{
|
|
616
|
+
/** Marks a resolution that reopened the row by clearing its upper bound. */
|
|
617
|
+
clearValidTo: true;
|
|
618
|
+
validTo?: never;
|
|
619
|
+
}>);
|
|
448
620
|
/**
|
|
449
621
|
* A `(kind, id)` node identity as surfaced in the merge report. Node identity is the
|
|
450
622
|
* PAIR, never the bare id (a `Doctor` and a `SpecialistDoctor` can share an id string),
|
|
@@ -531,8 +703,9 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
531
703
|
typeReconciliations: readonly TypeReconciliation[];
|
|
532
704
|
dropped: readonly DroppedItem[];
|
|
533
705
|
/**
|
|
534
|
-
* Every inherited row whose END-OF-VALIDITY the merge resolved, with the
|
|
535
|
-
* that stands and the branches that claimed
|
|
706
|
+
* Every inherited row whose END-OF-VALIDITY the merge resolved, with the end
|
|
707
|
+
* update that stands and the branches that claimed it. A set carries `validTo`;
|
|
708
|
+
* a reopening carries `clearValidTo: true`.
|
|
536
709
|
*
|
|
537
710
|
* Reported because the resolution is silent by design: two branches ending the
|
|
538
711
|
* same row at different instants are not in conflict (an ending is a monotone
|
|
@@ -557,6 +730,8 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
557
730
|
* graph still committed). Empty on a clean merge.
|
|
558
731
|
*/
|
|
559
732
|
warnings: readonly string[];
|
|
733
|
+
/** Bounded accepted/rejected scored-pair diagnostics when explicitly enabled. */
|
|
734
|
+
candidateDiagnostics?: CandidateDiagnostics;
|
|
560
735
|
/**
|
|
561
736
|
* Present only when `persistProvenance` ran and SUCCEEDED: the sidecar provenance
|
|
562
737
|
* graph id and how many `{branch, sourceId}` rows were upserted. Absent when
|
|
@@ -638,8 +813,20 @@ declare const MERGE_ERROR_CODES: {
|
|
|
638
813
|
readonly branch: "GRAPH_MERGE_BRANCH_ERROR";
|
|
639
814
|
readonly similarityUnavailable: "GRAPH_MERGE_SIMILARITY_UNAVAILABLE";
|
|
640
815
|
readonly conflict: "GRAPH_MERGE_CONFLICT";
|
|
816
|
+
readonly constraintConflict: "GRAPH_MERGE_CONSTRAINT_CONFLICT";
|
|
641
817
|
readonly identityConflict: "GRAPH_MERGE_IDENTITY_CONFLICT";
|
|
642
818
|
readonly baseVersionMismatch: "GRAPH_MERGE_BASE_VERSION_MISMATCH";
|
|
819
|
+
readonly planCapability: "GRAPH_MERGE_PLAN_CAPABILITY";
|
|
820
|
+
readonly planInvalid: "GRAPH_MERGE_PLAN_INVALID";
|
|
821
|
+
readonly planVersionUnsupported: "GRAPH_MERGE_PLAN_VERSION_UNSUPPORTED";
|
|
822
|
+
readonly planDigestMismatch: "GRAPH_MERGE_PLAN_DIGEST_MISMATCH";
|
|
823
|
+
readonly planTargetMismatch: "GRAPH_MERGE_PLAN_TARGET_MISMATCH";
|
|
824
|
+
readonly planSchemaMismatch: "GRAPH_MERGE_PLAN_SCHEMA_MISMATCH";
|
|
825
|
+
readonly planOriginMismatch: "GRAPH_MERGE_PLAN_ORIGIN_MISMATCH";
|
|
826
|
+
readonly planStale: "GRAPH_MERGE_PLAN_STALE";
|
|
827
|
+
readonly planningStale: "GRAPH_MERGE_PLANNING_STALE";
|
|
828
|
+
readonly candidateSource: "GRAPH_MERGE_CANDIDATE_SOURCE";
|
|
829
|
+
readonly evidence: "GRAPH_MERGE_EVIDENCE";
|
|
643
830
|
};
|
|
644
831
|
/**
|
|
645
832
|
* Options shared by every merge error. Mirrors the relevant subset of
|
|
@@ -690,6 +877,25 @@ declare class MergeConflictError extends MergeError {
|
|
|
690
877
|
readonly code: "GRAPH_MERGE_CONFLICT";
|
|
691
878
|
constructor(message: string, options?: MergeErrorOptions);
|
|
692
879
|
}
|
|
880
|
+
/** Details copied from the deterministic store constraint that refused commit. */
|
|
881
|
+
type MergeConstraintConflictErrorDetails = Readonly<{
|
|
882
|
+
/** Stable code of the underlying store constraint error. */
|
|
883
|
+
constraintCode: string;
|
|
884
|
+
/** Class name of the underlying store constraint error. */
|
|
885
|
+
constraintErrorName: string;
|
|
886
|
+
/** Constraint-specific fields, also copied onto this details object. */
|
|
887
|
+
constraintDetails: Readonly<Record<string, unknown>>;
|
|
888
|
+
[key: string]: unknown;
|
|
889
|
+
}>;
|
|
890
|
+
/** Raised when a resolved merge would commit a graph that violates a constraint. */
|
|
891
|
+
declare class MergeConstraintConflictError extends MergeError {
|
|
892
|
+
protected static readonly errorCategory = "constraint";
|
|
893
|
+
readonly code: "GRAPH_MERGE_CONSTRAINT_CONFLICT";
|
|
894
|
+
readonly category: "constraint";
|
|
895
|
+
readonly cause: TypeGraphError;
|
|
896
|
+
readonly details: MergeConstraintConflictErrorDetails;
|
|
897
|
+
constructor(cause: TypeGraphError);
|
|
898
|
+
}
|
|
693
899
|
/** Raised when identity branches contain opposing or retract/reassert truth. */
|
|
694
900
|
declare class IdentityMergeConflictError extends MergeError {
|
|
695
901
|
readonly code: "GRAPH_MERGE_IDENTITY_CONFLICT";
|
|
@@ -704,6 +910,63 @@ declare class BaseVersionMismatchError extends MergeError {
|
|
|
704
910
|
readonly code: "GRAPH_MERGE_BASE_VERSION_MISMATCH";
|
|
705
911
|
constructor(message: string, options?: MergeErrorOptions);
|
|
706
912
|
}
|
|
913
|
+
/** Raised when a target cannot provide the durable plan/apply guarantees. */
|
|
914
|
+
declare class MergePlanCapabilityError extends MergeError {
|
|
915
|
+
protected static readonly errorCategory = "user";
|
|
916
|
+
readonly code: "GRAPH_MERGE_PLAN_CAPABILITY";
|
|
917
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
918
|
+
}
|
|
919
|
+
/** Raised when a serialized plan is structurally or semantically malformed. */
|
|
920
|
+
declare class InvalidMergePlanError extends MergeError {
|
|
921
|
+
protected static readonly errorCategory = "user";
|
|
922
|
+
readonly code: string;
|
|
923
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
924
|
+
}
|
|
925
|
+
/** Raised when a plan uses a wire format this library version cannot read. */
|
|
926
|
+
declare class UnsupportedMergePlanVersionError extends InvalidMergePlanError {
|
|
927
|
+
readonly code: "GRAPH_MERGE_PLAN_VERSION_UNSUPPORTED";
|
|
928
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
929
|
+
}
|
|
930
|
+
/** Raised when a plan's canonical content no longer matches its digest. */
|
|
931
|
+
declare class MergePlanDigestMismatchError extends InvalidMergePlanError {
|
|
932
|
+
readonly code: "GRAPH_MERGE_PLAN_DIGEST_MISMATCH";
|
|
933
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
934
|
+
}
|
|
935
|
+
/** Raised when a plan names a different target graph. */
|
|
936
|
+
declare class MergePlanTargetMismatchError extends InvalidMergePlanError {
|
|
937
|
+
readonly code: "GRAPH_MERGE_PLAN_TARGET_MISMATCH";
|
|
938
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
939
|
+
}
|
|
940
|
+
/** Raised when a plan was produced for another active schema. */
|
|
941
|
+
declare class MergePlanSchemaMismatchError extends InvalidMergePlanError {
|
|
942
|
+
readonly code: "GRAPH_MERGE_PLAN_SCHEMA_MISMATCH";
|
|
943
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
944
|
+
}
|
|
945
|
+
/** Raised when a plan belongs to an independently-created revision clock. */
|
|
946
|
+
declare class MergePlanOriginMismatchError extends InvalidMergePlanError {
|
|
947
|
+
readonly code: "GRAPH_MERGE_PLAN_ORIGIN_MISMATCH";
|
|
948
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
949
|
+
}
|
|
950
|
+
/** Raised when the target revision no longer equals the plan's fence. */
|
|
951
|
+
declare class StaleMergePlanError extends MergeError {
|
|
952
|
+
readonly code: string;
|
|
953
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
954
|
+
}
|
|
955
|
+
/** Raised when the target moved while a plan was being computed. */
|
|
956
|
+
declare class MergePlanningStaleError extends StaleMergePlanError {
|
|
957
|
+
readonly code: "GRAPH_MERGE_PLANNING_STALE";
|
|
958
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
959
|
+
}
|
|
960
|
+
/** Raised when a built-in candidate source cannot produce attributed output. */
|
|
961
|
+
declare class CandidateSourceError extends MergeError {
|
|
962
|
+
readonly code: "GRAPH_MERGE_CANDIDATE_SOURCE";
|
|
963
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
964
|
+
}
|
|
965
|
+
/** Raised when match evidence is invalid or contains a non-finite score. */
|
|
966
|
+
declare class MatchEvidenceError extends MergeError {
|
|
967
|
+
readonly code: "GRAPH_MERGE_EVIDENCE";
|
|
968
|
+
constructor(message: string, options?: MergeErrorOptions);
|
|
969
|
+
}
|
|
707
970
|
|
|
708
971
|
/**
|
|
709
972
|
* Pluggable working-copy strategy: how `branch()` produces an isolated,
|
|
@@ -731,9 +994,11 @@ declare class BaseVersionMismatchError extends MergeError {
|
|
|
731
994
|
* `includeTemporal: true` carries `validFrom`/`validTo` through unchanged,
|
|
732
995
|
* preserving the base's exact valid-time window on the clone: create-time
|
|
733
996
|
* paths default an omitted `validFrom` to the row's own creation instant
|
|
734
|
-
* (see #240)
|
|
735
|
-
*
|
|
736
|
-
*
|
|
997
|
+
* (see #240) — except for a BORN-ENDED row, whose stated `validTo` at or before
|
|
998
|
+
* the write instant leaves it with no lower bound at all (see #407) — and
|
|
999
|
+
* export/import round-trip a still-open-left `valid_from` (a born-ended row, or
|
|
1000
|
+
* one that predates the #240 fix) as an explicit `null` rather than silently
|
|
1001
|
+
* dropping it — see `InterchangeNodeSchema.validFrom`'s doc.
|
|
737
1002
|
* Without either half of this, the clone's re-import would re-stamp the
|
|
738
1003
|
* affected base rows to the CLONE's creation instant instead — narrowing
|
|
739
1004
|
* their validity window and making `asOf` reads on the fork diverge from
|
|
@@ -850,36 +1115,25 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
|
|
|
850
1115
|
declare function branch<G extends GraphDef>(baseStore: GraphBranch<G>["store"], makeBackend: MakeBackend, options?: BranchOptions, strategy?: WorkingCopyStrategy<G>): Promise<Result<GraphBranch<G>, BranchError>>;
|
|
851
1116
|
|
|
852
1117
|
/**
|
|
853
|
-
*
|
|
1118
|
+
* Constraint-aware working copies for untrusted ingestion.
|
|
854
1119
|
*
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
*
|
|
859
|
-
*
|
|
860
|
-
* share an id string silently fuse into one cluster (wrong merge, dropped node,
|
|
861
|
-
* incoherent commit) and the §6.4-A base guard is bypassed.
|
|
862
|
-
*
|
|
863
|
-
* Represented as a NUL-joined string (a branded {@link MergeKey}) so it doubles as a
|
|
864
|
-
* `Map`/`Set` key and a deterministic ordering key. `kind` is a schema identifier
|
|
865
|
-
* (NUL-free), so the FIRST NUL unambiguously delimits kind from id even when a
|
|
866
|
-
* caller-supplied id itself contains a NUL byte. This matches the `(kind, id)`
|
|
867
|
-
* separator the commit-time write guard already uses.
|
|
868
|
-
*
|
|
869
|
-
* {@link compareMergeKeys} orders by the bare id FIRST (kind only breaks a same-id
|
|
870
|
-
* tie), so the merge's "minimum-id survivor" / id-sorted-members semantics are
|
|
871
|
-
* preserved unchanged for the common single-kind cluster — the composite key changes
|
|
872
|
-
* WHICH nodes share an identity, never the ordering among genuinely distinct ids.
|
|
1120
|
+
* An ingestion branch persists a mechanically-derived schema with node
|
|
1121
|
+
* uniqueness declarations removed. That lets aliases reach merge planning,
|
|
1122
|
+
* where canonical candidate generation and final resolved-write validation use
|
|
1123
|
+
* the canonical graph's constraints. Every other working-copy constraint stays
|
|
1124
|
+
* active during staging.
|
|
873
1125
|
*/
|
|
874
1126
|
|
|
875
1127
|
/**
|
|
876
|
-
*
|
|
877
|
-
*
|
|
878
|
-
*
|
|
1128
|
+
* Creates an isolated ingestion branch whose node uniqueness constraints are
|
|
1129
|
+
* deferred until the resolved merge write set is applied.
|
|
1130
|
+
*
|
|
1131
|
+
* The returned handle deliberately exposes no ordinary Store. Its typed node
|
|
1132
|
+
* and edge collections are sufficient to stage and inspect incoming data, and
|
|
1133
|
+
* merge entrypoints accept the handle directly. Call `close()` when the working
|
|
1134
|
+
* copy is no longer needed.
|
|
879
1135
|
*/
|
|
880
|
-
|
|
881
|
-
readonly __mergeKey: unique symbol;
|
|
882
|
-
};
|
|
1136
|
+
declare function ingestionBranch<G extends GraphDef>(baseStore: GraphBranch<G>["store"], makeBackend: MakeBackend, options?: BranchOptions): Promise<Result<IngestionBranch<G>, BranchError>>;
|
|
883
1137
|
|
|
884
1138
|
/**
|
|
885
1139
|
* The shared SCORING stage (design §4, the single match-decision point).
|
|
@@ -929,7 +1183,9 @@ type MergeKey = string & {
|
|
|
929
1183
|
type CandidateEdge = Readonly<{
|
|
930
1184
|
a: MergeKey;
|
|
931
1185
|
b: MergeKey;
|
|
1186
|
+
/** Internal drop-weakest rank. Definitional 1 is never copied to evidence. */
|
|
932
1187
|
score: number;
|
|
1188
|
+
evidence: MatchEvidence;
|
|
933
1189
|
}>;
|
|
934
1190
|
/**
|
|
935
1191
|
* An unscored candidate pair a source proposes for scoring: the canonical
|
|
@@ -943,8 +1199,241 @@ type CandidatePair<K extends NodeType = NodeType> = Readonly<{
|
|
|
943
1199
|
b: MergeKey;
|
|
944
1200
|
left: Node<K>;
|
|
945
1201
|
right: Node<K>;
|
|
1202
|
+
sources: readonly MatchSource[];
|
|
1203
|
+
}>;
|
|
1204
|
+
|
|
1205
|
+
declare const MERGE_PLAN_FORMAT_VERSION: 1;
|
|
1206
|
+
declare const MERGE_PLAN_DIGEST_ALGORITHM: "sha256";
|
|
1207
|
+
type MergePlanEntityRef = Readonly<{
|
|
1208
|
+
kind: string;
|
|
1209
|
+
id: string;
|
|
1210
|
+
}>;
|
|
1211
|
+
type MergePlanSchemaFence = Readonly<{
|
|
1212
|
+
managed: boolean;
|
|
1213
|
+
version: number;
|
|
1214
|
+
hash: string;
|
|
1215
|
+
}>;
|
|
1216
|
+
type MergePlanRevisionFence = Readonly<{
|
|
1217
|
+
origin: string;
|
|
1218
|
+
revision: string | null;
|
|
1219
|
+
}>;
|
|
1220
|
+
type MergePlanTargetFence = Readonly<{
|
|
1221
|
+
graphId: string;
|
|
1222
|
+
schema: MergePlanSchemaFence;
|
|
1223
|
+
revision: MergePlanRevisionFence;
|
|
1224
|
+
}>;
|
|
1225
|
+
type MergePlanBranchAnchor = Readonly<{
|
|
1226
|
+
branchId: string;
|
|
1227
|
+
baseVersion: string;
|
|
1228
|
+
}>;
|
|
1229
|
+
type MergePlanAnchors = Readonly<{
|
|
1230
|
+
kind: "snapshot";
|
|
1231
|
+
base: Readonly<{
|
|
1232
|
+
graphId: string;
|
|
1233
|
+
baseVersion: string;
|
|
1234
|
+
}>;
|
|
1235
|
+
branches: readonly MergePlanBranchAnchor[];
|
|
1236
|
+
}> | Readonly<{
|
|
1237
|
+
kind: "incremental";
|
|
1238
|
+
forkPoint: Readonly<{
|
|
1239
|
+
graphId: string;
|
|
1240
|
+
baseVersion: string;
|
|
1241
|
+
schema: MergePlanSchemaFence;
|
|
1242
|
+
}>;
|
|
1243
|
+
branches: readonly MergePlanBranchAnchor[];
|
|
1244
|
+
}>;
|
|
1245
|
+
type MergePlanNodeDelete = MergePlanEntityRef;
|
|
1246
|
+
type MergePlanNodeUpsert = Readonly<{
|
|
1247
|
+
kind: string;
|
|
1248
|
+
id: string;
|
|
1249
|
+
setProps: Readonly<Record<string, JsonValue>>;
|
|
1250
|
+
unsetProps: readonly string[];
|
|
1251
|
+
validFrom?: string | undefined;
|
|
1252
|
+
validTo?: string | undefined;
|
|
1253
|
+
}>;
|
|
1254
|
+
type MergePlanEdgeDelete = MergePlanEntityRef;
|
|
1255
|
+
type MergePlanEdgeUpsert = Readonly<{
|
|
1256
|
+
kind: string;
|
|
1257
|
+
id: string;
|
|
1258
|
+
from: MergePlanEntityRef;
|
|
1259
|
+
to: MergePlanEntityRef;
|
|
1260
|
+
setProps: Readonly<Record<string, JsonValue>>;
|
|
1261
|
+
unsetProps: readonly string[];
|
|
1262
|
+
validFrom?: string | undefined;
|
|
1263
|
+
validTo?: string | undefined;
|
|
1264
|
+
}>;
|
|
1265
|
+
type MergePlanIdentityAssertion = Readonly<{
|
|
1266
|
+
id: string;
|
|
1267
|
+
relation: "same" | "different";
|
|
1268
|
+
a: MergePlanEntityRef;
|
|
1269
|
+
b: MergePlanEntityRef;
|
|
1270
|
+
validFrom: string;
|
|
1271
|
+
validTo?: string | undefined;
|
|
1272
|
+
endedBy?: MergePlanEntityRef | undefined;
|
|
1273
|
+
}>;
|
|
1274
|
+
type MergePlanWrites = Readonly<{
|
|
1275
|
+
nodeDeletes: readonly MergePlanNodeDelete[];
|
|
1276
|
+
nodeUpserts: readonly MergePlanNodeUpsert[];
|
|
1277
|
+
edgeDeletes: readonly MergePlanEdgeDelete[];
|
|
1278
|
+
edgeUpserts: readonly MergePlanEdgeUpsert[];
|
|
1279
|
+
identityAssertions: readonly MergePlanIdentityAssertion[];
|
|
1280
|
+
identityRetractions: readonly MergePlanIdentityAssertion[];
|
|
1281
|
+
}>;
|
|
1282
|
+
type MergePlanProposedSummary = Readonly<{
|
|
1283
|
+
nodes: Readonly<{
|
|
1284
|
+
upserts: number;
|
|
1285
|
+
deletions: number;
|
|
1286
|
+
}>;
|
|
1287
|
+
edges: Readonly<{
|
|
1288
|
+
upserts: number;
|
|
1289
|
+
deletions: number;
|
|
1290
|
+
}>;
|
|
1291
|
+
identity: Readonly<{
|
|
1292
|
+
assertions: number;
|
|
1293
|
+
retractions: number;
|
|
1294
|
+
}>;
|
|
1295
|
+
}>;
|
|
1296
|
+
type MergePlanCanonicalMapping = Readonly<{
|
|
1297
|
+
member: MergePlanEntityRef;
|
|
1298
|
+
canonical: MergePlanEntityRef;
|
|
1299
|
+
}>;
|
|
1300
|
+
type MergePlanRetype = Readonly<{
|
|
1301
|
+
entity: MergePlanEntityRef;
|
|
1302
|
+
toKind: string;
|
|
1303
|
+
}>;
|
|
1304
|
+
type MergePlanGuards = Readonly<{
|
|
1305
|
+
canonicalMappings: readonly MergePlanCanonicalMapping[];
|
|
1306
|
+
retypes: readonly MergePlanRetype[];
|
|
1307
|
+
deletedNodes: readonly MergePlanEntityRef[];
|
|
1308
|
+
incremental?: Readonly<{
|
|
1309
|
+
tombstoneResurrection: "refuse";
|
|
1310
|
+
lossyUpdates: "refuse";
|
|
1311
|
+
edgeIdentity: "preserve";
|
|
1312
|
+
}>;
|
|
1313
|
+
}>;
|
|
1314
|
+
type MergePlanMatchSource = Readonly<{
|
|
1315
|
+
kind: "block";
|
|
1316
|
+
sourceId: string;
|
|
1317
|
+
}> | Readonly<{
|
|
1318
|
+
kind: "unique";
|
|
1319
|
+
sourceId: string;
|
|
1320
|
+
constraintName: string;
|
|
1321
|
+
}> | Readonly<{
|
|
1322
|
+
kind: "baseUnique";
|
|
1323
|
+
sourceId: string;
|
|
1324
|
+
constraintName: string;
|
|
1325
|
+
}> | Readonly<{
|
|
1326
|
+
kind: "baseIndex";
|
|
1327
|
+
sourceId: string;
|
|
1328
|
+
indexName: string;
|
|
1329
|
+
}> | Readonly<{
|
|
1330
|
+
kind: "keyless";
|
|
1331
|
+
sourceId: string;
|
|
1332
|
+
}> | Readonly<{
|
|
1333
|
+
kind: "retype";
|
|
1334
|
+
sourceId: string;
|
|
1335
|
+
}> | Readonly<{
|
|
1336
|
+
kind: "custom";
|
|
1337
|
+
sourceId: string;
|
|
1338
|
+
metadata?: JsonValue | undefined;
|
|
1339
|
+
}>;
|
|
1340
|
+
type MergePlanSimilarityStrategy = Readonly<{
|
|
1341
|
+
kind: "fulltext" | "vector";
|
|
1342
|
+
fields: readonly string[];
|
|
1343
|
+
}> | Readonly<{
|
|
1344
|
+
kind: "hybrid";
|
|
1345
|
+
fields: readonly string[];
|
|
1346
|
+
weights: Readonly<{
|
|
1347
|
+
vector: number;
|
|
1348
|
+
fulltext: number;
|
|
1349
|
+
}>;
|
|
1350
|
+
}> | Readonly<{
|
|
1351
|
+
kind: "custom";
|
|
1352
|
+
}>;
|
|
1353
|
+
type MergePlanMatchEvidence = Readonly<{
|
|
1354
|
+
a: MergePlanEntityRef;
|
|
1355
|
+
b: MergePlanEntityRef;
|
|
1356
|
+
sources: readonly MergePlanMatchSource[];
|
|
1357
|
+
decision: "definitional";
|
|
1358
|
+
}> | Readonly<{
|
|
1359
|
+
a: MergePlanEntityRef;
|
|
1360
|
+
b: MergePlanEntityRef;
|
|
1361
|
+
sources: readonly MergePlanMatchSource[];
|
|
1362
|
+
decision: "scored";
|
|
1363
|
+
strategy: MergePlanSimilarityStrategy;
|
|
1364
|
+
score: number;
|
|
1365
|
+
threshold: number;
|
|
1366
|
+
}>;
|
|
1367
|
+
type MergePlanEntityResolution = Readonly<{
|
|
1368
|
+
canonicalId: string;
|
|
1369
|
+
memberIds: readonly string[];
|
|
1370
|
+
kind: string;
|
|
1371
|
+
branchOrigins: readonly string[];
|
|
1372
|
+
decisiveEdges: readonly MergePlanMatchEvidence[];
|
|
1373
|
+
}>;
|
|
1374
|
+
type MergePlanCandidateDiagnostic = Readonly<{
|
|
1375
|
+
evidence: MergePlanMatchEvidence;
|
|
1376
|
+
scoreDecision: "accepted" | "rejected";
|
|
1377
|
+
reason?: "noComparableValues" | undefined;
|
|
1378
|
+
clusterDisposition?: "retained" | Readonly<{
|
|
1379
|
+
kind: "excluded";
|
|
1380
|
+
reason: "diameter" | "baseAmbiguity";
|
|
1381
|
+
}> | undefined;
|
|
1382
|
+
}>;
|
|
1383
|
+
type MergePlanDiagnostics = Readonly<{
|
|
1384
|
+
entries: readonly MergePlanCandidateDiagnostic[];
|
|
1385
|
+
total: number;
|
|
1386
|
+
limit: number;
|
|
1387
|
+
truncated: boolean;
|
|
1388
|
+
}>;
|
|
1389
|
+
type MergePlanTypeReconciliation = Readonly<{
|
|
1390
|
+
entityId: string;
|
|
1391
|
+
fromTypes: readonly string[];
|
|
1392
|
+
toType: string;
|
|
1393
|
+
decisiveEdges?: readonly MergePlanMatchEvidence[] | undefined;
|
|
1394
|
+
}>;
|
|
1395
|
+
type MergePlanReview = Readonly<{
|
|
1396
|
+
resolutions: readonly MergePlanEntityResolution[];
|
|
1397
|
+
conflicts: readonly JsonValue[];
|
|
1398
|
+
deleteModifyConflicts: readonly JsonValue[];
|
|
1399
|
+
typeReconciliations: readonly MergePlanTypeReconciliation[];
|
|
1400
|
+
dropped: readonly JsonValue[];
|
|
1401
|
+
validityEnds: readonly JsonValue[];
|
|
1402
|
+
baseAmbiguities: readonly JsonValue[];
|
|
1403
|
+
provenanceRecords: readonly JsonValue[];
|
|
1404
|
+
warnings: readonly string[];
|
|
1405
|
+
diagnostics?: MergePlanDiagnostics | undefined;
|
|
1406
|
+
}>;
|
|
1407
|
+
type MergePlanProvenanceOptions = Readonly<{
|
|
1408
|
+
includeInReport: boolean;
|
|
1409
|
+
persist: boolean;
|
|
1410
|
+
}>;
|
|
1411
|
+
type MergePlanDigest = Readonly<{
|
|
1412
|
+
algorithm: typeof MERGE_PLAN_DIGEST_ALGORITHM;
|
|
1413
|
+
value: string;
|
|
1414
|
+
}>;
|
|
1415
|
+
type MergePlanArtifactV1 = Readonly<{
|
|
1416
|
+
formatVersion: typeof MERGE_PLAN_FORMAT_VERSION;
|
|
1417
|
+
digest: MergePlanDigest;
|
|
1418
|
+
mode: "snapshot" | "incremental";
|
|
1419
|
+
target: MergePlanTargetFence;
|
|
1420
|
+
anchors: MergePlanAnchors;
|
|
1421
|
+
proposed: MergePlanProposedSummary;
|
|
1422
|
+
writes: MergePlanWrites;
|
|
1423
|
+
guards: MergePlanGuards;
|
|
1424
|
+
review: MergePlanReview;
|
|
1425
|
+
provenance: MergePlanProvenanceOptions;
|
|
946
1426
|
}>;
|
|
1427
|
+
/** Current public merge-plan artifact type. */
|
|
1428
|
+
type MergePlanArtifact = MergePlanArtifactV1;
|
|
1429
|
+
type MergePlanArtifactV1Input = Omit<MergePlanArtifactV1, "digest">;
|
|
947
1430
|
|
|
1431
|
+
/** Builds a durable, reviewable snapshot merge plan without mutating the target. */
|
|
1432
|
+
declare function planMerge<G extends GraphDef>(store: Store<G>, branchInputs: readonly MergeBranch<G>[], optionsInput?: MergeOptions<G>): Promise<Result<MergePlanArtifact, MergeError>>;
|
|
1433
|
+
/** Builds a durable, reviewable incremental merge plan without mutating the target. */
|
|
1434
|
+
declare function planMergeIncremental<G extends GraphDef>(args: MergeIncrementalArgs<G>): Promise<Result<MergePlanArtifact, MergeError>>;
|
|
1435
|
+
/** Validates and atomically applies an approved serialized merge plan. */
|
|
1436
|
+
declare function applyMergePlan<G extends GraphDef>(target: Store<G>, input: MergePlanArtifact): Promise<Result<MergeReport<G>, MergeError>>;
|
|
948
1437
|
/**
|
|
949
1438
|
* Merges a set of branches back into a target store (design §7.2).
|
|
950
1439
|
*
|
|
@@ -969,7 +1458,7 @@ type CandidatePair<K extends NodeType = NodeType> = Readonly<{
|
|
|
969
1458
|
* report and committed graph are identical across any permutation.
|
|
970
1459
|
* @param optionsInput Caller-facing {@link MergeOptions}; normalized internally.
|
|
971
1460
|
*/
|
|
972
|
-
declare function merge<G extends GraphDef>(store: Store<G>,
|
|
1461
|
+
declare function merge<G extends GraphDef>(store: Store<G>, branchInputs: readonly MergeBranch<G>[], optionsInput?: MergeOptions<G>): Promise<Result<MergeReport<G>, MergeError>>;
|
|
973
1462
|
/**
|
|
974
1463
|
* Incremental merge — the public fork-point-vs-live-target entry point (design
|
|
975
1464
|
* §6.4-B / §6.6). It treats `forkPoint` as the immutable ancestor, folds the live
|
|
@@ -1042,6 +1531,7 @@ type NormalizedMergeOptions<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
1042
1531
|
target?: MergeOptions<G>["target"];
|
|
1043
1532
|
maxComparisonsPerKind?: number;
|
|
1044
1533
|
clusterMaxDiameter?: number;
|
|
1534
|
+
candidateDiagnostics?: CandidateDiagnosticsOptions;
|
|
1045
1535
|
branchOrder?: readonly BranchId[];
|
|
1046
1536
|
provenanceWeights?: ReadonlyMap<BranchId, number>;
|
|
1047
1537
|
}>;
|
|
@@ -1196,6 +1686,8 @@ type BaseMember = Readonly<{
|
|
|
1196
1686
|
kind: string;
|
|
1197
1687
|
props: Readonly<Record<string, JsonValue>>;
|
|
1198
1688
|
origin: "base";
|
|
1689
|
+
validFrom?: string;
|
|
1690
|
+
validTo?: string;
|
|
1199
1691
|
}>;
|
|
1200
1692
|
/**
|
|
1201
1693
|
* What a candidate source emits for one kind: fuzzy `pairs` to score, FORCED
|
|
@@ -1280,4 +1772,4 @@ type KeylessConfig = Readonly<{
|
|
|
1280
1772
|
sortFields: readonly string[];
|
|
1281
1773
|
}>;
|
|
1282
1774
|
|
|
1283
|
-
export { type BaseAmbiguity, type BaseNodeLookup, type BaseVersion, BaseVersionMismatchError, BranchError, type BranchId, type BranchOptions, type BranchProvenance, type CandidateSource, type ComparisonCeilingPolicy, type ConflictingValue, type DeleteModifyConflict, type DeleteModifyPolicy, type DroppedItem, type Embedder, type EntityResolution, type GraphBranch, IdentityMergeConflictError, InvalidMergeOptionsError, type KeylessConfig, MERGE_ERROR_CODES, MERGE_OPTION_DEFAULTS, type MakeBackend, MergeConflictError, MergeError, type MergeIncrementalArgs, type MergeOptions, type MergeReport, type MergedCounts, type NormalizedMergeOptions, type PropertyConflict, type PropertyConflictPolicy, type ProvenanceGraph, type ProvenanceIndex, type ProvenanceNode, type ProvenanceQuery, type ProvenanceRecord, type ReconcileTypesMode, type ResolveConfig, type ResolveMap, type ResolvedCluster, Result, type SimilarityStrategy, SimilarityUnavailableError, type SourceScope, type TypeReconciliation, VALIDITY_END_TARGET_PRECEDENCE, type ValidityEndResolution, type WorkingCopyStrategy, asBaseVersion, asBranchId, branch, cloneWorkingCopyStrategy, computeBaseVersion, merge, mergeIncremental, normalizeMergeOptions, openProvenanceStore, persistProvenanceRecords, provenanceGraphId, readProvenance };
|
|
1775
|
+
export { type BaseAmbiguity, type BaseNodeLookup, type BaseVersion, BaseVersionMismatchError, BranchError, type BranchId, type BranchOptions, type BranchProvenance, type CandidateDiagnostic, type CandidateDiagnostics, type CandidateDiagnosticsOptions, type CandidateSource, CandidateSourceError, type ComparisonCeilingPolicy, type ConflictingValue, type DeleteModifyConflict, type DeleteModifyPolicy, type DroppedItem, type Embedder, type EntityRef, type EntityResolution, type GraphBranch, IdentityMergeConflictError, type IngestionBranch, type IngestionNodeCollections, InvalidMergeOptionsError, InvalidMergePlanError, type KeylessConfig, MERGE_ERROR_CODES, MERGE_OPTION_DEFAULTS, MERGE_PLAN_DIGEST_ALGORITHM, MERGE_PLAN_FORMAT_VERSION, type MakeBackend, type MatchEvidence, MatchEvidenceError, type MatchSource, type MatchStrategy, type MergeBranch, MergeConflictError, MergeConstraintConflictError, type MergeConstraintConflictErrorDetails, MergeError, type MergeIncrementalArgs, type MergeOptions, type MergePlanAnchors, type MergePlanArtifact, type MergePlanArtifactV1, type MergePlanArtifactV1Input, type MergePlanBranchAnchor, type MergePlanCandidateDiagnostic, type MergePlanCanonicalMapping, MergePlanCapabilityError, type MergePlanDiagnostics, type MergePlanDigest, MergePlanDigestMismatchError, type MergePlanEdgeDelete, type MergePlanEdgeUpsert, type MergePlanEntityRef, type MergePlanEntityResolution, type MergePlanGuards, type MergePlanIdentityAssertion, type MergePlanMatchEvidence, type MergePlanMatchSource, type MergePlanNodeDelete, type MergePlanNodeUpsert, MergePlanOriginMismatchError, type MergePlanProposedSummary, type MergePlanProvenanceOptions, type MergePlanRetype, type MergePlanReview, type MergePlanRevisionFence, type MergePlanSchemaFence, MergePlanSchemaMismatchError, type MergePlanSimilarityStrategy, type MergePlanTargetFence, MergePlanTargetMismatchError, type MergePlanTypeReconciliation, type MergePlanWrites, MergePlanningStaleError, type MergeReport, type MergedCounts, type NormalizedMergeOptions, type PropertyConflict, type PropertyConflictPolicy, type ProvenanceGraph, type ProvenanceIndex, type ProvenanceNode, type ProvenanceQuery, type ProvenanceRecord, type ReconcileTypesMode, type ResolveConfig, type ResolveMap, type ResolvedCluster, Result, type SimilarityStrategy, SimilarityUnavailableError, type SourceScope, StaleMergePlanError, type TypeReconciliation, UnsupportedMergePlanVersionError, VALIDITY_END_TARGET_PRECEDENCE, type ValidityEndResolution, type WorkingCopyStrategy, applyMergePlan, asBaseVersion, asBranchId, branch, cloneWorkingCopyStrategy, computeBaseVersion, ingestionBranch, merge, mergeIncremental, normalizeMergeOptions, openProvenanceStore, persistProvenanceRecords, planMerge, planMergeIncremental, provenanceGraphId, readProvenance };
|