@nicia-ai/typegraph 0.34.0 → 0.35.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/dist/backend/postgres/index.cjs +29 -29
- package/dist/backend/postgres/index.d.cts +39 -7
- package/dist/backend/postgres/index.d.ts +39 -7
- package/dist/backend/postgres/index.js +16 -16
- package/dist/backend/postgres/pglite.cjs +21 -21
- package/dist/backend/postgres/pglite.d.cts +4 -4
- package/dist/backend/postgres/pglite.d.ts +4 -4
- package/dist/backend/postgres/pglite.js +16 -16
- package/dist/backend/sqlite/index.cjs +25 -26
- package/dist/backend/sqlite/index.d.cts +8 -8
- package/dist/backend/sqlite/index.d.ts +8 -8
- package/dist/backend/sqlite/index.js +13 -14
- package/dist/backend/sqlite/libsql.cjs +19 -19
- package/dist/backend/sqlite/libsql.d.cts +4 -4
- package/dist/backend/sqlite/libsql.d.ts +4 -4
- package/dist/backend/sqlite/libsql.js +15 -15
- package/dist/backend/sqlite/local.cjs +101 -21
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +95 -5
- package/dist/backend/sqlite/local.d.ts +95 -5
- package/dist/backend/sqlite/local.js +95 -16
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-ZV5N4DBG.js → chunk-3TWF3SH4.js} +300 -58
- package/dist/chunk-3TWF3SH4.js.map +1 -0
- package/dist/chunk-4JEZZJ6S.cjs +1271 -0
- package/dist/chunk-4JEZZJ6S.cjs.map +1 -0
- package/dist/{chunk-UNNPKQUG.cjs → chunk-4TOD4LBZ.cjs} +246 -155
- package/dist/chunk-4TOD4LBZ.cjs.map +1 -0
- package/dist/{chunk-QV245VMN.js → chunk-55MZDDZV.js} +100 -6
- package/dist/chunk-55MZDDZV.js.map +1 -0
- package/dist/{chunk-GQANNXXT.cjs → chunk-5A6FNS6N.cjs} +75 -20
- package/dist/chunk-5A6FNS6N.cjs.map +1 -0
- package/dist/{chunk-3Z6TW3CT.cjs → chunk-5AQIKK56.cjs} +65 -25
- package/dist/chunk-5AQIKK56.cjs.map +1 -0
- package/dist/{chunk-BVTWD66D.js → chunk-5SEGFTZX.js} +3 -3
- package/dist/{chunk-BVTWD66D.js.map → chunk-5SEGFTZX.js.map} +1 -1
- package/dist/{chunk-6GNSY7AV.js → chunk-6FR2MMS6.js} +7 -7
- package/dist/chunk-6FR2MMS6.js.map +1 -0
- package/dist/chunk-7YSP4V4R.cjs +69 -0
- package/dist/chunk-7YSP4V4R.cjs.map +1 -0
- package/dist/chunk-A42GCBGX.cjs +28 -0
- package/dist/chunk-A42GCBGX.cjs.map +1 -0
- package/dist/{chunk-RHZWOJVA.cjs → chunk-BLZDPRXT.cjs} +52 -4
- package/dist/chunk-BLZDPRXT.cjs.map +1 -0
- package/dist/chunk-BYPOGQWK.js +25 -0
- package/dist/chunk-BYPOGQWK.js.map +1 -0
- package/dist/{chunk-6HVOHZHS.cjs → chunk-CK5BVQOW.cjs} +213 -168
- package/dist/chunk-CK5BVQOW.cjs.map +1 -0
- package/dist/{chunk-JJRCLAUN.cjs → chunk-CTTSDJLY.cjs} +116 -10
- package/dist/chunk-CTTSDJLY.cjs.map +1 -0
- package/dist/chunk-CUHM5CWJ.cjs +12 -0
- package/dist/chunk-CUHM5CWJ.cjs.map +1 -0
- package/dist/{chunk-A7SZZFAG.js → chunk-CZQ3FO2Q.js} +409 -99
- package/dist/chunk-CZQ3FO2Q.js.map +1 -0
- package/dist/{chunk-2JXB3NYJ.cjs → chunk-D7ZEOS56.cjs} +25 -32
- package/dist/chunk-D7ZEOS56.cjs.map +1 -0
- package/dist/chunk-DFVLCOP6.js +10 -0
- package/dist/chunk-DFVLCOP6.js.map +1 -0
- package/dist/{chunk-UJLOZYKT.cjs → chunk-EM3CWPND.cjs} +441 -115
- package/dist/chunk-EM3CWPND.cjs.map +1 -0
- package/dist/chunk-EMF62TZG.cjs +1176 -0
- package/dist/chunk-EMF62TZG.cjs.map +1 -0
- package/dist/chunk-EOLERH7Y.cjs +40 -0
- package/dist/chunk-EOLERH7Y.cjs.map +1 -0
- package/dist/{chunk-TGJE22RM.cjs → chunk-FACJJWGF.cjs} +24 -6
- package/dist/chunk-FACJJWGF.cjs.map +1 -0
- package/dist/{chunk-HK5SATYM.cjs → chunk-FL472AMI.cjs} +16 -109
- package/dist/chunk-FL472AMI.cjs.map +1 -0
- package/dist/{chunk-WVC2Q2FD.cjs → chunk-FN35DLCN.cjs} +31 -9
- package/dist/chunk-FN35DLCN.cjs.map +1 -0
- package/dist/{chunk-KUTNI6SI.js → chunk-FPIZFYHE.js} +10 -18
- package/dist/chunk-FPIZFYHE.js.map +1 -0
- package/dist/{chunk-VCGO4V26.js → chunk-FRV5Q5IO.js} +64 -9
- package/dist/chunk-FRV5Q5IO.js.map +1 -0
- package/dist/{chunk-K5P5OZXS.js → chunk-G6Q5UM7U.js} +2 -2
- package/dist/{chunk-K5P5OZXS.js.map → chunk-G6Q5UM7U.js.map} +1 -1
- package/dist/chunk-GSQ6NPH6.cjs +100 -0
- package/dist/chunk-GSQ6NPH6.cjs.map +1 -0
- package/dist/chunk-GUR2FNB5.cjs +12 -0
- package/dist/{chunk-HMFK4BXR.cjs.map → chunk-GUR2FNB5.cjs.map} +1 -1
- package/dist/{chunk-JQGIPGVL.cjs → chunk-H7YNSMA7.cjs} +43 -2
- package/dist/chunk-H7YNSMA7.cjs.map +1 -0
- package/dist/{chunk-2MRAX3UE.js → chunk-I7ZUZKFD.js} +47 -4
- package/dist/chunk-I7ZUZKFD.js.map +1 -0
- package/dist/{chunk-3BRVBQQD.cjs → chunk-J7WFGBJR.cjs} +2445 -2367
- package/dist/chunk-J7WFGBJR.cjs.map +1 -0
- package/dist/{chunk-V3QNTB7Z.js → chunk-JBTOYDMN.js} +194 -114
- package/dist/chunk-JBTOYDMN.js.map +1 -0
- package/dist/{chunk-K2TGS3EN.js → chunk-K3PPLHY7.js} +138 -89
- package/dist/chunk-K3PPLHY7.js.map +1 -0
- package/dist/{chunk-Z5XBMDXU.js → chunk-KBGQIPRQ.js} +42 -3
- package/dist/chunk-KBGQIPRQ.js.map +1 -0
- package/dist/chunk-KMI7LYAF.js +1252 -0
- package/dist/chunk-KMI7LYAF.js.map +1 -0
- package/dist/{chunk-JIEJCTDS.cjs → chunk-LGEALRC6.cjs} +21 -4
- package/dist/chunk-LGEALRC6.cjs.map +1 -0
- package/dist/{chunk-TQOYM4LN.js → chunk-MP2JQKSG.js} +21 -5
- package/dist/chunk-MP2JQKSG.js.map +1 -0
- package/dist/{chunk-ZP5WHI4C.cjs → chunk-O7UN7OXA.cjs} +358 -116
- package/dist/chunk-O7UN7OXA.cjs.map +1 -0
- package/dist/chunk-OHMP6N2J.js +47 -0
- package/dist/chunk-OHMP6N2J.js.map +1 -0
- package/dist/{chunk-4DIBPQNJ.js → chunk-OR5ZA5WP.js} +135 -25
- package/dist/chunk-OR5ZA5WP.js.map +1 -0
- package/dist/{chunk-DEQFL35G.js → chunk-Q5TEXCTB.js} +61 -7
- package/dist/chunk-Q5TEXCTB.js.map +1 -0
- package/dist/chunk-QNKSQTKQ.js +1312 -0
- package/dist/chunk-QNKSQTKQ.js.map +1 -0
- package/dist/{chunk-ZURTTSCM.js → chunk-QOTI55H7.js} +6 -94
- package/dist/chunk-QOTI55H7.js.map +1 -0
- package/dist/{chunk-CHXTTSC6.js → chunk-QWEUYILR.js} +104 -5
- package/dist/chunk-QWEUYILR.js.map +1 -0
- package/dist/{chunk-LANHCOXB.js → chunk-RGP33ZJ5.js} +485 -83
- package/dist/chunk-RGP33ZJ5.js.map +1 -0
- package/dist/chunk-RGPG7EOJ.js +94 -0
- package/dist/chunk-RGPG7EOJ.js.map +1 -0
- package/dist/{chunk-G6SOJEDI.cjs → chunk-S55OV6PW.cjs} +15 -15
- package/dist/chunk-S55OV6PW.cjs.map +1 -0
- package/dist/{chunk-3E7SNSIA.cjs → chunk-SJDMVITW.cjs} +4 -4
- package/dist/{chunk-3E7SNSIA.cjs.map → chunk-SJDMVITW.cjs.map} +1 -1
- package/dist/{chunk-XLUNB2TZ.js → chunk-SNXVDZAJ.js} +3 -3
- package/dist/{chunk-XLUNB2TZ.js.map → chunk-SNXVDZAJ.js.map} +1 -1
- package/dist/{chunk-RBV7YCQD.js → chunk-T2WUSPDA.js} +49 -9
- package/dist/chunk-T2WUSPDA.js.map +1 -0
- package/dist/{chunk-KGC4LY5T.cjs → chunk-TCOCYN2P.cjs} +75 -21
- package/dist/chunk-TCOCYN2P.cjs.map +1 -0
- package/dist/{chunk-FLRCVI2G.cjs → chunk-TDXIBCGY.cjs} +2 -2
- package/dist/{chunk-FLRCVI2G.cjs.map → chunk-TDXIBCGY.cjs.map} +1 -1
- package/dist/{chunk-ZY4GXIVN.cjs → chunk-TEDRJXOG.cjs} +5 -5
- package/dist/{chunk-ZY4GXIVN.cjs.map → chunk-TEDRJXOG.cjs.map} +1 -1
- package/dist/{chunk-WLRIWYHQ.js → chunk-UES55P7G.js} +1863 -1785
- package/dist/chunk-UES55P7G.js.map +1 -0
- package/dist/{chunk-WL2SG7ZV.cjs → chunk-UMDVATGY.cjs} +6 -6
- package/dist/{chunk-WL2SG7ZV.cjs.map → chunk-UMDVATGY.cjs.map} +1 -1
- package/dist/chunk-UT3S4SEN.js +31 -0
- package/dist/chunk-UT3S4SEN.js.map +1 -0
- package/dist/{chunk-RRKQAKD6.cjs → chunk-UUT7UN2N.cjs} +149 -39
- package/dist/chunk-UUT7UN2N.cjs.map +1 -0
- package/dist/{chunk-SHLY4MCM.js → chunk-UZV3AZKF.js} +21 -3
- package/dist/chunk-UZV3AZKF.js.map +1 -0
- package/dist/{chunk-CYX2JTDG.js → chunk-VHMPG6UL.js} +29 -7
- package/dist/chunk-VHMPG6UL.js.map +1 -0
- package/dist/{chunk-T6SPUYLX.cjs → chunk-VPYHY3LJ.cjs} +116 -10
- package/dist/chunk-VPYHY3LJ.cjs.map +1 -0
- package/dist/{chunk-T46GR2VY.js → chunk-VSPCZAXF.js} +3 -3
- package/dist/{chunk-T46GR2VY.js.map → chunk-VSPCZAXF.js.map} +1 -1
- package/dist/{chunk-K34OPSJK.js → chunk-W63OVYY4.js} +3 -3
- package/dist/{chunk-K34OPSJK.js.map → chunk-W63OVYY4.js.map} +1 -1
- package/dist/{chunk-RY2VIWAM.js → chunk-WDBCBWC4.js} +355 -32
- package/dist/chunk-WDBCBWC4.js.map +1 -0
- package/dist/chunk-WJT7OU7E.cjs +1334 -0
- package/dist/chunk-WJT7OU7E.cjs.map +1 -0
- package/dist/{chunk-5IQIX7LU.cjs → chunk-XOX22WHL.cjs} +476 -163
- package/dist/chunk-XOX22WHL.cjs.map +1 -0
- package/dist/{ddl-BrmPg61z.d.ts → ddl-C2rZ-Aen.d.ts} +4 -4
- package/dist/{ddl-j1-sH6lE.d.cts → ddl-CZz7a0E8.d.cts} +4 -4
- package/dist/{extension-types-YGFJPrzK.d.cts → extension-types-ixRpJVUp.d.cts} +24 -1
- package/dist/{extension-types-YGFJPrzK.d.ts → extension-types-ixRpJVUp.d.ts} +24 -1
- package/dist/{types-DkNnF-7K.d.cts → fulltext-strategy-B57yvC5Q.d.ts} +2562 -2133
- package/dist/{types-D1Sqeyxy.d.ts → fulltext-strategy-CDkSSYhq.d.cts} +2562 -2133
- package/dist/graph-extension/index.cjs +20 -19
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +5 -4
- package/dist/graph-merge/index.cjs +255 -164
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +63 -33
- package/dist/graph-merge/index.d.ts +63 -33
- package/dist/graph-merge/index.js +135 -44
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-DGX6D9j1.d.ts → index-6CSUAq-x.d.ts} +234 -93
- package/dist/{index-SEvUHDA6.d.cts → index-Bks_3HHK.d.cts} +234 -93
- package/dist/index.cjs +208 -188
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +33 -33
- package/dist/indexes/index.cjs +19 -20
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +10 -11
- package/dist/interchange/index.cjs +47 -26
- package/dist/interchange/index.d.cts +126 -12
- package/dist/interchange/index.d.ts +126 -12
- package/dist/interchange/index.js +14 -13
- package/dist/{manager-ms9cKdc6.d.cts → manager-DwQi8eV0.d.cts} +9 -2
- package/dist/{manager-BZUeN_BU.d.ts → manager-ejUCB52T.d.ts} +9 -2
- package/dist/{materialize-indexes-D20xNluI.d.cts → materialize-indexes-B4e9360H.d.cts} +20 -4
- package/dist/{materialize-indexes-CAkIYFV-.d.ts → materialize-indexes-te9TPMMJ.d.ts} +20 -4
- package/dist/{postgres-BhpxGMC5.d.cts → postgres-CfEqsRMp.d.cts} +152 -1
- package/dist/{postgres-CWHLwNl1.d.ts → postgres-DQ5R6rzV.d.ts} +152 -1
- package/dist/profiler/index.cjs +11 -11
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/profiler/index.js +4 -4
- package/dist/provenance/index.cjs +40 -41
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +5 -5
- package/dist/provenance/index.d.ts +5 -5
- package/dist/provenance/index.js +11 -12
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +53 -40
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +57 -57
- package/dist/schema/index.d.ts +57 -57
- package/dist/schema/index.js +28 -15
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-XrDxNaa7.d.cts → sqlite-D7zBinNR.d.cts} +92 -1
- package/dist/{sqlite-CGu5SLsw.d.ts → sqlite-DvQndLky.d.ts} +92 -1
- package/dist/{store-view-D09po4H6.d.cts → store-view-BSpqvAxK.d.cts} +415 -44
- package/dist/{store-view-BlgnhEYf.d.ts → store-view-CKbHFRnn.d.ts} +415 -44
- package/dist/{types-DiE1AO7p.d.cts → types-Bv9DcS_E.d.cts} +2 -2
- package/dist/{types-B1TbZJYS.d.ts → types-CoxuV7EJ.d.ts} +2 -2
- package/dist/{where-DKjuofPr.d.cts → where-7RKFOsXt.d.ts} +2 -2
- package/dist/{where-DrUIIWHb.d.ts → where-DdMIXOtH.d.cts} +2 -2
- package/package.json +14 -13
- package/dist/chunk-2EBMPJBO.js +0 -16
- package/dist/chunk-2EBMPJBO.js.map +0 -1
- package/dist/chunk-2JXB3NYJ.cjs.map +0 -1
- package/dist/chunk-2MRAX3UE.js.map +0 -1
- package/dist/chunk-3BRVBQQD.cjs.map +0 -1
- package/dist/chunk-3EUKJEQ3.js +0 -77
- package/dist/chunk-3EUKJEQ3.js.map +0 -1
- package/dist/chunk-3Z6TW3CT.cjs.map +0 -1
- package/dist/chunk-4DIBPQNJ.js.map +0 -1
- package/dist/chunk-4S2FXGBJ.js +0 -9
- package/dist/chunk-4S2FXGBJ.js.map +0 -1
- package/dist/chunk-5IQIX7LU.cjs.map +0 -1
- package/dist/chunk-6GNSY7AV.js.map +0 -1
- package/dist/chunk-6HVOHZHS.cjs.map +0 -1
- package/dist/chunk-6SCVW4AS.js +0 -20
- package/dist/chunk-6SCVW4AS.js.map +0 -1
- package/dist/chunk-A7SZZFAG.js.map +0 -1
- package/dist/chunk-CHXTTSC6.js.map +0 -1
- package/dist/chunk-CYX2JTDG.js.map +0 -1
- package/dist/chunk-DEQFL35G.js.map +0 -1
- package/dist/chunk-G6SOJEDI.cjs.map +0 -1
- package/dist/chunk-GQANNXXT.cjs.map +0 -1
- package/dist/chunk-GZCNZ7QW.js +0 -24
- package/dist/chunk-GZCNZ7QW.js.map +0 -1
- package/dist/chunk-HK5SATYM.cjs.map +0 -1
- package/dist/chunk-HMFK4BXR.cjs +0 -12
- package/dist/chunk-HTGDWIDE.cjs +0 -89
- package/dist/chunk-HTGDWIDE.cjs.map +0 -1
- package/dist/chunk-JIEJCTDS.cjs.map +0 -1
- package/dist/chunk-JJRCLAUN.cjs.map +0 -1
- package/dist/chunk-JQGIPGVL.cjs.map +0 -1
- package/dist/chunk-K2TGS3EN.js.map +0 -1
- package/dist/chunk-KGC4LY5T.cjs.map +0 -1
- package/dist/chunk-KNHYNQQ3.cjs +0 -663
- package/dist/chunk-KNHYNQQ3.cjs.map +0 -1
- package/dist/chunk-KUTNI6SI.js.map +0 -1
- package/dist/chunk-LANHCOXB.js.map +0 -1
- package/dist/chunk-N6WTUSBV.cjs +0 -23
- package/dist/chunk-N6WTUSBV.cjs.map +0 -1
- package/dist/chunk-NAUA4PW5.cjs +0 -28
- package/dist/chunk-NAUA4PW5.cjs.map +0 -1
- package/dist/chunk-QV245VMN.js.map +0 -1
- package/dist/chunk-RBV7YCQD.js.map +0 -1
- package/dist/chunk-RHZWOJVA.cjs.map +0 -1
- package/dist/chunk-RRKQAKD6.cjs.map +0 -1
- package/dist/chunk-RY2VIWAM.js.map +0 -1
- package/dist/chunk-SHLY4MCM.js.map +0 -1
- package/dist/chunk-T2DWPQNE.js +0 -649
- package/dist/chunk-T2DWPQNE.js.map +0 -1
- package/dist/chunk-T6SPUYLX.cjs.map +0 -1
- package/dist/chunk-TGJE22RM.cjs.map +0 -1
- package/dist/chunk-TOTPVGOG.cjs +0 -774
- package/dist/chunk-TOTPVGOG.cjs.map +0 -1
- package/dist/chunk-TQOYM4LN.js.map +0 -1
- package/dist/chunk-UJLOZYKT.cjs.map +0 -1
- package/dist/chunk-UNNPKQUG.cjs.map +0 -1
- package/dist/chunk-V3QNTB7Z.js.map +0 -1
- package/dist/chunk-VCGO4V26.js.map +0 -1
- package/dist/chunk-WLRIWYHQ.js.map +0 -1
- package/dist/chunk-WVC2Q2FD.cjs.map +0 -1
- package/dist/chunk-XXVEULWX.js +0 -39
- package/dist/chunk-XXVEULWX.js.map +0 -1
- package/dist/chunk-YAZE7QZR.cjs +0 -32
- package/dist/chunk-YAZE7QZR.cjs.map +0 -1
- package/dist/chunk-YC6PWTHY.cjs +0 -44
- package/dist/chunk-YC6PWTHY.cjs.map +0 -1
- package/dist/chunk-Z5HBYM7U.cjs +0 -11
- package/dist/chunk-Z5HBYM7U.cjs.map +0 -1
- package/dist/chunk-Z5XBMDXU.js.map +0 -1
- package/dist/chunk-ZP5WHI4C.cjs.map +0 -1
- package/dist/chunk-ZURTTSCM.js.map +0 -1
- package/dist/chunk-ZV5N4DBG.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { canonicalEqual, sortedReplacer } from './chunk-UR7W5YQK.js';
|
|
2
|
-
import { NODE_TYPE_BRAND, EDGE_TYPE_BRAND, getNodeKinds, getEdgeKinds, autoDeriveVectorIndexes, mergeVectorIndexes } from './chunk-
|
|
3
|
-
import { defineNodeIndex, defineEdgeIndex } from './chunk-
|
|
4
|
-
import { sha256Hex } from './chunk-
|
|
5
|
-
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, assertJsonValue, isReachable,
|
|
6
|
-
import {
|
|
7
|
-
import { isMissingTableError } from './chunk-
|
|
8
|
-
import { embedding, searchable } from './chunk-
|
|
2
|
+
import { NODE_TYPE_BRAND, EDGE_TYPE_BRAND, getNodeKinds, getEdgeKinds, autoDeriveVectorIndexes, mergeVectorIndexes } from './chunk-QWEUYILR.js';
|
|
3
|
+
import { defineNodeIndex, defineEdgeIndex } from './chunk-OR5ZA5WP.js';
|
|
4
|
+
import { sha256Hex } from './chunk-W63OVYY4.js';
|
|
5
|
+
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, assertJsonValue, isReachable, LEGACY_GRAPH_EXTENSION_VERSION, unwrap, validateGraphExtension, KindCollisionError, GraphExtensionUnresolvedEndpointError, computeTransitiveClosure, invertClosure } from './chunk-QOTI55H7.js';
|
|
6
|
+
import { assertSchemaKeysAreFree, RESERVED_NODE_KEYS, RESERVED_EDGE_KEYS } from './chunk-RGPG7EOJ.js';
|
|
7
|
+
import { nowIso, isMissingTableError } from './chunk-I7ZUZKFD.js';
|
|
8
|
+
import { embedding, searchable } from './chunk-KBGQIPRQ.js';
|
|
9
9
|
import { compactUndefined, freezeDeep } from './chunk-ITE4IXAK.js';
|
|
10
|
-
import { ConfigurationError, KindNotFoundError, DatabaseOperationError, MigrationError
|
|
10
|
+
import { ConfigurationError, KindNotFoundError, DatabaseOperationError, MigrationError } from './chunk-MP2JQKSG.js';
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
|
|
13
13
|
// src/core/node.ts
|
|
@@ -1025,6 +1025,17 @@ var KindRegistry = class {
|
|
|
1025
1025
|
if (concreteKind === targetKind) return true;
|
|
1026
1026
|
return this.isSubClassOf(concreteKind, targetKind);
|
|
1027
1027
|
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Checks if a concrete kind is assignable to at least one of the given
|
|
1030
|
+
* target kinds. Shared by every "is this kind usable where one of these
|
|
1031
|
+
* kinds is expected" check (edge endpoint validation, ontology relation
|
|
1032
|
+
* endpoint compatibility) so they can't independently drift.
|
|
1033
|
+
*/
|
|
1034
|
+
isAssignableToAny(concreteKind, targetKinds) {
|
|
1035
|
+
return targetKinds.some(
|
|
1036
|
+
(targetKind) => this.isAssignableTo(concreteKind, targetKind)
|
|
1037
|
+
);
|
|
1038
|
+
}
|
|
1028
1039
|
/**
|
|
1029
1040
|
* Validates that a kind exists in the registry.
|
|
1030
1041
|
*/
|
|
@@ -1312,6 +1323,16 @@ function serializeNodeIndexDeclaration(declaration) {
|
|
|
1312
1323
|
unique: declaration.unique,
|
|
1313
1324
|
scope: declaration.scope,
|
|
1314
1325
|
where: declaration.where,
|
|
1326
|
+
// `method: "btree"` is canonicalized by absence, like `origin` below.
|
|
1327
|
+
...declaration.method === void 0 ? {} : { method: declaration.method },
|
|
1328
|
+
// `keySystemColumns: []` is canonicalized by absence, same rule. Checked
|
|
1329
|
+
// against length, not just `undefined` — `NodeIndexDeclaration` is
|
|
1330
|
+
// exported and `defineGraph` accepts pre-built declarations directly
|
|
1331
|
+
// (bypassing `defineNodeIndex`'s own canonicalization and the
|
|
1332
|
+
// `nodeIndexDeclarationZod` parse boundary, which rejects an explicit
|
|
1333
|
+
// `[]` via `.min(1)`), so an in-memory declaration can still carry a
|
|
1334
|
+
// present-but-empty array that must canonicalize to absent here.
|
|
1335
|
+
...declaration.keySystemColumns === void 0 || declaration.keySystemColumns.length === 0 ? {} : { keySystemColumns: declaration.keySystemColumns },
|
|
1315
1336
|
// `origin: "compile-time"` is the default and is omitted from the
|
|
1316
1337
|
// canonical form (absence == compile-time). Only `runtime` is
|
|
1317
1338
|
// emitted explicitly so the restart loader can route the declaration
|
|
@@ -1332,6 +1353,8 @@ function serializeEdgeIndexDeclaration(declaration) {
|
|
|
1332
1353
|
unique: declaration.unique,
|
|
1333
1354
|
scope: declaration.scope,
|
|
1334
1355
|
where: declaration.where,
|
|
1356
|
+
// `method: "btree"` is canonicalized by absence, like `origin`.
|
|
1357
|
+
...declaration.method === void 0 ? {} : { method: declaration.method },
|
|
1335
1358
|
...declaration.origin === "runtime" ? { origin: "runtime" } : {}
|
|
1336
1359
|
};
|
|
1337
1360
|
}
|
|
@@ -1507,11 +1530,7 @@ function mapToRecord(map) {
|
|
|
1507
1530
|
return result;
|
|
1508
1531
|
}
|
|
1509
1532
|
function mapToSimpleRecord(map) {
|
|
1510
|
-
|
|
1511
|
-
for (const [key, value] of map) {
|
|
1512
|
-
result[key] = value;
|
|
1513
|
-
}
|
|
1514
|
-
return result;
|
|
1533
|
+
return Object.fromEntries(map);
|
|
1515
1534
|
}
|
|
1516
1535
|
var SCHEMA_PROPERTIES_CACHE = /* @__PURE__ */ new WeakMap();
|
|
1517
1536
|
function serializeSchemaProperties(schema) {
|
|
@@ -2075,6 +2094,94 @@ function resolveOntologyEndpoints(relation, nodeKinds) {
|
|
|
2075
2094
|
const to = typeof relation.to === "string" ? nodeKinds.get(relation.to) ?? relation.to : relation.to;
|
|
2076
2095
|
return { ...relation, from, to };
|
|
2077
2096
|
}
|
|
2097
|
+
|
|
2098
|
+
// src/registry/validate-implies.ts
|
|
2099
|
+
function validateImpliesEndpointCompatibility(edgeEndpoints, registry) {
|
|
2100
|
+
for (const [impliedEdgeKind, impliedEndpoints] of edgeEndpoints) {
|
|
2101
|
+
for (const implyingEdgeKind of registry.expandImplyingEdges(
|
|
2102
|
+
impliedEdgeKind
|
|
2103
|
+
)) {
|
|
2104
|
+
if (implyingEdgeKind === impliedEdgeKind) continue;
|
|
2105
|
+
const implyingEndpoints = edgeEndpoints.get(implyingEdgeKind);
|
|
2106
|
+
if (!implyingEndpoints) continue;
|
|
2107
|
+
assertEndpointCompatible(
|
|
2108
|
+
"from",
|
|
2109
|
+
implyingEdgeKind,
|
|
2110
|
+
implyingEndpoints.from,
|
|
2111
|
+
impliedEdgeKind,
|
|
2112
|
+
impliedEndpoints.from,
|
|
2113
|
+
registry
|
|
2114
|
+
);
|
|
2115
|
+
assertEndpointCompatible(
|
|
2116
|
+
"to",
|
|
2117
|
+
implyingEdgeKind,
|
|
2118
|
+
implyingEndpoints.to,
|
|
2119
|
+
impliedEdgeKind,
|
|
2120
|
+
impliedEndpoints.to,
|
|
2121
|
+
registry
|
|
2122
|
+
);
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
function assertEndpointCompatible(side, implyingEdgeKind, implyingKinds, impliedEdgeKind, impliedKinds, registry) {
|
|
2127
|
+
const incompatibleKinds = implyingKinds.filter(
|
|
2128
|
+
(kind) => !registry.isAssignableToAny(kind, impliedKinds)
|
|
2129
|
+
);
|
|
2130
|
+
if (incompatibleKinds.length === 0) return;
|
|
2131
|
+
throw new ConfigurationError(
|
|
2132
|
+
`implies("${implyingEdgeKind}", "${impliedEdgeKind}") is endpoint-incompatible: ${side} kind(s) [${incompatibleKinds.join(", ")}] declared on "${implyingEdgeKind}" cannot be assigned to any of "${impliedEdgeKind}"'s ${side} kind(s) [${impliedKinds.join(", ")}].`,
|
|
2133
|
+
{
|
|
2134
|
+
metaEdge: META_EDGE_IMPLIES,
|
|
2135
|
+
implyingEdge: implyingEdgeKind,
|
|
2136
|
+
impliedEdge: impliedEdgeKind,
|
|
2137
|
+
endpoint: side,
|
|
2138
|
+
incompatibleKinds,
|
|
2139
|
+
allowedKinds: impliedKinds
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
suggestion: `Add a subClassOf relation from each of [${incompatibleKinds.join(", ")}] to one of "${impliedEdgeKind}"'s ${side} kind(s) [${impliedKinds.join(", ")}], narrow "${implyingEdgeKind}"'s ${side} declaration to exclude [${incompatibleKinds.join(", ")}], or remove implies("${implyingEdgeKind}", "${impliedEdgeKind}").`
|
|
2143
|
+
}
|
|
2144
|
+
);
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
// src/registry/builders.ts
|
|
2148
|
+
function buildKindRegistry(graph) {
|
|
2149
|
+
const nodeTypes = extractNodeTypes(graph);
|
|
2150
|
+
const edgeTypes = extractEdgeTypes(graph);
|
|
2151
|
+
const closures = graph.ontology.length > 0 ? computeClosuresFromOntology(graph.ontology) : createEmptyClosures();
|
|
2152
|
+
const registry = new KindRegistry(nodeTypes, edgeTypes, closures);
|
|
2153
|
+
validateImpliesEndpointCompatibility(
|
|
2154
|
+
buildEdgeEndpointKinds(graph.edges),
|
|
2155
|
+
registry
|
|
2156
|
+
);
|
|
2157
|
+
return registry;
|
|
2158
|
+
}
|
|
2159
|
+
function buildEdgeEndpointKinds(edges) {
|
|
2160
|
+
const result = /* @__PURE__ */ new Map();
|
|
2161
|
+
for (const [kind, registration] of Object.entries(edges)) {
|
|
2162
|
+
result.set(kind, {
|
|
2163
|
+
from: registration.from.map((node) => node.kind),
|
|
2164
|
+
to: registration.to.map((node) => node.kind)
|
|
2165
|
+
});
|
|
2166
|
+
}
|
|
2167
|
+
return result;
|
|
2168
|
+
}
|
|
2169
|
+
function extractNodeTypes(graph) {
|
|
2170
|
+
const result = /* @__PURE__ */ new Map();
|
|
2171
|
+
for (const typeName of getNodeKinds(graph)) {
|
|
2172
|
+
const registration = graph.nodes[typeName];
|
|
2173
|
+
result.set(typeName, registration.type);
|
|
2174
|
+
}
|
|
2175
|
+
return result;
|
|
2176
|
+
}
|
|
2177
|
+
function extractEdgeTypes(graph) {
|
|
2178
|
+
const result = /* @__PURE__ */ new Map();
|
|
2179
|
+
for (const typeName of getEdgeKinds(graph)) {
|
|
2180
|
+
const registration = graph.edges[typeName];
|
|
2181
|
+
result.set(typeName, registration.type);
|
|
2182
|
+
}
|
|
2183
|
+
return result;
|
|
2184
|
+
}
|
|
2078
2185
|
var deleteBehaviorZod = z.enum(["restrict", "cascade", "disconnect"]);
|
|
2079
2186
|
var cardinalityZod = z.enum(["many", "one", "unique", "oneActive"]);
|
|
2080
2187
|
var endpointExistenceZod = z.enum(["notDeleted", "currentlyValid", "ever"]);
|
|
@@ -2124,6 +2231,12 @@ var systemColumnNameZod = z.enum([
|
|
|
2124
2231
|
"updated_at",
|
|
2125
2232
|
"version"
|
|
2126
2233
|
]);
|
|
2234
|
+
var nodeSystemColumnNameZod = systemColumnNameZod.exclude([
|
|
2235
|
+
"from_kind",
|
|
2236
|
+
"from_id",
|
|
2237
|
+
"to_kind",
|
|
2238
|
+
"to_id"
|
|
2239
|
+
]);
|
|
2127
2240
|
var indexWhereOperandZod = z.discriminatedUnion("__type", [
|
|
2128
2241
|
z.object({
|
|
2129
2242
|
__type: z.literal("index_operand_system"),
|
|
@@ -2200,7 +2313,13 @@ var indexDeclarationCommonShape = {
|
|
|
2200
2313
|
var nodeIndexDeclarationZod = z.object({
|
|
2201
2314
|
entity: z.literal("node"),
|
|
2202
2315
|
kind: z.string(),
|
|
2203
|
-
...indexDeclarationCommonShape
|
|
2316
|
+
...indexDeclarationCommonShape,
|
|
2317
|
+
// Node-only; canonicalized by absence like `method`, so absent/optional
|
|
2318
|
+
// here matches `defineNodeIndex` only emitting it when non-empty.
|
|
2319
|
+
// `.min(1)` rejects an explicit `[]` at the boundary rather than
|
|
2320
|
+
// silently accepting a present-but-empty array that would have to be
|
|
2321
|
+
// canonicalized away again downstream (see `serializeNodeIndexDeclaration`).
|
|
2322
|
+
keySystemColumns: z.array(nodeSystemColumnNameZod).min(1).optional()
|
|
2204
2323
|
}).loose();
|
|
2205
2324
|
var edgeIndexDeclarationZod = z.object({
|
|
2206
2325
|
entity: z.literal("edge"),
|
|
@@ -2599,6 +2718,7 @@ function schemaNotInitializedError(graphId, cause) {
|
|
|
2599
2718
|
);
|
|
2600
2719
|
}
|
|
2601
2720
|
async function initializeSchema(backend, graph) {
|
|
2721
|
+
buildKindRegistry(graph);
|
|
2602
2722
|
const schema = serializeSchema(graph, 1);
|
|
2603
2723
|
const hash = await computeSchemaHash(schema);
|
|
2604
2724
|
return backend.commitSchemaVersion({
|
|
@@ -2618,6 +2738,7 @@ async function migrateSchema(backend, graph, currentVersion) {
|
|
|
2618
2738
|
return committed.version;
|
|
2619
2739
|
}
|
|
2620
2740
|
async function commitNewSchemaVersion(backend, graph, currentVersion) {
|
|
2741
|
+
buildKindRegistry(graph);
|
|
2621
2742
|
const newVersion = currentVersion + 1;
|
|
2622
2743
|
const schema = serializeSchema(graph, newVersion);
|
|
2623
2744
|
const hash = await computeSchemaHash(schema);
|
|
@@ -2660,78 +2781,6 @@ async function getSchemaChanges(backend, graph) {
|
|
|
2660
2781
|
return computeSchemaDiff(storedSchema, currentSchema);
|
|
2661
2782
|
}
|
|
2662
2783
|
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
path: issue.path.join("."),
|
|
2667
|
-
message: issue.message,
|
|
2668
|
-
code: issue.code
|
|
2669
|
-
}));
|
|
2670
|
-
}
|
|
2671
|
-
function buildLocationString(context) {
|
|
2672
|
-
if (context.id) {
|
|
2673
|
-
return `${context.kind}/${context.id}`;
|
|
2674
|
-
}
|
|
2675
|
-
return `new ${context.kind}`;
|
|
2676
|
-
}
|
|
2677
|
-
function validateProps(schema, props, context) {
|
|
2678
|
-
const result = schema.safeParse(props);
|
|
2679
|
-
if (result.success) {
|
|
2680
|
-
return result.data;
|
|
2681
|
-
}
|
|
2682
|
-
const issues = zodIssuesToValidationIssues(result.error);
|
|
2683
|
-
const location = buildLocationString(context);
|
|
2684
|
-
throw new ValidationError(
|
|
2685
|
-
`Invalid ${context.entityType} props for ${location}: ${result.error.message}`,
|
|
2686
|
-
{
|
|
2687
|
-
entityType: context.entityType,
|
|
2688
|
-
kind: context.kind,
|
|
2689
|
-
operation: context.operation,
|
|
2690
|
-
...context.id !== void 0 && { id: context.id },
|
|
2691
|
-
issues
|
|
2692
|
-
},
|
|
2693
|
-
{ cause: result.error }
|
|
2694
|
-
);
|
|
2695
|
-
}
|
|
2696
|
-
function validateNodeProps(schema, props, context) {
|
|
2697
|
-
return validateProps(schema, props, {
|
|
2698
|
-
entityType: "node",
|
|
2699
|
-
...context
|
|
2700
|
-
});
|
|
2701
|
-
}
|
|
2702
|
-
function validateEdgeProps(schema, props, context) {
|
|
2703
|
-
return validateProps(schema, props, {
|
|
2704
|
-
entityType: "edge",
|
|
2705
|
-
...context
|
|
2706
|
-
});
|
|
2707
|
-
}
|
|
2708
|
-
function wrapZodError(error, context) {
|
|
2709
|
-
const issues = zodIssuesToValidationIssues(error);
|
|
2710
|
-
const location = buildLocationString(context);
|
|
2711
|
-
return new ValidationError(
|
|
2712
|
-
`Validation failed for ${context.entityType} ${location}: ${error.message}`,
|
|
2713
|
-
{
|
|
2714
|
-
entityType: context.entityType,
|
|
2715
|
-
kind: context.kind,
|
|
2716
|
-
operation: context.operation,
|
|
2717
|
-
...context.id !== void 0 && { id: context.id },
|
|
2718
|
-
issues
|
|
2719
|
-
},
|
|
2720
|
-
{ cause: error }
|
|
2721
|
-
);
|
|
2722
|
-
}
|
|
2723
|
-
function createValidationError(message, issues, context) {
|
|
2724
|
-
return new ValidationError(message, {
|
|
2725
|
-
...context?.entityType !== void 0 && {
|
|
2726
|
-
entityType: context.entityType
|
|
2727
|
-
},
|
|
2728
|
-
...context?.kind !== void 0 && { kind: context.kind },
|
|
2729
|
-
...context?.operation !== void 0 && { operation: context.operation },
|
|
2730
|
-
...context?.id !== void 0 && { id: context.id },
|
|
2731
|
-
issues
|
|
2732
|
-
});
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
export { KindRegistry, META_EDGE_BRAND, applyDeprecatedKinds, assertSchemaCurrent, broader, buildGraphExtensionOntologyKeySet, commitNewSchemaVersion, compileTimeOntologyKey, computeClosuresFromOntology, computeSchemaDiff, computeSchemaHash, core, createEmptyClosures, createValidationError, defineEdge, defineNode, deserializeWherePredicate, differentFrom, disjointWith, ensureSchema, equivalentTo, extensionKindNames, getActiveSchema, getMigrationActions, getSchemaChanges, getTypeName, hasPart, implies, initializeSchema, inverseOf, isBackwardsCompatible, isMetaEdge, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, loadAndVerifyGraph, mergeGraphExtension, migrateSchema, narrower, parseSerializedSchema, partOf, relatedTo, rollbackSchema, sameAs, serializeSchema, serializeSchemaProperties, subClassOf, validateEdgeProps, validateNodeProps, validateProps, wrapZodError };
|
|
2736
|
-
//# sourceMappingURL=chunk-K2TGS3EN.js.map
|
|
2737
|
-
//# sourceMappingURL=chunk-K2TGS3EN.js.map
|
|
2784
|
+
export { KindRegistry, META_EDGE_BRAND, applyDeprecatedKinds, assertSchemaCurrent, broader, buildGraphExtensionOntologyKeySet, buildKindRegistry, commitNewSchemaVersion, compileTimeOntologyKey, computeSchemaDiff, computeSchemaHash, core, defineEdge, defineNode, deserializeWherePredicate, differentFrom, disjointWith, ensureSchema, equivalentTo, extensionKindNames, getActiveSchema, getMigrationActions, getSchemaChanges, getTypeName, hasPart, implies, initializeSchema, inverseOf, isBackwardsCompatible, isMetaEdge, isSchemaInitialized, loadActiveSchemaWithBootstrap, loadAndMergeGraphExtensionDocument, loadAndVerifyGraph, mergeGraphExtension, migrateSchema, narrower, parseSerializedSchema, partOf, relatedTo, rollbackSchema, sameAs, serializeIndexDeclaration, serializeSchema, serializeSchemaProperties, subClassOf, validateImpliesEndpointCompatibility };
|
|
2785
|
+
//# sourceMappingURL=chunk-K3PPLHY7.js.map
|
|
2786
|
+
//# sourceMappingURL=chunk-K3PPLHY7.js.map
|