@nicia-ai/typegraph 0.55.0 → 0.56.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.
Files changed (148) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/backend/index.cjs +86 -86
  3. package/dist/backend/index.js +7 -7
  4. package/dist/backend/postgres/index.cjs +22 -22
  5. package/dist/backend/postgres/index.js +8 -8
  6. package/dist/backend/postgres/pglite-store.cjs +1 -1
  7. package/dist/backend/postgres/pglite-store.d.cts +2 -2
  8. package/dist/backend/postgres/pglite-store.d.ts +2 -2
  9. package/dist/backend/postgres/pglite-store.js +1 -1
  10. package/dist/backend/postgres/pglite.cjs +10 -10
  11. package/dist/backend/postgres/pglite.js +9 -9
  12. package/dist/backend/sqlite/index.cjs +21 -21
  13. package/dist/backend/sqlite/index.js +8 -8
  14. package/dist/backend/sqlite/libsql.cjs +12 -12
  15. package/dist/backend/sqlite/libsql.js +8 -8
  16. package/dist/backend/sqlite/local-store.cjs +1 -1
  17. package/dist/backend/sqlite/local-store.d.cts +2 -2
  18. package/dist/backend/sqlite/local-store.d.ts +2 -2
  19. package/dist/backend/sqlite/local-store.js +1 -1
  20. package/dist/backend/sqlite/local.cjs +10 -10
  21. package/dist/backend/sqlite/local.js +9 -9
  22. package/dist/{chunk-S5WG5AFG.cjs → chunk-2XUAUSMI.cjs} +12 -12
  23. package/dist/{chunk-S5WG5AFG.cjs.map → chunk-2XUAUSMI.cjs.map} +1 -1
  24. package/dist/{chunk-MTE255N3.cjs → chunk-36XLQHZA.cjs} +4 -4
  25. package/dist/{chunk-MTE255N3.cjs.map → chunk-36XLQHZA.cjs.map} +1 -1
  26. package/dist/{chunk-FWSGKOBN.js → chunk-6LTRZOUU.js} +6 -6
  27. package/dist/{chunk-FWSGKOBN.js.map → chunk-6LTRZOUU.js.map} +1 -1
  28. package/dist/{chunk-YVKPUSHS.js → chunk-75KH6Y2W.js} +16 -7
  29. package/dist/chunk-75KH6Y2W.js.map +1 -0
  30. package/dist/{chunk-MJXEO7YA.js → chunk-762VPGHN.js} +5 -5
  31. package/dist/{chunk-MJXEO7YA.js.map → chunk-762VPGHN.js.map} +1 -1
  32. package/dist/{chunk-GGDTMBNA.cjs → chunk-7CCVR2QF.cjs} +54 -54
  33. package/dist/{chunk-GGDTMBNA.cjs.map → chunk-7CCVR2QF.cjs.map} +1 -1
  34. package/dist/{chunk-7EOJO6QB.js → chunk-7MHENVRG.js} +3 -3
  35. package/dist/{chunk-7EOJO6QB.js.map → chunk-7MHENVRG.js.map} +1 -1
  36. package/dist/{chunk-7B3DSFX3.cjs → chunk-AUTRK6WM.cjs} +4 -4
  37. package/dist/{chunk-7B3DSFX3.cjs.map → chunk-AUTRK6WM.cjs.map} +1 -1
  38. package/dist/{chunk-SIQ4BFL5.js → chunk-AZP5CCHL.js} +4 -4
  39. package/dist/{chunk-SIQ4BFL5.js.map → chunk-AZP5CCHL.js.map} +1 -1
  40. package/dist/{chunk-WTW7RWAG.cjs → chunk-BYUIOM4L.cjs} +6 -6
  41. package/dist/{chunk-WTW7RWAG.cjs.map → chunk-BYUIOM4L.cjs.map} +1 -1
  42. package/dist/{chunk-74FNI3PT.js → chunk-C3TJU4KQ.js} +6 -6
  43. package/dist/chunk-C3TJU4KQ.js.map +1 -0
  44. package/dist/{chunk-7V2R4MH6.js → chunk-CEQOTZGB.js} +5 -5
  45. package/dist/{chunk-7V2R4MH6.js.map → chunk-CEQOTZGB.js.map} +1 -1
  46. package/dist/{chunk-TKFQLKH2.cjs → chunk-CYKHSH5O.cjs} +36 -36
  47. package/dist/{chunk-TKFQLKH2.cjs.map → chunk-CYKHSH5O.cjs.map} +1 -1
  48. package/dist/{chunk-D5TCKAQT.cjs → chunk-DGIA64DM.cjs} +4 -4
  49. package/dist/{chunk-D5TCKAQT.cjs.map → chunk-DGIA64DM.cjs.map} +1 -1
  50. package/dist/{chunk-FFR3YUY2.js → chunk-E4QYEWVH.js} +5 -5
  51. package/dist/{chunk-FFR3YUY2.js.map → chunk-E4QYEWVH.js.map} +1 -1
  52. package/dist/{chunk-467YITD4.cjs → chunk-ETU5IILQ.cjs} +13 -13
  53. package/dist/{chunk-467YITD4.cjs.map → chunk-ETU5IILQ.cjs.map} +1 -1
  54. package/dist/{chunk-HW3IX2RF.js → chunk-EWRLWI7W.js} +4 -4
  55. package/dist/{chunk-HW3IX2RF.js.map → chunk-EWRLWI7W.js.map} +1 -1
  56. package/dist/{chunk-KZ6OHFDV.js → chunk-F2S5JWCT.js} +3 -3
  57. package/dist/{chunk-KZ6OHFDV.js.map → chunk-F2S5JWCT.js.map} +1 -1
  58. package/dist/{chunk-45WPPI64.js → chunk-FMCPKMQI.js} +3 -3
  59. package/dist/{chunk-45WPPI64.js.map → chunk-FMCPKMQI.js.map} +1 -1
  60. package/dist/{chunk-QM6IQW7B.js → chunk-ILHVYKXJ.js} +7 -7
  61. package/dist/{chunk-QM6IQW7B.js.map → chunk-ILHVYKXJ.js.map} +1 -1
  62. package/dist/{chunk-ECYEWFEH.cjs → chunk-J34FSPSC.cjs} +16 -6
  63. package/dist/chunk-J34FSPSC.cjs.map +1 -0
  64. package/dist/{chunk-GFYCLCGU.cjs → chunk-KM3CLHDB.cjs} +9 -9
  65. package/dist/{chunk-GFYCLCGU.cjs.map → chunk-KM3CLHDB.cjs.map} +1 -1
  66. package/dist/{chunk-SLNH62T3.js → chunk-KQYUKOGX.js} +3 -3
  67. package/dist/{chunk-SLNH62T3.js.map → chunk-KQYUKOGX.js.map} +1 -1
  68. package/dist/{chunk-7I2PYI4U.cjs → chunk-KR3N6Y7O.cjs} +67 -67
  69. package/dist/{chunk-7I2PYI4U.cjs.map → chunk-KR3N6Y7O.cjs.map} +1 -1
  70. package/dist/{chunk-HZCOCNIX.cjs → chunk-L2REUAJB.cjs} +24 -24
  71. package/dist/{chunk-HZCOCNIX.cjs.map → chunk-L2REUAJB.cjs.map} +1 -1
  72. package/dist/{chunk-VU65FXEG.js → chunk-LFXBFPI2.js} +66 -29
  73. package/dist/chunk-LFXBFPI2.js.map +1 -0
  74. package/dist/{chunk-NXRSR6QG.js → chunk-MHM6OGZR.js} +9 -9
  75. package/dist/{chunk-NXRSR6QG.js.map → chunk-MHM6OGZR.js.map} +1 -1
  76. package/dist/{chunk-FCUSVSYX.js → chunk-MRGWM5LE.js} +10 -10
  77. package/dist/{chunk-FCUSVSYX.js.map → chunk-MRGWM5LE.js.map} +1 -1
  78. package/dist/{chunk-WXGMDROJ.js → chunk-QDNEXTON.js} +7 -7
  79. package/dist/{chunk-WXGMDROJ.js.map → chunk-QDNEXTON.js.map} +1 -1
  80. package/dist/{chunk-VYU5H4FO.js → chunk-RXA2D3UR.js} +3 -3
  81. package/dist/{chunk-VYU5H4FO.js.map → chunk-RXA2D3UR.js.map} +1 -1
  82. package/dist/{chunk-XODNY4QI.js → chunk-TIBSLFHR.js} +6 -6
  83. package/dist/{chunk-XODNY4QI.js.map → chunk-TIBSLFHR.js.map} +1 -1
  84. package/dist/{chunk-KZG7HQSN.cjs → chunk-UVMSWO6X.cjs} +173 -173
  85. package/dist/{chunk-KZG7HQSN.cjs.map → chunk-UVMSWO6X.cjs.map} +1 -1
  86. package/dist/{chunk-ORPT5EQW.cjs → chunk-UZ6CJUC5.cjs} +27 -27
  87. package/dist/chunk-UZ6CJUC5.cjs.map +1 -0
  88. package/dist/{chunk-GNF3PHEQ.cjs → chunk-VF2IMMZT.cjs} +17 -17
  89. package/dist/{chunk-GNF3PHEQ.cjs.map → chunk-VF2IMMZT.cjs.map} +1 -1
  90. package/dist/{chunk-PGZV3E3I.cjs → chunk-VXEHEPC4.cjs} +4 -4
  91. package/dist/{chunk-PGZV3E3I.cjs.map → chunk-VXEHEPC4.cjs.map} +1 -1
  92. package/dist/{chunk-OJ47LMOB.cjs → chunk-WIUHN6SZ.cjs} +669 -628
  93. package/dist/chunk-WIUHN6SZ.cjs.map +1 -0
  94. package/dist/{chunk-HNW5IDB3.js → chunk-WIZB5U6N.js} +7 -7
  95. package/dist/{chunk-HNW5IDB3.js.map → chunk-WIZB5U6N.js.map} +1 -1
  96. package/dist/{chunk-IDQZI6GL.js → chunk-XH75W3O5.js} +3 -3
  97. package/dist/{chunk-IDQZI6GL.js.map → chunk-XH75W3O5.js.map} +1 -1
  98. package/dist/{chunk-T7LSSV7J.cjs → chunk-XXEFDJHY.cjs} +45 -45
  99. package/dist/{chunk-T7LSSV7J.cjs.map → chunk-XXEFDJHY.cjs.map} +1 -1
  100. package/dist/{chunk-GORCU2GR.cjs → chunk-Z4NU4MYB.cjs} +123 -123
  101. package/dist/{chunk-GORCU2GR.cjs.map → chunk-Z4NU4MYB.cjs.map} +1 -1
  102. package/dist/{chunk-KFC3OUV4.cjs → chunk-ZHK3HEZ2.cjs} +130 -130
  103. package/dist/{chunk-KFC3OUV4.cjs.map → chunk-ZHK3HEZ2.cjs.map} +1 -1
  104. package/dist/{chunk-FYMYLZGX.cjs → chunk-ZXXGMQC3.cjs} +10 -10
  105. package/dist/{chunk-FYMYLZGX.cjs.map → chunk-ZXXGMQC3.cjs.map} +1 -1
  106. package/dist/graph-merge/index.cjs +577 -99
  107. package/dist/graph-merge/index.cjs.map +1 -1
  108. package/dist/graph-merge/index.d.cts +108 -4
  109. package/dist/graph-merge/index.d.ts +108 -4
  110. package/dist/graph-merge/index.js +495 -21
  111. package/dist/graph-merge/index.js.map +1 -1
  112. package/dist/{graph-templates-qraW63Ry.d.ts → graph-templates-BSA9VU_O.d.ts} +1 -1
  113. package/dist/{graph-templates--hp2U4kn.d.cts → graph-templates-Cg7DpEOF.d.cts} +1 -1
  114. package/dist/index.cjs +95 -95
  115. package/dist/index.d.cts +3 -3
  116. package/dist/index.d.ts +3 -3
  117. package/dist/index.js +16 -16
  118. package/dist/interchange/index.cjs +33 -33
  119. package/dist/interchange/index.d.cts +1 -1
  120. package/dist/interchange/index.d.ts +1 -1
  121. package/dist/interchange/index.js +10 -10
  122. package/dist/{local-store-impl-HXBO3VF4.js → local-store-impl-77DCLAAY.js} +18 -18
  123. package/dist/{local-store-impl-HXBO3VF4.js.map → local-store-impl-77DCLAAY.js.map} +1 -1
  124. package/dist/{local-store-impl-CUQKHHOZ.cjs → local-store-impl-NJCWM3KR.cjs} +22 -22
  125. package/dist/{local-store-impl-CUQKHHOZ.cjs.map → local-store-impl-NJCWM3KR.cjs.map} +1 -1
  126. package/dist/{pglite-store-impl-BD3AVOUH.js → pglite-store-impl-3VFSYLAJ.js} +18 -18
  127. package/dist/{pglite-store-impl-BD3AVOUH.js.map → pglite-store-impl-3VFSYLAJ.js.map} +1 -1
  128. package/dist/{pglite-store-impl-C3MQ72LT.cjs → pglite-store-impl-LHLJ3GBQ.cjs} +22 -22
  129. package/dist/{pglite-store-impl-C3MQ72LT.cjs.map → pglite-store-impl-LHLJ3GBQ.cjs.map} +1 -1
  130. package/dist/profiler/index.d.cts +1 -1
  131. package/dist/profiler/index.d.ts +1 -1
  132. package/dist/provenance/index.cjs +21 -21
  133. package/dist/provenance/index.d.cts +1 -1
  134. package/dist/provenance/index.d.ts +1 -1
  135. package/dist/provenance/index.js +5 -5
  136. package/dist/schema/index.cjs +36 -36
  137. package/dist/schema/index.d.cts +3 -3
  138. package/dist/schema/index.d.ts +3 -3
  139. package/dist/schema/index.js +6 -6
  140. package/dist/{store-stw2AEB4.d.ts → store-CQ3uzXla.d.ts} +58 -27
  141. package/dist/{store-DTEkUQ0k.d.cts → store-DbHAgVMH.d.cts} +58 -27
  142. package/package.json +1 -1
  143. package/dist/chunk-74FNI3PT.js.map +0 -1
  144. package/dist/chunk-ECYEWFEH.cjs.map +0 -1
  145. package/dist/chunk-OJ47LMOB.cjs.map +0 -1
  146. package/dist/chunk-ORPT5EQW.cjs.map +0 -1
  147. package/dist/chunk-VU65FXEG.js.map +0 -1
  148. package/dist/chunk-YVKPUSHS.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { fV as NodeId, z as NodeType, cE as JsonValue, eV as EdgeId, d as GraphDef, fY as NodeKinds, fi as GetNodeType, aD as TypeGraphError, gs as TypeGraphErrorOptions, e as GraphBackend, fk as GraphAnnotations, cF as KindAnnotations, fO as MetaEdge, y as AnyEdgeType, bk as DeleteBehavior, T as TemporalMode, I as IndexDeclaration, ch as GraphExtensionVersion, bP as ExtensionNodeDef, bJ as ExtensionEdgeDef, bU as ExtensionOntologyRelation, bN as ExtensionIndex } from '../types-vg7PwMjm.cjs';
