@nicia-ai/typegraph 0.33.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/README.md +20 -0
- package/dist/backend/postgres/index.cjs +30 -26
- package/dist/backend/postgres/index.d.cts +39 -7
- package/dist/backend/postgres/index.d.ts +39 -7
- package/dist/backend/postgres/index.js +17 -13
- package/dist/backend/postgres/pglite.cjs +22 -18
- package/dist/backend/postgres/pglite.cjs.map +1 -1
- package/dist/backend/postgres/pglite.d.cts +4 -4
- package/dist/backend/postgres/pglite.d.ts +4 -4
- package/dist/backend/postgres/pglite.js +17 -13
- package/dist/backend/postgres/pglite.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +26 -23
- package/dist/backend/sqlite/index.d.cts +8 -8
- package/dist/backend/sqlite/index.d.ts +8 -8
- package/dist/backend/sqlite/index.js +14 -11
- package/dist/backend/sqlite/libsql.cjs +21 -17
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +13 -6
- package/dist/backend/sqlite/libsql.d.ts +13 -6
- package/dist/backend/sqlite/libsql.js +17 -13
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +102 -18
- 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 +96 -13
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-JHOBXD7O.js → chunk-3TWF3SH4.js} +332 -64
- 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-I4W7MKVG.cjs → chunk-4TOD4LBZ.cjs} +249 -294
- package/dist/chunk-4TOD4LBZ.cjs.map +1 -0
- package/dist/chunk-55MZDDZV.js +239 -0
- package/dist/chunk-55MZDDZV.js.map +1 -0
- package/dist/{chunk-LM2IC4ZJ.cjs → chunk-5A6FNS6N.cjs} +75 -19
- package/dist/chunk-5A6FNS6N.cjs.map +1 -0
- package/dist/{chunk-FDN43KXV.cjs → chunk-5AQIKK56.cjs} +65 -24
- package/dist/chunk-5AQIKK56.cjs.map +1 -0
- package/dist/{chunk-IZ4PCL47.js → chunk-5SEGFTZX.js} +4 -66
- package/dist/chunk-5SEGFTZX.js.map +1 -0
- package/dist/{chunk-CWFPJ3RC.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-ACSVZPK7.cjs +21 -0
- package/dist/chunk-ACSVZPK7.cjs.map +1 -0
- package/dist/{chunk-OIE2UPVG.cjs → chunk-BLZDPRXT.cjs} +52 -21
- 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-NG5N7R45.cjs → chunk-CK5BVQOW.cjs} +325 -213
- package/dist/chunk-CK5BVQOW.cjs.map +1 -0
- package/dist/chunk-CTTSDJLY.cjs +261 -0
- 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-CZQ3FO2Q.js +2320 -0
- package/dist/chunk-CZQ3FO2Q.js.map +1 -0
- package/dist/{chunk-CFNT3ITG.cjs → chunk-D7ZEOS56.cjs} +25 -52
- 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-DI74SMXS.cjs +29 -0
- package/dist/chunk-DI74SMXS.cjs.map +1 -0
- package/dist/{chunk-KY5SDVA7.cjs → chunk-EM3CWPND.cjs} +442 -113
- 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-3QRBXYT5.cjs → chunk-FACJJWGF.cjs} +24 -6
- package/dist/chunk-FACJJWGF.cjs.map +1 -0
- package/dist/{chunk-KTIEB7VH.cjs → chunk-FL472AMI.cjs} +49 -165
- package/dist/chunk-FL472AMI.cjs.map +1 -0
- package/dist/{chunk-4RBAJVEC.cjs → chunk-FN35DLCN.cjs} +31 -9
- package/dist/chunk-FN35DLCN.cjs.map +1 -0
- package/dist/{chunk-C4C4Q7A6.js → chunk-FPIZFYHE.js} +12 -35
- package/dist/chunk-FPIZFYHE.js.map +1 -0
- package/dist/{chunk-XKNAK27R.js → chunk-FRV5Q5IO.js} +64 -8
- 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-6ZR4QC3O.cjs.map → chunk-GUR2FNB5.cjs.map} +1 -1
- package/dist/{chunk-ZFWNO3GE.cjs → chunk-H7YNSMA7.cjs} +107 -2
- package/dist/chunk-H7YNSMA7.cjs.map +1 -0
- package/dist/{chunk-GYVBEZAO.js → chunk-I7ZUZKFD.js} +47 -19
- package/dist/chunk-I7ZUZKFD.js.map +1 -0
- package/dist/chunk-ITE4IXAK.js +25 -0
- package/dist/chunk-ITE4IXAK.js.map +1 -0
- package/dist/{chunk-D3EWZ67S.cjs → chunk-J7WFGBJR.cjs} +3372 -4970
- package/dist/chunk-J7WFGBJR.cjs.map +1 -0
- package/dist/{chunk-PYD3UCDU.js → chunk-JBTOYDMN.js} +202 -251
- package/dist/chunk-JBTOYDMN.js.map +1 -0
- package/dist/{chunk-XVUJY72M.js → chunk-K3PPLHY7.js} +234 -118
- package/dist/chunk-K3PPLHY7.js.map +1 -0
- package/dist/{chunk-454I6GDF.js → chunk-KBGQIPRQ.js} +102 -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-3642VBVC.cjs → chunk-O7UN7OXA.cjs} +389 -121
- 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-6NRFUHMS.js → chunk-OR5ZA5WP.js} +135 -24
- package/dist/chunk-OR5ZA5WP.js.map +1 -0
- package/dist/{chunk-PRMKPFN5.js → chunk-Q5TEXCTB.js} +61 -6
- 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-YCV72E6L.js → chunk-QOTI55H7.js} +7 -116
- package/dist/chunk-QOTI55H7.js.map +1 -0
- package/dist/{chunk-QBYTJSAY.js → chunk-QWEUYILR.js} +99 -34
- package/dist/chunk-QWEUYILR.js.map +1 -0
- package/dist/{chunk-OS6KS3HV.js → chunk-RGP33ZJ5.js} +485 -82
- 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-WWVV44DY.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-CEF2QOTO.js → chunk-T2WUSPDA.js} +49 -8
- package/dist/chunk-T2WUSPDA.js.map +1 -0
- package/dist/{chunk-YW7GHMF4.cjs → chunk-TCOCYN2P.cjs} +75 -20
- 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-TEDRJXOG.cjs +32 -0
- package/dist/chunk-TEDRJXOG.cjs.map +1 -0
- package/dist/{chunk-WLP6TKFB.js → chunk-UES55P7G.js} +2809 -4398
- package/dist/chunk-UES55P7G.js.map +1 -0
- package/dist/{chunk-EF3Z645U.cjs → chunk-UMDVATGY.cjs} +6 -72
- package/dist/chunk-UMDVATGY.cjs.map +1 -0
- package/dist/chunk-UR7W5YQK.js +18 -0
- package/dist/chunk-UR7W5YQK.js.map +1 -0
- package/dist/chunk-UT3S4SEN.js +31 -0
- package/dist/chunk-UT3S4SEN.js.map +1 -0
- package/dist/{chunk-3IR2GEMJ.cjs → chunk-UUT7UN2N.cjs} +149 -38
- package/dist/chunk-UUT7UN2N.cjs.map +1 -0
- package/dist/{chunk-PIHXFF73.js → chunk-UZV3AZKF.js} +21 -3
- package/dist/chunk-UZV3AZKF.js.map +1 -0
- package/dist/{chunk-DJYRRDHA.js → chunk-VHMPG6UL.js} +29 -7
- package/dist/chunk-VHMPG6UL.js.map +1 -0
- package/dist/{chunk-MBLXCV2Y.cjs → chunk-VPYHY3LJ.cjs} +111 -43
- package/dist/chunk-VPYHY3LJ.cjs.map +1 -0
- package/dist/{chunk-WYTUF3QO.js → chunk-VSPCZAXF.js} +3 -3
- package/dist/{chunk-WYTUF3QO.js.map → chunk-VSPCZAXF.js.map} +1 -1
- package/dist/chunk-W63OVYY4.js +29 -0
- package/dist/chunk-W63OVYY4.js.map +1 -0
- package/dist/{chunk-UPDMJEW6.js → chunk-WDBCBWC4.js} +356 -30
- 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-XOX22WHL.cjs +2383 -0
- package/dist/chunk-XOX22WHL.cjs.map +1 -0
- package/dist/{ddl-CVnHJcar.d.ts → ddl-C2rZ-Aen.d.ts} +4 -4
- package/dist/{ddl-Dxt_fBHr.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-DGylBhWo.d.ts → fulltext-strategy-B57yvC5Q.d.ts} +2558 -2125
- package/dist/{types-C_UnQOQp.d.cts → fulltext-strategy-CDkSSYhq.d.cts} +2558 -2125
- package/dist/graph-extension/index.cjs +21 -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 +6 -4
- package/dist/graph-merge/index.cjs +408 -169
- 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 +286 -47
- 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 +240 -211
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +35 -27
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +28 -27
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +10 -9
- package/dist/interchange/index.cjs +47 -17
- package/dist/interchange/index.d.cts +126 -12
- package/dist/interchange/index.d.ts +126 -12
- package/dist/interchange/index.js +14 -4
- package/dist/{manager-BYl_zyZR.d.cts → manager-DwQi8eV0.d.cts} +9 -2
- package/dist/{manager-C0_r0ALf.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-_9psmVGm.d.cts → postgres-CfEqsRMp.d.cts} +152 -1
- package/dist/{postgres-MzBPkYzq.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 +590 -0
- package/dist/provenance/index.cjs.map +1 -0
- package/dist/provenance/index.d.cts +73 -0
- package/dist/provenance/index.d.ts +73 -0
- package/dist/provenance/index.js +588 -0
- package/dist/provenance/index.js.map +1 -0
- package/dist/schema/index.cjs +55 -38
- 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 +30 -13
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-gm44dShb.d.ts → sqlite-D7zBinNR.d.cts} +92 -1
- package/dist/{sqlite-BfksSb45.d.cts → sqlite-DvQndLky.d.ts} +92 -1
- package/dist/{store-view-FfE5_7eo.d.ts → store-view-BSpqvAxK.d.cts} +445 -46
- package/dist/{store-view-9jQ2rPum.d.cts → store-view-CKbHFRnn.d.ts} +445 -46
- package/dist/{types-B6mhrcLv.d.cts → types-Bv9DcS_E.d.cts} +2 -2
- package/dist/{types-CdWxK-nD.d.ts → types-CoxuV7EJ.d.ts} +2 -2
- package/dist/{where-Bpp2ul_z.d.cts → where-7RKFOsXt.d.ts} +2 -2
- package/dist/{where-BsEXraKW.d.ts → where-DdMIXOtH.d.cts} +2 -2
- package/package.json +21 -14
- package/dist/chunk-2YMGNYXY.js +0 -40
- package/dist/chunk-2YMGNYXY.js.map +0 -1
- package/dist/chunk-3642VBVC.cjs.map +0 -1
- package/dist/chunk-3EUKJEQ3.js +0 -77
- package/dist/chunk-3EUKJEQ3.js.map +0 -1
- package/dist/chunk-3IR2GEMJ.cjs.map +0 -1
- package/dist/chunk-3QRBXYT5.cjs.map +0 -1
- package/dist/chunk-454I6GDF.js.map +0 -1
- package/dist/chunk-4RBAJVEC.cjs.map +0 -1
- package/dist/chunk-6NRFUHMS.js.map +0 -1
- package/dist/chunk-6ZR4QC3O.cjs +0 -12
- package/dist/chunk-73KASJGO.cjs +0 -52
- package/dist/chunk-73KASJGO.cjs.map +0 -1
- package/dist/chunk-BF3ZDEUE.cjs +0 -773
- package/dist/chunk-BF3ZDEUE.cjs.map +0 -1
- package/dist/chunk-C4C4Q7A6.js.map +0 -1
- package/dist/chunk-CEF2QOTO.js.map +0 -1
- package/dist/chunk-CFNT3ITG.cjs.map +0 -1
- package/dist/chunk-CWFPJ3RC.js.map +0 -1
- package/dist/chunk-D3EWZ67S.cjs.map +0 -1
- package/dist/chunk-DJYRRDHA.js.map +0 -1
- package/dist/chunk-EF3Z645U.cjs.map +0 -1
- package/dist/chunk-FDN43KXV.cjs.map +0 -1
- package/dist/chunk-GYVBEZAO.js.map +0 -1
- package/dist/chunk-HTGDWIDE.cjs +0 -89
- package/dist/chunk-HTGDWIDE.cjs.map +0 -1
- package/dist/chunk-I4W7MKVG.cjs.map +0 -1
- package/dist/chunk-IZ4PCL47.js.map +0 -1
- package/dist/chunk-JHOBXD7O.js.map +0 -1
- package/dist/chunk-JIEJCTDS.cjs.map +0 -1
- package/dist/chunk-KTIEB7VH.cjs.map +0 -1
- package/dist/chunk-KY5SDVA7.cjs.map +0 -1
- package/dist/chunk-LM2IC4ZJ.cjs.map +0 -1
- package/dist/chunk-MBLXCV2Y.cjs.map +0 -1
- package/dist/chunk-NG5N7R45.cjs.map +0 -1
- package/dist/chunk-OIE2UPVG.cjs.map +0 -1
- package/dist/chunk-OS6KS3HV.js.map +0 -1
- package/dist/chunk-PIHXFF73.js.map +0 -1
- package/dist/chunk-PRMKPFN5.js.map +0 -1
- package/dist/chunk-PYD3UCDU.js.map +0 -1
- package/dist/chunk-QBYTJSAY.js.map +0 -1
- package/dist/chunk-SPT5JMME.js +0 -610
- package/dist/chunk-SPT5JMME.js.map +0 -1
- package/dist/chunk-SST7XDY6.cjs +0 -624
- package/dist/chunk-SST7XDY6.cjs.map +0 -1
- package/dist/chunk-TQOYM4LN.js.map +0 -1
- package/dist/chunk-UPDMJEW6.js.map +0 -1
- package/dist/chunk-WLP6TKFB.js.map +0 -1
- package/dist/chunk-WWVV44DY.cjs.map +0 -1
- package/dist/chunk-XKNAK27R.js.map +0 -1
- package/dist/chunk-XVUJY72M.js.map +0 -1
- package/dist/chunk-YCV72E6L.js.map +0 -1
- package/dist/chunk-YW7GHMF4.cjs.map +0 -1
- package/dist/chunk-ZFWNO3GE.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { G as GraphDef, t as NodeKinds, u as GetNodeType } from '../manager-
|
|
2
|
-
import { S as Store, N as Node, U as UniqueIntrospection } from '../store-view-
|
|
3
|
-
import { d as NodeId, N as NodeType, e as EdgeId, J as JsonValue, f as KindAnnotations, g as EdgeType, D as DeleteBehavior, T as TemporalMode, h as GraphExtensionVersion, i as ExtensionNodeDef, j as ExtensionEdgeDef, k as ExtensionOntologyRelation, l as ExtensionIndex } from '../extension-types-
|
|
4
|
-
import { T as TypeGraphError } from '../index-
|
|
1
|
+
import { G as GraphDef, t as NodeKinds, u as GetNodeType } from '../manager-DwQi8eV0.cjs';
|
|
2
|
+
import { S as Store, N as Node, U as UniqueIntrospection } from '../store-view-BSpqvAxK.cjs';
|
|
3
|
+
import { d as NodeId, N as NodeType, e as EdgeId, J as JsonValue, f as KindAnnotations, g as EdgeType, D as DeleteBehavior, T as TemporalMode, h as GraphExtensionVersion, i as ExtensionNodeDef, j as ExtensionEdgeDef, k as ExtensionOntologyRelation, l as ExtensionIndex } from '../extension-types-ixRpJVUp.cjs';
|
|
4
|
+
import { T as TypeGraphError } from '../index-Bks_3HHK.cjs';
|
|
5
5
|
import { R as Result } from '../result-DWo6mUVz.cjs';
|
|
6
6
|
export { i as isErr, a as isOk, u as unwrap } from '../result-DWo6mUVz.cjs';
|
|
7
|
-
import { G as GraphBackend, M as MetaEdge, I as IndexDeclaration } from '../
|
|
7
|
+
import { G as GraphBackend, M as MetaEdge, I as IndexDeclaration } from '../fulltext-strategy-CDkSSYhq.cjs';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import '../materialize-indexes-
|
|
9
|
+
import '../materialize-indexes-B4e9360H.cjs';
|
|
10
10
|
import 'drizzle-orm';
|
|
11
11
|
import 'drizzle-orm/pg-core';
|
|
12
12
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -34,8 +34,10 @@ type BranchId = string & Readonly<{
|
|
|
34
34
|
}>;
|
|
35
35
|
/**
|
|
36
36
|
* Opaque token identifying the immutable `base@V` a branch was forked from.
|
|
37
|
-
* Combines a schema hash with a
|
|
38
|
-
*
|
|
37
|
+
* Combines a schema hash with a staleness component. Branded so it cannot be
|
|
38
|
+
* confused with an arbitrary string. The second component is a
|
|
39
|
+
* durable revision anchor for stores with revision tracking enabled and a
|
|
40
|
+
* compatibility content fingerprint otherwise.
|
|
39
41
|
*/
|
|
40
42
|
type BaseVersion = string & Readonly<{
|
|
41
43
|
readonly __brand: "BaseVersion";
|
|
@@ -486,7 +488,13 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
486
488
|
* This is content-addressed (the public `computeSchemaHash` deliberately
|
|
487
489
|
* excludes the version number and `generatedAt`, so it is stable across
|
|
488
490
|
* re-saves of the same schema).
|
|
489
|
-
* 2. A **
|
|
491
|
+
* 2. A **revision anchor** when the Store has `revisionTracking` (or
|
|
492
|
+
* `history`) enabled — a durable random per-graph origin plus the
|
|
493
|
+
* monotonic revision clock. This is O(1) to read and changes after every
|
|
494
|
+
* successful Store write; the origin prevents independent stores with
|
|
495
|
+
* coincident timestamps from sharing an anchor.
|
|
496
|
+
* Stores without tracking retain the compatibility fallback: a
|
|
497
|
+
* **content fingerprint**, a SHA-256 digest (truncated to a fixed-width
|
|
490
498
|
* hex string) of every LIVE node and edge over the base store (`id`,
|
|
491
499
|
* `updated_at`, the bitemporal `valid_from`/`valid_to`, and canonicalized
|
|
492
500
|
* `props`; edges also carry their endpoint ids), sorted by id, so two stores
|
|
@@ -501,17 +509,20 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
501
509
|
* fingerprint would not match its source. (See the working-copy fidelity note in
|
|
502
510
|
* T4.)
|
|
503
511
|
*
|
|
504
|
-
* `computeBaseVersion` is async because schema hashing and
|
|
505
|
-
* enumeration go through async TypeGraph internals.
|
|
506
|
-
* illustrative signature does not survive contact with
|
|
512
|
+
* `computeBaseVersion` is async because schema hashing, revision reads, and the
|
|
513
|
+
* compatibility live-content enumeration go through async TypeGraph internals.
|
|
514
|
+
* The design's synchronous illustrative signature does not survive contact with
|
|
515
|
+
* the real store surface.
|
|
507
516
|
*/
|
|
508
517
|
|
|
509
518
|
/**
|
|
510
519
|
* Computes the immutable `base@V` token for a store. Combines the schema hash
|
|
511
|
-
* with a
|
|
520
|
+
* with a durable revision anchor when tracking is enabled, otherwise with the
|
|
521
|
+
* compatibility live-content fingerprint.
|
|
512
522
|
*
|
|
513
523
|
* MUST be called on the ORIGINAL base store, not a clone (clones regenerate
|
|
514
|
-
* timestamps and would fingerprint differently
|
|
524
|
+
* timestamps and would fingerprint differently when the compatibility path is
|
|
525
|
+
* in use).
|
|
515
526
|
*/
|
|
516
527
|
declare function computeBaseVersion<G extends GraphDef>(store: Store<G>): Promise<BaseVersion>;
|
|
517
528
|
|
|
@@ -590,12 +601,12 @@ declare class BaseVersionMismatchError extends MergeError {
|
|
|
590
601
|
* Pluggable working-copy strategy: how `branch()` produces an isolated,
|
|
591
602
|
* independently-mutable copy of a base store.
|
|
592
603
|
*
|
|
593
|
-
* The P0 default is a faithful CLONE via
|
|
594
|
-
* ({@link cloneWorkingCopyStrategy}): `
|
|
595
|
-
* into a fresh store on a caller-provided backend. IDs are
|
|
596
|
-
* interchange, so the diff engine (T3) can key on stable ids across
|
|
597
|
-
* fork. This leverages public entrypoints only, needs zero schema
|
|
598
|
-
* behaves identically across SQLite and Postgres.
|
|
604
|
+
* The P0 default is a faithful CLONE via streamed public interchange
|
|
605
|
+
* ({@link cloneWorkingCopyStrategy}): `exportGraphStream` the base, then
|
|
606
|
+
* `importGraphStream` into a fresh store on a caller-provided backend. IDs are
|
|
607
|
+
* preserved by interchange, so the diff engine (T3) can key on stable ids across
|
|
608
|
+
* base and fork. This leverages public entrypoints only, needs zero schema
|
|
609
|
+
* changes, and behaves identically across SQLite and Postgres.
|
|
599
610
|
*
|
|
600
611
|
* INTERCHANGE FIDELITY LIMITATION (verified, design §13.x): the interchange
|
|
601
612
|
* `meta` schema has no `deletedAt` field, so a base row that is already
|
|
@@ -609,6 +620,18 @@ declare class BaseVersionMismatchError extends MergeError {
|
|
|
609
620
|
* only) as the immutable reference, never against the clone (clones regenerate
|
|
610
621
|
* `created_at`/`updated_at`, which would otherwise destabilize `base@V`).
|
|
611
622
|
*
|
|
623
|
+
* `includeTemporal: true` carries `validFrom`/`validTo` through unchanged,
|
|
624
|
+
* preserving the base's exact valid-time window on the clone: create-time
|
|
625
|
+
* paths default an omitted `validFrom` to the row's own creation instant
|
|
626
|
+
* (see #240), and export/import round-trip a still-open-left `valid_from`
|
|
627
|
+
* (e.g. a row that predates the #240 fix) as an explicit `null` rather than
|
|
628
|
+
* silently dropping it — see `InterchangeNodeSchema.validFrom`'s doc.
|
|
629
|
+
* Without either half of this, the clone's re-import would re-stamp the
|
|
630
|
+
* affected base rows to the CLONE's creation instant instead — narrowing
|
|
631
|
+
* their validity window and making `asOf` reads on the fork diverge from
|
|
632
|
+
* identical reads on the base for any instant between the row's real
|
|
633
|
+
* creation and the clone.
|
|
634
|
+
*
|
|
612
635
|
* Logical-namespace (copy-on-write within one backend, no full data copy) is a
|
|
613
636
|
* future strategy slot — see the `WorkingCopyStrategy` interface — deferred past
|
|
614
637
|
* P0.
|
|
@@ -637,29 +660,35 @@ type WorkingCopyStrategy<G extends GraphDef> = Readonly<{
|
|
|
637
660
|
* in-process Postgres engine) be constructed lazily at branch time.
|
|
638
661
|
*
|
|
639
662
|
* The returned backend MUST be EMPTY (no rows for the base graph): the clone
|
|
640
|
-
* seeds it from the base via `
|
|
663
|
+
* seeds it from the base via `importGraphStream` with `onConflict: "error"`, so a
|
|
641
664
|
* pre-existing row is surfaced as a {@link BranchError} rather than silently
|
|
642
665
|
* skipped (which would leave the working copy diverging from the base).
|
|
666
|
+
* When the source store uses `revisionTracking`, the backend must also satisfy
|
|
667
|
+
* that option's transactional revision-clock requirements because the clone
|
|
668
|
+
* preserves the source's branchability contract.
|
|
643
669
|
*/
|
|
644
670
|
type MakeBackend = () => Promise<GraphBackend>;
|
|
645
671
|
/**
|
|
646
|
-
* The P0 default working-copy strategy: faithful clone via
|
|
672
|
+
* The P0 default working-copy strategy: faithful clone via streamed interchange.
|
|
647
673
|
*
|
|
648
674
|
* On each `create(baseStore)`:
|
|
649
|
-
* 1. `
|
|
650
|
-
* `includeMeta: true` carries
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
*
|
|
675
|
+
* 1. `exportGraphStream(baseStore, { includeMeta: true, includeTemporal: true,
|
|
676
|
+
* includeDeleted: false })` — `includeMeta: true` carries
|
|
677
|
+
* `created_at`/`updated_at`; `includeTemporal: true` carries
|
|
678
|
+
* `validFrom`/`validTo` so the clone's valid-time window matches the base's
|
|
679
|
+
* exactly (see the fidelity note above); `includeDeleted: false` keeps the
|
|
680
|
+
* clone to LIVE rows only. Shipping soft-deleted rows is unsafe: the meta
|
|
681
|
+
* schema has no `deletedAt`, so they would import as live and resurrect on
|
|
682
|
+
* the fork's diff (see the fidelity note above). `branch()` only needs the
|
|
683
|
+
* base's live state.
|
|
655
684
|
* 2. Create a fresh store over the caller-provided backend with the SAME graph
|
|
656
685
|
* definition via `createStoreWithSchema`.
|
|
657
|
-
* 3. `
|
|
686
|
+
* 3. `importGraphStream(freshStore, data, { onConflict: "error", ... })` — ids are
|
|
658
687
|
* preserved so the diff engine can key on them. `onConflict: "error"`
|
|
659
688
|
* requires the backend to be EMPTY: a pre-existing row is a contract
|
|
660
689
|
* violation that must surface loudly, never be silently skipped (a skipped
|
|
661
690
|
* row would leave the clone diverging from the base, so the fork's diff would
|
|
662
|
-
* report phantom modifications/deletions). `
|
|
691
|
+
* report phantom modifications/deletions). `importGraphStream` RETURNS
|
|
663
692
|
* `{ success, errors }` rather than throwing on a per-row rejection, so its
|
|
664
693
|
* result is checked and any failure fails the branch.
|
|
665
694
|
*
|
|
@@ -682,7 +711,8 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
|
|
|
682
711
|
* branch's own backend seeded with the base's live state.
|
|
683
712
|
*
|
|
684
713
|
* The copy mechanism is pluggable behind {@link WorkingCopyStrategy}. The P0
|
|
685
|
-
* default is the faithful
|
|
714
|
+
* default is the faithful streamed-interchange clone
|
|
715
|
+
* ({@link cloneWorkingCopyStrategy}),
|
|
686
716
|
* which keeps this primitive backend-agnostic: the caller supplies a
|
|
687
717
|
* `makeBackend` factory, and `branch()` never names a concrete backend.
|
|
688
718
|
*/
|
|
@@ -697,7 +727,7 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
|
|
|
697
727
|
* logical-namespace copy-on-write).
|
|
698
728
|
*
|
|
699
729
|
* Returns a {@link Result}: success yields the {@link GraphBranch}; any failure
|
|
700
|
-
* (base-version stamping, backend construction,
|
|
730
|
+
* (base-version stamping, backend construction, streamed interchange) is wrapped in a
|
|
701
731
|
* {@link BranchError} with the underlying cause attached. Errors are returned,
|
|
702
732
|
* never thrown — this is internal-logic surface (the caller converts to a thrown
|
|
703
733
|
* error at the framework boundary).
|
|
@@ -814,7 +844,7 @@ type CandidatePair<K extends NodeType = NodeType> = Readonly<{
|
|
|
814
844
|
*
|
|
815
845
|
* 1. PRECONDITION — compute the target's `base@V` and reject any branch whose
|
|
816
846
|
* `base` token does not match it (`BaseVersionMismatchError`). A branch
|
|
817
|
-
* forked from a divergent schema or
|
|
847
|
+
* forked from a divergent schema or base revision cannot be merged
|
|
818
848
|
* safely (design §5.2 / §13.6).
|
|
819
849
|
* 2. STAGE — `stageBranches` (T7): the provenance-tagged UNION of every
|
|
820
850
|
* branch's state-diff against the immutable base.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { G as GraphDef, t as NodeKinds, u as GetNodeType } from '../manager-
|
|
2
|
-
import { S as Store, N as Node, U as UniqueIntrospection } from '../store-view-
|
|
3
|
-
import { d as NodeId, N as NodeType, e as EdgeId, J as JsonValue, f as KindAnnotations, g as EdgeType, D as DeleteBehavior, T as TemporalMode, h as GraphExtensionVersion, i as ExtensionNodeDef, j as ExtensionEdgeDef, k as ExtensionOntologyRelation, l as ExtensionIndex } from '../extension-types-
|
|
4
|
-
import { T as TypeGraphError } from '../index-
|
|
1
|
+
import { G as GraphDef, t as NodeKinds, u as GetNodeType } from '../manager-ejUCB52T.js';
|
|
2
|
+
import { S as Store, N as Node, U as UniqueIntrospection } from '../store-view-CKbHFRnn.js';
|
|
3
|
+
import { d as NodeId, N as NodeType, e as EdgeId, J as JsonValue, f as KindAnnotations, g as EdgeType, D as DeleteBehavior, T as TemporalMode, h as GraphExtensionVersion, i as ExtensionNodeDef, j as ExtensionEdgeDef, k as ExtensionOntologyRelation, l as ExtensionIndex } from '../extension-types-ixRpJVUp.js';
|
|
4
|
+
import { T as TypeGraphError } from '../index-6CSUAq-x.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
|
-
import { G as GraphBackend, M as MetaEdge, I as IndexDeclaration } from '../
|
|
7
|
+
import { G as GraphBackend, M as MetaEdge, I as IndexDeclaration } from '../fulltext-strategy-B57yvC5Q.js';
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import '../materialize-indexes-
|
|
9
|
+
import '../materialize-indexes-te9TPMMJ.js';
|
|
10
10
|
import 'drizzle-orm';
|
|
11
11
|
import 'drizzle-orm/pg-core';
|
|
12
12
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -34,8 +34,10 @@ type BranchId = string & Readonly<{
|
|
|
34
34
|
}>;
|
|
35
35
|
/**
|
|
36
36
|
* Opaque token identifying the immutable `base@V` a branch was forked from.
|
|
37
|
-
* Combines a schema hash with a
|
|
38
|
-
*
|
|
37
|
+
* Combines a schema hash with a staleness component. Branded so it cannot be
|
|
38
|
+
* confused with an arbitrary string. The second component is a
|
|
39
|
+
* durable revision anchor for stores with revision tracking enabled and a
|
|
40
|
+
* compatibility content fingerprint otherwise.
|
|
39
41
|
*/
|
|
40
42
|
type BaseVersion = string & Readonly<{
|
|
41
43
|
readonly __brand: "BaseVersion";
|
|
@@ -486,7 +488,13 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
486
488
|
* This is content-addressed (the public `computeSchemaHash` deliberately
|
|
487
489
|
* excludes the version number and `generatedAt`, so it is stable across
|
|
488
490
|
* re-saves of the same schema).
|
|
489
|
-
* 2. A **
|
|
491
|
+
* 2. A **revision anchor** when the Store has `revisionTracking` (or
|
|
492
|
+
* `history`) enabled — a durable random per-graph origin plus the
|
|
493
|
+
* monotonic revision clock. This is O(1) to read and changes after every
|
|
494
|
+
* successful Store write; the origin prevents independent stores with
|
|
495
|
+
* coincident timestamps from sharing an anchor.
|
|
496
|
+
* Stores without tracking retain the compatibility fallback: a
|
|
497
|
+
* **content fingerprint**, a SHA-256 digest (truncated to a fixed-width
|
|
490
498
|
* hex string) of every LIVE node and edge over the base store (`id`,
|
|
491
499
|
* `updated_at`, the bitemporal `valid_from`/`valid_to`, and canonicalized
|
|
492
500
|
* `props`; edges also carry their endpoint ids), sorted by id, so two stores
|
|
@@ -501,17 +509,20 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
|
|
|
501
509
|
* fingerprint would not match its source. (See the working-copy fidelity note in
|
|
502
510
|
* T4.)
|
|
503
511
|
*
|
|
504
|
-
* `computeBaseVersion` is async because schema hashing and
|
|
505
|
-
* enumeration go through async TypeGraph internals.
|
|
506
|
-
* illustrative signature does not survive contact with
|
|
512
|
+
* `computeBaseVersion` is async because schema hashing, revision reads, and the
|
|
513
|
+
* compatibility live-content enumeration go through async TypeGraph internals.
|
|
514
|
+
* The design's synchronous illustrative signature does not survive contact with
|
|
515
|
+
* the real store surface.
|
|
507
516
|
*/
|
|
508
517
|
|
|
509
518
|
/**
|
|
510
519
|
* Computes the immutable `base@V` token for a store. Combines the schema hash
|
|
511
|
-
* with a
|
|
520
|
+
* with a durable revision anchor when tracking is enabled, otherwise with the
|
|
521
|
+
* compatibility live-content fingerprint.
|
|
512
522
|
*
|
|
513
523
|
* MUST be called on the ORIGINAL base store, not a clone (clones regenerate
|
|
514
|
-
* timestamps and would fingerprint differently
|
|
524
|
+
* timestamps and would fingerprint differently when the compatibility path is
|
|
525
|
+
* in use).
|
|
515
526
|
*/
|
|
516
527
|
declare function computeBaseVersion<G extends GraphDef>(store: Store<G>): Promise<BaseVersion>;
|
|
517
528
|
|
|
@@ -590,12 +601,12 @@ declare class BaseVersionMismatchError extends MergeError {
|
|
|
590
601
|
* Pluggable working-copy strategy: how `branch()` produces an isolated,
|
|
591
602
|
* independently-mutable copy of a base store.
|
|
592
603
|
*
|
|
593
|
-
* The P0 default is a faithful CLONE via
|
|
594
|
-
* ({@link cloneWorkingCopyStrategy}): `
|
|
595
|
-
* into a fresh store on a caller-provided backend. IDs are
|
|
596
|
-
* interchange, so the diff engine (T3) can key on stable ids across
|
|
597
|
-
* fork. This leverages public entrypoints only, needs zero schema
|
|
598
|
-
* behaves identically across SQLite and Postgres.
|
|
604
|
+
* The P0 default is a faithful CLONE via streamed public interchange
|
|
605
|
+
* ({@link cloneWorkingCopyStrategy}): `exportGraphStream` the base, then
|
|
606
|
+
* `importGraphStream` into a fresh store on a caller-provided backend. IDs are
|
|
607
|
+
* preserved by interchange, so the diff engine (T3) can key on stable ids across
|
|
608
|
+
* base and fork. This leverages public entrypoints only, needs zero schema
|
|
609
|
+
* changes, and behaves identically across SQLite and Postgres.
|
|
599
610
|
*
|
|
600
611
|
* INTERCHANGE FIDELITY LIMITATION (verified, design §13.x): the interchange
|
|
601
612
|
* `meta` schema has no `deletedAt` field, so a base row that is already
|
|
@@ -609,6 +620,18 @@ declare class BaseVersionMismatchError extends MergeError {
|
|
|
609
620
|
* only) as the immutable reference, never against the clone (clones regenerate
|
|
610
621
|
* `created_at`/`updated_at`, which would otherwise destabilize `base@V`).
|
|
611
622
|
*
|
|
623
|
+
* `includeTemporal: true` carries `validFrom`/`validTo` through unchanged,
|
|
624
|
+
* preserving the base's exact valid-time window on the clone: create-time
|
|
625
|
+
* paths default an omitted `validFrom` to the row's own creation instant
|
|
626
|
+
* (see #240), and export/import round-trip a still-open-left `valid_from`
|
|
627
|
+
* (e.g. a row that predates the #240 fix) as an explicit `null` rather than
|
|
628
|
+
* silently dropping it — see `InterchangeNodeSchema.validFrom`'s doc.
|
|
629
|
+
* Without either half of this, the clone's re-import would re-stamp the
|
|
630
|
+
* affected base rows to the CLONE's creation instant instead — narrowing
|
|
631
|
+
* their validity window and making `asOf` reads on the fork diverge from
|
|
632
|
+
* identical reads on the base for any instant between the row's real
|
|
633
|
+
* creation and the clone.
|
|
634
|
+
*
|
|
612
635
|
* Logical-namespace (copy-on-write within one backend, no full data copy) is a
|
|
613
636
|
* future strategy slot — see the `WorkingCopyStrategy` interface — deferred past
|
|
614
637
|
* P0.
|
|
@@ -637,29 +660,35 @@ type WorkingCopyStrategy<G extends GraphDef> = Readonly<{
|
|
|
637
660
|
* in-process Postgres engine) be constructed lazily at branch time.
|
|
638
661
|
*
|
|
639
662
|
* The returned backend MUST be EMPTY (no rows for the base graph): the clone
|
|
640
|
-
* seeds it from the base via `
|
|
663
|
+
* seeds it from the base via `importGraphStream` with `onConflict: "error"`, so a
|
|
641
664
|
* pre-existing row is surfaced as a {@link BranchError} rather than silently
|
|
642
665
|
* skipped (which would leave the working copy diverging from the base).
|
|
666
|
+
* When the source store uses `revisionTracking`, the backend must also satisfy
|
|
667
|
+
* that option's transactional revision-clock requirements because the clone
|
|
668
|
+
* preserves the source's branchability contract.
|
|
643
669
|
*/
|
|
644
670
|
type MakeBackend = () => Promise<GraphBackend>;
|
|
645
671
|
/**
|
|
646
|
-
* The P0 default working-copy strategy: faithful clone via
|
|
672
|
+
* The P0 default working-copy strategy: faithful clone via streamed interchange.
|
|
647
673
|
*
|
|
648
674
|
* On each `create(baseStore)`:
|
|
649
|
-
* 1. `
|
|
650
|
-
* `includeMeta: true` carries
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
*
|
|
675
|
+
* 1. `exportGraphStream(baseStore, { includeMeta: true, includeTemporal: true,
|
|
676
|
+
* includeDeleted: false })` — `includeMeta: true` carries
|
|
677
|
+
* `created_at`/`updated_at`; `includeTemporal: true` carries
|
|
678
|
+
* `validFrom`/`validTo` so the clone's valid-time window matches the base's
|
|
679
|
+
* exactly (see the fidelity note above); `includeDeleted: false` keeps the
|
|
680
|
+
* clone to LIVE rows only. Shipping soft-deleted rows is unsafe: the meta
|
|
681
|
+
* schema has no `deletedAt`, so they would import as live and resurrect on
|
|
682
|
+
* the fork's diff (see the fidelity note above). `branch()` only needs the
|
|
683
|
+
* base's live state.
|
|
655
684
|
* 2. Create a fresh store over the caller-provided backend with the SAME graph
|
|
656
685
|
* definition via `createStoreWithSchema`.
|
|
657
|
-
* 3. `
|
|
686
|
+
* 3. `importGraphStream(freshStore, data, { onConflict: "error", ... })` — ids are
|
|
658
687
|
* preserved so the diff engine can key on them. `onConflict: "error"`
|
|
659
688
|
* requires the backend to be EMPTY: a pre-existing row is a contract
|
|
660
689
|
* violation that must surface loudly, never be silently skipped (a skipped
|
|
661
690
|
* row would leave the clone diverging from the base, so the fork's diff would
|
|
662
|
-
* report phantom modifications/deletions). `
|
|
691
|
+
* report phantom modifications/deletions). `importGraphStream` RETURNS
|
|
663
692
|
* `{ success, errors }` rather than throwing on a per-row rejection, so its
|
|
664
693
|
* result is checked and any failure fails the branch.
|
|
665
694
|
*
|
|
@@ -682,7 +711,8 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
|
|
|
682
711
|
* branch's own backend seeded with the base's live state.
|
|
683
712
|
*
|
|
684
713
|
* The copy mechanism is pluggable behind {@link WorkingCopyStrategy}. The P0
|
|
685
|
-
* default is the faithful
|
|
714
|
+
* default is the faithful streamed-interchange clone
|
|
715
|
+
* ({@link cloneWorkingCopyStrategy}),
|
|
686
716
|
* which keeps this primitive backend-agnostic: the caller supplies a
|
|
687
717
|
* `makeBackend` factory, and `branch()` never names a concrete backend.
|
|
688
718
|
*/
|
|
@@ -697,7 +727,7 @@ declare function cloneWorkingCopyStrategy<G extends GraphDef>(makeBackend: MakeB
|
|
|
697
727
|
* logical-namespace copy-on-write).
|
|
698
728
|
*
|
|
699
729
|
* Returns a {@link Result}: success yields the {@link GraphBranch}; any failure
|
|
700
|
-
* (base-version stamping, backend construction,
|
|
730
|
+
* (base-version stamping, backend construction, streamed interchange) is wrapped in a
|
|
701
731
|
* {@link BranchError} with the underlying cause attached. Errors are returned,
|
|
702
732
|
* never thrown — this is internal-logic surface (the caller converts to a thrown
|
|
703
733
|
* error at the framework boundary).
|
|
@@ -814,7 +844,7 @@ type CandidatePair<K extends NodeType = NodeType> = Readonly<{
|
|
|
814
844
|
*
|
|
815
845
|
* 1. PRECONDITION — compute the target's `base@V` and reject any branch whose
|
|
816
846
|
* `base` token does not match it (`BaseVersionMismatchError`). A branch
|
|
817
|
-
* forked from a divergent schema or
|
|
847
|
+
* forked from a divergent schema or base revision cannot be merged
|
|
818
848
|
* safely (design §5.2 / §13.6).
|
|
819
849
|
* 2. STAGE — `stageBranches` (T7): the provenance-tagged UNION of every
|
|
820
850
|
* branch's state-diff against the immutable base.
|