1
+ import { fV as NodeId, z as NodeType, cE as JsonValue, eV as EdgeId, d as GraphDef, fY as NodeKinds, fi as GetNodeType, G as GraphIdentityConfig, aD as TypeGraphError, gs as TypeGraphErrorOptions, e as GraphBackend, fk as GraphAnnotations, cF as KindAnnotations, fO as MetaEdge, y as AnyEdgeType, bk as DeleteBehavior, T as TemporalMode, I as IndexDeclaration, ch as GraphExtensionVersion, bP as ExtensionNodeDef, bJ as ExtensionEdgeDef, bU as ExtensionOntologyRelation, bN as ExtensionIndex } from '../types-vg7PwMjm.cjs';
2
2
  export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../types-vg7PwMjm.cjs';
3
+ import { b as Store, b0 as IdentityAssertionWriteFacade, bi as Node, cU as TransactionContext, dt as EDGE_TEMPORAL_READ_NAMES, g as IdentityFacade, du as IDENTITY_READ_NAMES, d0 as UniqueIntrospection } from '../store-DbHAgVMH.cjs';
3
4
  import { I as IngestionImportTarget } from '../ingestion-import-target-C6Z1ugDW.cjs';
4
- import { b as Store, a$ as IdentityAssertionWriteFacade, bh as Node, c$ as UniqueIntrospection } from '../store-DTEkUQ0k.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
7
  import { z } from 'zod';
@@ -744,6 +744,35 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
744
744
  }>;
745
745
  }>;
746
746
 
747
+ declare const NODE_READ_NAMES: readonly ["getById", "getByIds", "find", "count", "findByConstraint", "bulkFindByConstraint", "bulkFindByIndex"];
748
+ /** Transaction-bound reads available before applying a fenced merge plan. */
749
+ type MergePlanReadContext<G extends GraphDef> = Readonly<{
750
+ nodes: Readonly<{
751
+ [K in keyof TransactionContext<G>["nodes"]]: Pick<TransactionContext<G>["nodes"][K], (typeof NODE_READ_NAMES)[number]>;
752
+ }>;
753
+ edges: Readonly<{
754
+ [K in keyof TransactionContext<G>["edges"]]: Pick<TransactionContext<G>["edges"][K], (typeof EDGE_TEMPORAL_READ_NAMES)[number]>;
755
+ }>;
756
+ }> & (G["identity"] extends GraphIdentityConfig ? Readonly<{
757
+ identity: Pick<IdentityFacade<G>, (typeof IDENTITY_READ_NAMES)[number]>;
758
+ }> : Readonly<Record<never, never>>);
759
+ /** Plan effects inside an uncommitted transaction; excludes callback writes. */
760
+ type MergePlanApplied = Readonly<{
761
+ merged: MergedCounts;
762
+ }>;
763
+ /**
764
+ * Work composed with merge application in its own protected transaction.
765
+ * Both callbacks may be replayed (up to three attempts) on transaction conflicts.
766
+ * Await all work, use only the supplied context, and perform no external effects.
767
+ * Throw/reject to abort; returning a value (including a Result) is refused.
768
+ */
769
+ type MergePlanApplyOptions<G extends GraphDef> = Readonly<{
770
+ /** Runs after the target fence is checked, before plan writes. Reads only. */
771
+ beforeApply?: (reads: MergePlanReadContext<G>) => Promise<void>;
772
+ /** Runs after plan writes, before capture flush and commit. */
773
+ afterApply?: (tx: TransactionContext<G>, applied: MergePlanApplied) => Promise<void>;
774
+ }>;
775
+
747
776
  /**
748
777
  * `base@V` stamping.
749
778
  *
@@ -829,6 +858,7 @@ declare const MERGE_ERROR_CODES: {
829
858
  readonly candidateSource: "GRAPH_MERGE_CANDIDATE_SOURCE";
830
859
  readonly evidence: "GRAPH_MERGE_EVIDENCE";
831
860
  readonly candidateWriteSet: "GRAPH_MERGE_CANDIDATE_WRITE_SET";
861
+ readonly review: "GRAPH_MERGE_REVIEW";
832
862
  };
833
863
  /**
834
864
  * Options shared by every merge error. Mirrors the relevant subset of
@@ -854,6 +884,12 @@ declare class InvalidMergeOptionsError extends MergeError {
854
884
  readonly code: "GRAPH_MERGE_INVALID_OPTIONS";
855
885
  constructor(message: string, options?: MergeErrorOptions);
856
886
  }
887
+ /** Invalid, unsupported, or unavailable evidence for durable merge review. */
888
+ declare class MergeReviewError extends MergeError {
889
+ protected static readonly errorCategory = "user";
890
+ readonly code: "GRAPH_MERGE_REVIEW";
891
+ constructor(message: string, options?: MergeErrorOptions);
892
+ }
857
893
  /**
858
894
  * Failure raised while creating a working-copy branch of a base store
859
895
  * (clone/export/import failures, backend construction failures).
@@ -1446,6 +1482,74 @@ declare function captureCandidateWriteSetTarget<G extends GraphDef>(target: Stor
1446
1482
  */
1447
1483
  declare function planCandidateWriteSet<G extends GraphDef>(args: PlanCandidateWriteSetArgs<G>): Promise<Result<MergePlanArtifact, MergeError>>;
1448
1484
 
1485
+ declare const MERGE_REVIEW_FORMAT_VERSION: 1;
1486
+ /** Application-owned identity of policy code and all opaque/external dependencies. */
1487
+ type MergeReviewPolicy = Readonly<{
1488
+ id: string;
1489
+ /** Explicit evidence; use an empty object only when there are no such dependencies. */
1490
+ context: JsonValue;
1491
+ }>;
1492
+ /** A fingerprint of an observed row, or an expected absence. */
1493
+ type MergeReviewRow = MergePlanEntityRef & Readonly<{
1494
+ role: "node" | "edge";
1495
+ /** Absent means this reference did not exist at review time. */
1496
+ digest?: string | undefined;
1497
+ }>;
1498
+ /** Conservative baseline: all original rows and the complete identity ledger. */
1499
+ type MergeReviewBaseline = Readonly<{
1500
+ rows: readonly MergeReviewRow[];
1501
+ identityDigest: string;
1502
+ }>;
1503
+ /**
1504
+ * Immutable review evidence, distinct from its single-use execution plan.
1505
+ * V1 supports candidate write sets only. Authenticate stored artifacts separately.
1506
+ */
1507
+ type MergeReviewArtifact = Readonly<{
1508
+ formatVersion: typeof MERGE_REVIEW_FORMAT_VERSION;
1509
+ kind: "candidate-write-set";
1510
+ digest: MergePlanDigest;
1511
+ writeSet: CandidateWriteSet;
1512
+ policy: MergeReviewPolicy;
1513
+ options: JsonValue;
1514
+ plan: MergePlanArtifact;
1515
+ baseline: MergeReviewBaseline;
1516
+ }>;
1517
+ /** Structured reason to refuse approval reuse; paths name fields in the review. */
1518
+ type MergeReviewDifference = Readonly<{
1519
+ category: "target" | "policy" | "baseline" | "plan";
1520
+ path: string;
1521
+ entity?: MergePlanEntityRef & Readonly<{
1522
+ role: "node" | "edge";
1523
+ }>;
1524
+ }>;
1525
+ /** Compatibility is evidence for application policy, never an authorization decision. */
1526
+ type MergeReviewRevalidation = Readonly<{
1527
+ status: "compatible";
1528
+ reviewDigest: MergePlanDigest;
1529
+ plan: MergePlanArtifact;
1530
+ }> | Readonly<{
1531
+ status: "changed" | "incompatible";
1532
+ reviewDigest: MergePlanDigest;
1533
+ differences: readonly MergeReviewDifference[];
1534
+ /** Present when a fresh plan was computed; it requires a new review. */
1535
+ plan?: MergePlanArtifact;
1536
+ }>;
1537
+
1538
+ type PlanCandidateWriteSetReviewArgs<G extends GraphDef> = PlanCandidateWriteSetArgs<G> & Readonly<{
1539
+ policy: MergeReviewPolicy;
1540
+ }>;
1541
+ type RevalidateCandidateWriteSetReviewArgs<G extends GraphDef> = Omit<PlanCandidateWriteSetReviewArgs<G>, "writeSet"> & Readonly<{
1542
+ review: unknown;
1543
+ }>;
1544
+ /** Capture a durable review, with planning and baseline reads under one fence. */
1545
+ declare function planCandidateWriteSetReview<G extends GraphDef>(args: PlanCandidateWriteSetReviewArgs<G>): Promise<Result<MergeReviewArtifact, MergeError>>;
1546
+ /**
1547
+ * Replan the retained input and relate it to its original review. Never writes
1548
+ * the target, edits an old plan, or authorizes execution. Apply a compatible
1549
+ * result with applyMergePlan(), retaining its final transactional revision fence.
1550
+ */
1551
+ declare function revalidateCandidateWriteSetReview<G extends GraphDef>(args: RevalidateCandidateWriteSetReviewArgs<G>): Promise<Result<MergeReviewRevalidation, MergeError>>;
1552
+
1449
1553
  /**
1450
1554
  * Constraint-aware working copies for untrusted ingestion.
1451
1555
  *
@@ -1539,7 +1643,7 @@ declare function planMerge<G extends GraphDef>(store: Store<G>, branchInputs: re
1539
1643
  /** Builds a durable, reviewable incremental merge plan without mutating the target. */
1540
1644
  declare function planMergeIncremental<G extends GraphDef>(args: MergeIncrementalArgs<G>): Promise<Result<MergePlanArtifact, MergeError>>;
1541
1645
  /** Validates and atomically applies an approved serialized merge plan. */
1542
- declare function applyMergePlan<G extends GraphDef>(target: Store<G>, input: MergePlanArtifact): Promise<Result<MergeReport<G>, MergeError>>;
1646
+ declare function applyMergePlan<G extends GraphDef>(target: Store<G>, input: MergePlanArtifact, options?: MergePlanApplyOptions<NoInfer<G>>): Promise<Result<MergeReport<G>, MergeError>>;
1543
1647
  /**
1544
1648
  * Merges a set of branches back into a target store (design §7.2).
1545
1649
  *
@@ -1880,4 +1984,4 @@ type KeylessConfig = Readonly<{
1880
1984
  sortFields: readonly string[];
1881
1985
  }>;
1882
1986
 
1883
- export { type BaseAmbiguity, type BaseNodeLookup, type BaseVersion, BaseVersionMismatchError, BranchError, type BranchId, type BranchOptions, type BranchProvenance, CANDIDATE_WRITE_SET_FORMAT_VERSION, type CandidateDiagnostic, type CandidateDiagnostics, type CandidateDiagnosticsOptions, type CandidateSource, CandidateSourceError, type CandidateWriteSet, CandidateWriteSetError, CandidateWriteSetSchema, type CandidateWriteSetTarget, CandidateWriteSetTargetSchema, type ComparisonCeilingPolicy, type ConflictingValue, type DeleteModifyConflict, type DeleteModifyPolicy, type DroppedItem, type Embedder, type EntityRef, type EntityResolution, type GraphBranch, IdentityAssertionWriteFacade, IdentityMergeConflictError, type IngestionBranch, IngestionImportTarget, 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 PlanCandidateWriteSetArgs, 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, captureCandidateWriteSetTarget, cloneWorkingCopyStrategy, computeBaseVersion, ingestionBranch, merge, mergeIncremental, normalizeMergeOptions, openProvenanceStore, persistProvenanceRecords, planCandidateWriteSet, planMerge, planMergeIncremental, provenanceGraphId, readProvenance };
1987
+ export { type BaseAmbiguity, type BaseNodeLookup, type BaseVersion, BaseVersionMismatchError, BranchError, type BranchId, type BranchOptions, type BranchProvenance, CANDIDATE_WRITE_SET_FORMAT_VERSION, type CandidateDiagnostic, type CandidateDiagnostics, type CandidateDiagnosticsOptions, type CandidateSource, CandidateSourceError, type CandidateWriteSet, CandidateWriteSetError, CandidateWriteSetSchema, type CandidateWriteSetTarget, CandidateWriteSetTargetSchema, type ComparisonCeilingPolicy, type ConflictingValue, type DeleteModifyConflict, type DeleteModifyPolicy, type DroppedItem, type Embedder, type EntityRef, type EntityResolution, type GraphBranch, IdentityAssertionWriteFacade, IdentityMergeConflictError, type IngestionBranch, IngestionImportTarget, type IngestionNodeCollections, InvalidMergeOptionsError, InvalidMergePlanError, type KeylessConfig, MERGE_ERROR_CODES, MERGE_OPTION_DEFAULTS, MERGE_PLAN_DIGEST_ALGORITHM, MERGE_PLAN_FORMAT_VERSION, MERGE_REVIEW_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 MergePlanApplied, type MergePlanApplyOptions, 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 MergePlanReadContext, type MergePlanRetype, type MergePlanReview, type MergePlanRevisionFence, type MergePlanSchemaFence, MergePlanSchemaMismatchError, type MergePlanSimilarityStrategy, type MergePlanTargetFence, MergePlanTargetMismatchError, type MergePlanTypeReconciliation, type MergePlanWrites, MergePlanningStaleError, type MergeReport, type MergeReviewArtifact, type MergeReviewBaseline, type MergeReviewDifference, MergeReviewError, type MergeReviewPolicy, type MergeReviewRevalidation, type MergeReviewRow, type MergedCounts, type NormalizedMergeOptions, type PlanCandidateWriteSetArgs, type PlanCandidateWriteSetReviewArgs, type PropertyConflict, type PropertyConflictPolicy, type ProvenanceGraph, type ProvenanceIndex, type ProvenanceNode, type ProvenanceQuery, type ProvenanceRecord, type ReconcileTypesMode, type ResolveConfig, type ResolveMap, type ResolvedCluster, Result, type RevalidateCandidateWriteSetReviewArgs, type SimilarityStrategy, SimilarityUnavailableError, type SourceScope, StaleMergePlanError, type TypeReconciliation, UnsupportedMergePlanVersionError, VALIDITY_END_TARGET_PRECEDENCE, type ValidityEndResolution, type WorkingCopyStrategy, applyMergePlan, asBaseVersion, asBranchId, branch, captureCandidateWriteSetTarget, cloneWorkingCopyStrategy, computeBaseVersion, ingestionBranch, merge, mergeIncremental, normalizeMergeOptions, openProvenanceStore, persistProvenanceRecords, planCandidateWriteSet, planCandidateWriteSetReview, planMerge, planMergeIncremental, provenanceGraphId, readProvenance, revalidateCandidateWriteSetReview };
@@ -1,7 +1,7 @@
1
- import { fV as NodeId, z as NodeType, cE as JsonValue, eV as EdgeId, d as GraphDef, fY as NodeKinds, fi as GetNodeType, aD as TypeGraphError, gs as TypeGraphErrorOptions, e as GraphBackend, fk as GraphAnnotations, cF as KindAnnotations, fO as MetaEdge, y as AnyEdgeType, bk as DeleteBehavior, T as TemporalMode, I as IndexDeclaration, ch as GraphExtensionVersion, bP as ExtensionNodeDef, bJ as ExtensionEdgeDef, bU as ExtensionOntologyRelation, bN as ExtensionIndex } from '../types-vg7PwMjm.js';
1
+ import { fV as NodeId, z as NodeType, cE as JsonValue, eV as EdgeId, d as GraphDef, fY as NodeKinds, fi as GetNodeType, G as GraphIdentityConfig, aD as TypeGraphError, gs as TypeGraphErrorOptions, e as GraphBackend, fk as GraphAnnotations, cF as KindAnnotations, fO as MetaEdge, y as AnyEdgeType, bk as DeleteBehavior, T as TemporalMode, I as IndexDeclaration, ch as GraphExtensionVersion, bP as ExtensionNodeDef, bJ as ExtensionEdgeDef, bU as ExtensionOntologyRelation, bN as ExtensionIndex } from '../types-vg7PwMjm.js';
2
2
  export { C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult } from '../types-vg7PwMjm.js';
3
+ import { b as Store, b0 as IdentityAssertionWriteFacade, bi as Node, cU as TransactionContext, dt as EDGE_TEMPORAL_READ_NAMES, g as IdentityFacade, du as IDENTITY_READ_NAMES, d0 as UniqueIntrospection } from '../store-CQ3uzXla.js';
3
4
  import { I as IngestionImportTarget } from '../ingestion-import-target-Dt7cC-Et.js';
4
- import { b as Store, a$ as IdentityAssertionWriteFacade, bh as Node, c$ as UniqueIntrospection } from '../store-stw2AEB4.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';
@@ -744,6 +744,35 @@ type MergeReport<G extends GraphDef = GraphDef> = Readonly<{
744
744
  }>;
745
745
  }>;
746
746
 
747
+ declare const NODE_READ_NAMES: readonly ["getById", "getByIds", "find", "count", "findByConstraint", "bulkFindByConstraint", "bulkFindByIndex"];
748
+ /** Transaction-bound reads available before applying a fenced merge plan. */
749
+ type MergePlanReadContext<G extends GraphDef> = Readonly<{
750
+ nodes: Readonly<{
751
+ [K in keyof TransactionContext<G>["nodes"]]: Pick<TransactionContext<G>["nodes"][K], (typeof NODE_READ_NAMES)[number]>;
752
+ }>;
753
+ edges: Readonly<{
754
+ [K in keyof TransactionContext<G>["edges"]]: Pick<TransactionContext<G>["edges"][K], (typeof EDGE_TEMPORAL_READ_NAMES)[number]>;
755
+ }>;
756
+ }> & (G["identity"] extends GraphIdentityConfig ? Readonly<{
757
+ identity: Pick<IdentityFacade<G>, (typeof IDENTITY_READ_NAMES)[number]>;
758
+ }> : Readonly<Record<never, never>>);
759
+ /** Plan effects inside an uncommitted transaction; excludes callback writes. */
760
+ type MergePlanApplied = Readonly<{
761
+ merged: MergedCounts;
762
+ }>;
763
+ /**
764
+ * Work composed with merge application in its own protected transaction.
765
+ * Both callbacks may be replayed (up to three attempts) on transaction conflicts.
766
+ * Await all work, use only the supplied context, and perform no external effects.
767
+ * Throw/reject to abort; returning a value (including a Result) is refused.
768
+ */
769
+ type MergePlanApplyOptions<G extends GraphDef> = Readonly<{
770
+ /** Runs after the target fence is checked, before plan writes. Reads only. */
771
+ beforeApply?: (reads: MergePlanReadContext<G>) => Promise<void>;
772
+ /** Runs after plan writes, before capture flush and commit. */
773
+ afterApply?: (tx: TransactionContext<G>, applied: MergePlanApplied) => Promise<void>;
774
+ }>;
775
+
747
776
  /**
748
777
  * `base@V` stamping.
749
778
  *
@@ -829,6 +858,7 @@ declare const MERGE_ERROR_CODES: {
829
858
  readonly candidateSource: "GRAPH_MERGE_CANDIDATE_SOURCE";
830
859
  readonly evidence: "GRAPH_MERGE_EVIDENCE";
831
860
  readonly candidateWriteSet: "GRAPH_MERGE_CANDIDATE_WRITE_SET";
861
+ readonly review: "GRAPH_MERGE_REVIEW";
832
862
  };
833
863
  /**
834
864
  * Options shared by every merge error. Mirrors the relevant subset of
@@ -854,6 +884,12 @@ declare class InvalidMergeOptionsError extends MergeError {
854
884
  readonly code: "GRAPH_MERGE_INVALID_OPTIONS";
855
885
  constructor(message: string, options?: MergeErrorOptions);
856
886
  }
887
+ /** Invalid, unsupported, or unavailable evidence for durable merge review. */
888
+ declare class MergeReviewError extends MergeError {
889
+ protected static readonly errorCategory = "user";
890
+ readonly code: "GRAPH_MERGE_REVIEW";
891
+ constructor(message: string, options?: MergeErrorOptions);
892
+ }
857
893
  /**
858
894
  * Failure raised while creating a working-copy branch of a base store
859
895
  * (clone/export/import failures, backend construction failures).
@@ -1446,6 +1482,74 @@ declare function captureCandidateWriteSetTarget<G extends GraphDef>(target: Stor
1446
1482
  */
1447
1483
  declare function planCandidateWriteSet<G extends GraphDef>(args: PlanCandidateWriteSetArgs<G>): Promise<Result<MergePlanArtifact, MergeError>>;
1448
1484
 
1485
+ declare const MERGE_REVIEW_FORMAT_VERSION: 1;
1486
+ /** Application-owned identity of policy code and all opaque/external dependencies. */
1487
+ type MergeReviewPolicy = Readonly<{
1488
+ id: string;
1489
+ /** Explicit evidence; use an empty object only when there are no such dependencies. */
1490
+ context: JsonValue;
1491
+ }>;
1492
+ /** A fingerprint of an observed row, or an expected absence. */
1493
+ type MergeReviewRow = MergePlanEntityRef & Readonly<{
1494
+ role: "node" | "edge";
1495
+ /** Absent means this reference did not exist at review time. */
1496
+ digest?: string | undefined;
1497
+ }>;
1498
+ /** Conservative baseline: all original rows and the complete identity ledger. */
1499
+ type MergeReviewBaseline = Readonly<{
1500
+ rows: readonly MergeReviewRow[];
1501
+ identityDigest: string;
1502
+ }>;
1503
+ /**
1504
+ * Immutable review evidence, distinct from its single-use execution plan.
1505
+ * V1 supports candidate write sets only. Authenticate stored artifacts separately.
1506
+ */
1507
+ type MergeReviewArtifact = Readonly<{
1508
+ formatVersion: typeof MERGE_REVIEW_FORMAT_VERSION;
1509
+ kind: "candidate-write-set";
1510
+ digest: MergePlanDigest;
1511
+ writeSet: CandidateWriteSet;
1512
+ policy: MergeReviewPolicy;
1513
+ options: JsonValue;
1514
+ plan: MergePlanArtifact;
1515
+ baseline: MergeReviewBaseline;
1516
+ }>;
1517
+ /** Structured reason to refuse approval reuse; paths name fields in the review. */
1518
+ type MergeReviewDifference = Readonly<{
1519
+ category: "target" | "policy" | "baseline" | "plan";
1520
+ path: string;
1521
+ entity?: MergePlanEntityRef & Readonly<{
1522
+ role: "node" | "edge";
1523
+ }>;
1524
+ }>;
1525
+ /** Compatibility is evidence for application policy, never an authorization decision. */
1526
+ type MergeReviewRevalidation = Readonly<{
1527
+ status: "compatible";
1528
+ reviewDigest: MergePlanDigest;
1529
+ plan: MergePlanArtifact;
1530
+ }> | Readonly<{
1531
+ status: "changed" | "incompatible";
1532
+ reviewDigest: MergePlanDigest;
1533
+ differences: readonly MergeReviewDifference[];
1534
+ /** Present when a fresh plan was computed; it requires a new review. */
1535
+ plan?: MergePlanArtifact;
1536
+ }>;
1537
+
1538
+ type PlanCandidateWriteSetReviewArgs<G extends GraphDef> = PlanCandidateWriteSetArgs<G> & Readonly<{
1539
+ policy: MergeReviewPolicy;
1540
+ }>;
1541
+ type RevalidateCandidateWriteSetReviewArgs<G extends GraphDef> = Omit<PlanCandidateWriteSetReviewArgs<G>, "writeSet"> & Readonly<{
1542
+ review: unknown;
1543
+ }>;
1544
+ /** Capture a durable review, with planning and baseline reads under one fence. */
1545
+ declare function planCandidateWriteSetReview<G extends GraphDef>(args: PlanCandidateWriteSetReviewArgs<G>): Promise<Result<MergeReviewArtifact, MergeError>>;
1546
+ /**
1547
+ * Replan the retained input and relate it to its original review. Never writes
1548
+ * the target, edits an old plan, or authorizes execution. Apply a compatible
1549
+ * result with applyMergePlan(), retaining its final transactional revision fence.
1550
+ */
1551
+ declare function revalidateCandidateWriteSetReview<G extends GraphDef>(args: RevalidateCandidateWriteSetReviewArgs<G>): Promise<Result<MergeReviewRevalidation, MergeError>>;
1552
+
1449
1553
  /**
1450
1554
  * Constraint-aware working copies for untrusted ingestion.
1451
1555
  *
@@ -1539,7 +1643,7 @@ declare function planMerge<G extends GraphDef>(store: Store<G>, branchInputs: re
1539
1643
  /** Builds a durable, reviewable incremental merge plan without mutating the target. */
1540
1644
  declare function planMergeIncremental<G extends GraphDef>(args: MergeIncrementalArgs<G>): Promise<Result<MergePlanArtifact, MergeError>>;
1541
1645
  /** Validates and atomically applies an approved serialized merge plan. */
1542
- declare function applyMergePlan<G extends GraphDef>(target: Store<G>, input: MergePlanArtifact): Promise<Result<MergeReport<G>, MergeError>>;
1646
+ declare function applyMergePlan<G extends GraphDef>(target: Store<G>, input: MergePlanArtifact, options?: MergePlanApplyOptions<NoInfer<G>>): Promise<Result<MergeReport<G>, MergeError>>;
1543
1647
  /**
1544
1648
  * Merges a set of branches back into a target store (design §7.2).
1545
1649
  *
@@ -1880,4 +1984,4 @@ type KeylessConfig = Readonly<{
1880
1984
  sortFields: readonly string[];
1881
1985
  }>;
1882
1986
 
1883
- export { type BaseAmbiguity, type BaseNodeLookup, type BaseVersion, BaseVersionMismatchError, BranchError, type BranchId, type BranchOptions, type BranchProvenance, CANDIDATE_WRITE_SET_FORMAT_VERSION, type CandidateDiagnostic, type CandidateDiagnostics, type CandidateDiagnosticsOptions, type CandidateSource, CandidateSourceError, type CandidateWriteSet, CandidateWriteSetError, CandidateWriteSetSchema, type CandidateWriteSetTarget, CandidateWriteSetTargetSchema, type ComparisonCeilingPolicy, type ConflictingValue, type DeleteModifyConflict, type DeleteModifyPolicy, type DroppedItem, type Embedder, type EntityRef, type EntityResolution, type GraphBranch, IdentityAssertionWriteFacade, IdentityMergeConflictError, type IngestionBranch, IngestionImportTarget, 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 PlanCandidateWriteSetArgs, 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, captureCandidateWriteSetTarget, cloneWorkingCopyStrategy, computeBaseVersion, ingestionBranch, merge, mergeIncremental, normalizeMergeOptions, openProvenanceStore, persistProvenanceRecords, planCandidateWriteSet, planMerge, planMergeIncremental, provenanceGraphId, readProvenance };
1987
+ export { type BaseAmbiguity, type BaseNodeLookup, type BaseVersion, BaseVersionMismatchError, BranchError, type BranchId, type BranchOptions, type BranchProvenance, CANDIDATE_WRITE_SET_FORMAT_VERSION, type CandidateDiagnostic, type CandidateDiagnostics, type CandidateDiagnosticsOptions, type CandidateSource, CandidateSourceError, type CandidateWriteSet, CandidateWriteSetError, CandidateWriteSetSchema, type CandidateWriteSetTarget, CandidateWriteSetTargetSchema, type ComparisonCeilingPolicy, type ConflictingValue, type DeleteModifyConflict, type DeleteModifyPolicy, type DroppedItem, type Embedder, type EntityRef, type EntityResolution, type GraphBranch, IdentityAssertionWriteFacade, IdentityMergeConflictError, type IngestionBranch, IngestionImportTarget, type IngestionNodeCollections, InvalidMergeOptionsError, InvalidMergePlanError, type KeylessConfig, MERGE_ERROR_CODES, MERGE_OPTION_DEFAULTS, MERGE_PLAN_DIGEST_ALGORITHM, MERGE_PLAN_FORMAT_VERSION, MERGE_REVIEW_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 MergePlanApplied, type MergePlanApplyOptions, 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 MergePlanReadContext, type MergePlanRetype, type MergePlanReview, type MergePlanRevisionFence, type MergePlanSchemaFence, MergePlanSchemaMismatchError, type MergePlanSimilarityStrategy, type MergePlanTargetFence, MergePlanTargetMismatchError, type MergePlanTypeReconciliation, type MergePlanWrites, MergePlanningStaleError, type MergeReport, type MergeReviewArtifact, type MergeReviewBaseline, type MergeReviewDifference, MergeReviewError, type MergeReviewPolicy, type MergeReviewRevalidation, type MergeReviewRow, type MergedCounts, type NormalizedMergeOptions, type PlanCandidateWriteSetArgs, type PlanCandidateWriteSetReviewArgs, type PropertyConflict, type PropertyConflictPolicy, type ProvenanceGraph, type ProvenanceIndex, type ProvenanceNode, type ProvenanceQuery, type ProvenanceRecord, type ReconcileTypesMode, type ResolveConfig, type ResolveMap, type ResolvedCluster, Result, type RevalidateCandidateWriteSetReviewArgs, type SimilarityStrategy, SimilarityUnavailableError, type SourceScope, StaleMergePlanError, type TypeReconciliation, UnsupportedMergePlanVersionError, VALIDITY_END_TARGET_PRECEDENCE, type ValidityEndResolution, type WorkingCopyStrategy, applyMergePlan, asBaseVersion, asBranchId, branch, captureCandidateWriteSetTarget, cloneWorkingCopyStrategy, computeBaseVersion, ingestionBranch, merge, mergeIncremental, normalizeMergeOptions, openProvenanceStore, persistProvenanceRecords, planCandidateWriteSet, planCandidateWriteSetReview, planMerge, planMergeIncremental, provenanceGraphId, readProvenance, revalidateCandidateWriteSetReview };