@nicia-ai/typegraph 0.32.0 → 0.34.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 (264) hide show
  1. package/README.md +51 -0
  2. package/dist/backend/postgres/index.cjs +36 -19
  3. package/dist/backend/postgres/index.d.cts +6 -6
  4. package/dist/backend/postgres/index.d.ts +6 -6
  5. package/dist/backend/postgres/index.js +14 -9
  6. package/dist/backend/postgres/pglite.cjs +18 -13
  7. package/dist/backend/postgres/pglite.cjs.map +1 -1
  8. package/dist/backend/postgres/pglite.d.cts +3 -3
  9. package/dist/backend/postgres/pglite.d.ts +3 -3
  10. package/dist/backend/postgres/pglite.js +14 -9
  11. package/dist/backend/postgres/pglite.js.map +1 -1
  12. package/dist/backend/sqlite/index.cjs +34 -17
  13. package/dist/backend/sqlite/index.d.cts +7 -7
  14. package/dist/backend/sqlite/index.d.ts +7 -7
  15. package/dist/backend/sqlite/index.js +13 -8
  16. package/dist/backend/sqlite/libsql.cjs +19 -14
  17. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  18. package/dist/backend/sqlite/libsql.d.cts +12 -5
  19. package/dist/backend/sqlite/libsql.d.ts +12 -5
  20. package/dist/backend/sqlite/libsql.js +15 -10
  21. package/dist/backend/sqlite/libsql.js.map +1 -1
  22. package/dist/backend/sqlite/local.cjs +19 -14
  23. package/dist/backend/sqlite/local.cjs.map +1 -1
  24. package/dist/backend/sqlite/local.d.cts +3 -3
  25. package/dist/backend/sqlite/local.d.ts +3 -3
  26. package/dist/backend/sqlite/local.js +14 -9
  27. package/dist/backend/sqlite/local.js.map +1 -1
  28. package/dist/chunk-2EBMPJBO.js +16 -0
  29. package/dist/chunk-2EBMPJBO.js.map +1 -0
  30. package/dist/{chunk-CFNT3ITG.cjs → chunk-2JXB3NYJ.cjs} +15 -35
  31. package/dist/chunk-2JXB3NYJ.cjs.map +1 -0
  32. package/dist/chunk-2MRAX3UE.js +105 -0
  33. package/dist/chunk-2MRAX3UE.js.map +1 -0
  34. package/dist/{chunk-2LAT5BIK.cjs → chunk-3BRVBQQD.cjs} +2328 -3131
  35. package/dist/chunk-3BRVBQQD.cjs.map +1 -0
  36. package/dist/chunk-3E7SNSIA.cjs +55 -0
  37. package/dist/chunk-3E7SNSIA.cjs.map +1 -0
  38. package/dist/{chunk-FDN43KXV.cjs → chunk-3Z6TW3CT.cjs} +20 -19
  39. package/dist/chunk-3Z6TW3CT.cjs.map +1 -0
  40. package/dist/{chunk-IJORSAC3.js → chunk-4DIBPQNJ.js} +6 -4
  41. package/dist/chunk-4DIBPQNJ.js.map +1 -0
  42. package/dist/chunk-4S2FXGBJ.js +9 -0
  43. package/dist/chunk-4S2FXGBJ.js.map +1 -0
  44. package/dist/chunk-5IQIX7LU.cjs +2070 -0
  45. package/dist/chunk-5IQIX7LU.cjs.map +1 -0
  46. package/dist/{chunk-CWFPJ3RC.js → chunk-6GNSY7AV.js} +3 -3
  47. package/dist/{chunk-CWFPJ3RC.js.map → chunk-6GNSY7AV.js.map} +1 -1
  48. package/dist/{chunk-LAZGHOZW.cjs → chunk-6HVOHZHS.cjs} +184 -117
  49. package/dist/chunk-6HVOHZHS.cjs.map +1 -0
  50. package/dist/chunk-6SCVW4AS.js +20 -0
  51. package/dist/chunk-6SCVW4AS.js.map +1 -0
  52. package/dist/chunk-A7SZZFAG.js +2010 -0
  53. package/dist/chunk-A7SZZFAG.js.map +1 -0
  54. package/dist/chunk-ACSVZPK7.cjs +21 -0
  55. package/dist/chunk-ACSVZPK7.cjs.map +1 -0
  56. package/dist/{chunk-MXE2U3EX.js → chunk-BVTWD66D.js} +4 -115
  57. package/dist/chunk-BVTWD66D.js.map +1 -0
  58. package/dist/{chunk-W4ZX2GCP.js → chunk-CHXTTSC6.js} +5 -39
  59. package/dist/chunk-CHXTTSC6.js.map +1 -0
  60. package/dist/{chunk-XQFAJVYW.js → chunk-CYX2JTDG.js} +124 -5
  61. package/dist/chunk-CYX2JTDG.js.map +1 -0
  62. package/dist/{chunk-PRMKPFN5.js → chunk-DEQFL35G.js} +4 -3
  63. package/dist/chunk-DEQFL35G.js.map +1 -0
  64. package/dist/chunk-DI74SMXS.cjs +29 -0
  65. package/dist/chunk-DI74SMXS.cjs.map +1 -0
  66. package/dist/{chunk-WWVV44DY.cjs → chunk-G6SOJEDI.cjs} +11 -11
  67. package/dist/{chunk-WWVV44DY.cjs.map → chunk-G6SOJEDI.cjs.map} +1 -1
  68. package/dist/{chunk-LM2IC4ZJ.cjs → chunk-GQANNXXT.cjs} +15 -14
  69. package/dist/chunk-GQANNXXT.cjs.map +1 -0
  70. package/dist/chunk-GZCNZ7QW.js +24 -0
  71. package/dist/chunk-GZCNZ7QW.js.map +1 -0
  72. package/dist/{chunk-KTIEB7VH.cjs → chunk-HK5SATYM.cjs} +35 -58
  73. package/dist/chunk-HK5SATYM.cjs.map +1 -0
  74. package/dist/chunk-HMFK4BXR.cjs +12 -0
  75. package/dist/{chunk-6ZR4QC3O.cjs.map → chunk-HMFK4BXR.cjs.map} +1 -1
  76. package/dist/chunk-ITE4IXAK.js +25 -0
  77. package/dist/chunk-ITE4IXAK.js.map +1 -0
  78. package/dist/chunk-JJRCLAUN.cjs +155 -0
  79. package/dist/chunk-JJRCLAUN.cjs.map +1 -0
  80. package/dist/{chunk-ZFWNO3GE.cjs → chunk-JQGIPGVL.cjs} +66 -2
  81. package/dist/chunk-JQGIPGVL.cjs.map +1 -0
  82. package/dist/{chunk-2BVHPOIG.js → chunk-K2TGS3EN.js} +105 -38
  83. package/dist/chunk-K2TGS3EN.js.map +1 -0
  84. package/dist/chunk-K34OPSJK.js +29 -0
  85. package/dist/chunk-K34OPSJK.js.map +1 -0
  86. package/dist/{chunk-YW7GHMF4.cjs → chunk-KGC4LY5T.cjs} +18 -17
  87. package/dist/chunk-KGC4LY5T.cjs.map +1 -0
  88. package/dist/{chunk-SB65GJNY.cjs → chunk-KNHYNQQ3.cjs} +111 -72
  89. package/dist/chunk-KNHYNQQ3.cjs.map +1 -0
  90. package/dist/{chunk-C4C4Q7A6.js → chunk-KUTNI6SI.js} +6 -21
  91. package/dist/chunk-KUTNI6SI.js.map +1 -0
  92. package/dist/{chunk-NDM5PXEH.js → chunk-LANHCOXB.js} +44 -11
  93. package/dist/chunk-LANHCOXB.js.map +1 -0
  94. package/dist/chunk-N6WTUSBV.cjs +23 -0
  95. package/dist/chunk-N6WTUSBV.cjs.map +1 -0
  96. package/dist/{chunk-73KASJGO.cjs → chunk-NAUA4PW5.cjs} +4 -28
  97. package/dist/chunk-NAUA4PW5.cjs.map +1 -0
  98. package/dist/chunk-QV245VMN.js +145 -0
  99. package/dist/chunk-QV245VMN.js.map +1 -0
  100. package/dist/{chunk-CEF2QOTO.js → chunk-RBV7YCQD.js} +4 -3
  101. package/dist/chunk-RBV7YCQD.js.map +1 -0
  102. package/dist/chunk-RHZWOJVA.cjs +109 -0
  103. package/dist/chunk-RHZWOJVA.cjs.map +1 -0
  104. package/dist/{chunk-6RMLO5O4.cjs → chunk-RRKQAKD6.cjs} +13 -11
  105. package/dist/chunk-RRKQAKD6.cjs.map +1 -0
  106. package/dist/{chunk-TUA3MEJJ.js → chunk-RY2VIWAM.js} +612 -564
  107. package/dist/chunk-RY2VIWAM.js.map +1 -0
  108. package/dist/{chunk-PIHXFF73.js → chunk-SHLY4MCM.js} +3 -3
  109. package/dist/{chunk-PIHXFF73.js.map → chunk-SHLY4MCM.js.map} +1 -1
  110. package/dist/{chunk-HFBRAOF7.js → chunk-T2DWPQNE.js} +103 -64
  111. package/dist/chunk-T2DWPQNE.js.map +1 -0
  112. package/dist/{chunk-WYTUF3QO.js → chunk-T46GR2VY.js} +3 -3
  113. package/dist/{chunk-WYTUF3QO.js.map → chunk-T46GR2VY.js.map} +1 -1
  114. package/dist/{chunk-EEYV6UOE.cjs → chunk-T6SPUYLX.cjs} +5 -43
  115. package/dist/chunk-T6SPUYLX.cjs.map +1 -0
  116. package/dist/{chunk-3QRBXYT5.cjs → chunk-TGJE22RM.cjs} +6 -6
  117. package/dist/{chunk-3QRBXYT5.cjs.map → chunk-TGJE22RM.cjs.map} +1 -1
  118. package/dist/{chunk-YL4F3CMD.cjs → chunk-TOTPVGOG.cjs} +105 -72
  119. package/dist/chunk-TOTPVGOG.cjs.map +1 -0
  120. package/dist/{chunk-3HQDMOBK.cjs → chunk-UJLOZYKT.cjs} +680 -636
  121. package/dist/chunk-UJLOZYKT.cjs.map +1 -0
  122. package/dist/chunk-UNNPKQUG.cjs +1390 -0
  123. package/dist/chunk-UNNPKQUG.cjs.map +1 -0
  124. package/dist/chunk-UR7W5YQK.js +18 -0
  125. package/dist/chunk-UR7W5YQK.js.map +1 -0
  126. package/dist/chunk-V3QNTB7Z.js +1351 -0
  127. package/dist/chunk-V3QNTB7Z.js.map +1 -0
  128. package/dist/{chunk-XKNAK27R.js → chunk-VCGO4V26.js} +4 -3
  129. package/dist/chunk-VCGO4V26.js.map +1 -0
  130. package/dist/{chunk-YQGLVWB2.cjs → chunk-WL2SG7ZV.cjs} +6 -122
  131. package/dist/chunk-WL2SG7ZV.cjs.map +1 -0
  132. package/dist/{chunk-WNORITK6.js → chunk-WLRIWYHQ.js} +2041 -2834
  133. package/dist/chunk-WLRIWYHQ.js.map +1 -0
  134. package/dist/{chunk-JKRKIEVA.cjs → chunk-WVC2Q2FD.cjs} +128 -6
  135. package/dist/chunk-WVC2Q2FD.cjs.map +1 -0
  136. package/dist/chunk-XLUNB2TZ.js +53 -0
  137. package/dist/chunk-XLUNB2TZ.js.map +1 -0
  138. package/dist/chunk-XXVEULWX.js +39 -0
  139. package/dist/chunk-XXVEULWX.js.map +1 -0
  140. package/dist/chunk-YAZE7QZR.cjs +32 -0
  141. package/dist/chunk-YAZE7QZR.cjs.map +1 -0
  142. package/dist/chunk-YC6PWTHY.cjs +44 -0
  143. package/dist/chunk-YC6PWTHY.cjs.map +1 -0
  144. package/dist/chunk-Z5HBYM7U.cjs +11 -0
  145. package/dist/chunk-Z5HBYM7U.cjs.map +1 -0
  146. package/dist/{chunk-454I6GDF.js → chunk-Z5XBMDXU.js} +63 -3
  147. package/dist/chunk-Z5XBMDXU.js.map +1 -0
  148. package/dist/{chunk-CAMMC3E4.cjs → chunk-ZP5WHI4C.cjs} +109 -81
  149. package/dist/chunk-ZP5WHI4C.cjs.map +1 -0
  150. package/dist/{chunk-YCV72E6L.js → chunk-ZURTTSCM.js} +4 -25
  151. package/dist/chunk-ZURTTSCM.js.map +1 -0
  152. package/dist/{chunk-7WW3WL6E.js → chunk-ZV5N4DBG.js} +49 -21
  153. package/dist/chunk-ZV5N4DBG.js.map +1 -0
  154. package/dist/chunk-ZY4GXIVN.cjs +32 -0
  155. package/dist/chunk-ZY4GXIVN.cjs.map +1 -0
  156. package/dist/{ddl-C8e8zDAE.d.ts → ddl-BrmPg61z.d.ts} +3 -3
  157. package/dist/{ddl-CwyG4HoQ.d.cts → ddl-j1-sH6lE.d.cts} +3 -3
  158. package/dist/{extension-types-D1k0inWU.d.cts → extension-types-YGFJPrzK.d.cts} +1 -1
  159. package/dist/{extension-types-D1k0inWU.d.ts → extension-types-YGFJPrzK.d.ts} +1 -1
  160. package/dist/graph-extension/index.cjs +18 -17
  161. package/dist/graph-extension/index.d.cts +4 -4
  162. package/dist/graph-extension/index.d.ts +4 -4
  163. package/dist/graph-extension/index.js +3 -2
  164. package/dist/graph-merge/index.cjs +295 -146
  165. package/dist/graph-merge/index.cjs.map +1 -1
  166. package/dist/graph-merge/index.d.cts +6 -6
  167. package/dist/graph-merge/index.d.ts +6 -6
  168. package/dist/graph-merge/index.js +173 -24
  169. package/dist/graph-merge/index.js.map +1 -1
  170. package/dist/{index-BEK0VtNB.d.ts → index-DGX6D9j1.d.ts} +2 -2
  171. package/dist/{index-C8sSTErx.d.cts → index-SEvUHDA6.d.cts} +2 -2
  172. package/dist/index.cjs +206 -172
  173. package/dist/index.cjs.map +1 -1
  174. package/dist/index.d.cts +25 -55
  175. package/dist/index.d.ts +25 -55
  176. package/dist/index.js +32 -22
  177. package/dist/index.js.map +1 -1
  178. package/dist/indexes/index.cjs +28 -25
  179. package/dist/indexes/index.d.cts +5 -5
  180. package/dist/indexes/index.d.ts +5 -5
  181. package/dist/indexes/index.js +10 -7
  182. package/dist/interchange/index.cjs +25 -16
  183. package/dist/interchange/index.d.cts +5 -5
  184. package/dist/interchange/index.d.ts +5 -5
  185. package/dist/interchange/index.js +12 -3
  186. package/dist/{manager-8htmuGr-.d.ts → manager-BZUeN_BU.d.ts} +2 -2
  187. package/dist/{manager-aVgxbGt-.d.cts → manager-ms9cKdc6.d.cts} +2 -2
  188. package/dist/{materialize-indexes-CAGhqPHQ.d.ts → materialize-indexes-CAkIYFV-.d.ts} +1 -1
  189. package/dist/{materialize-indexes-DEYkU-wr.d.cts → materialize-indexes-D20xNluI.d.cts} +1 -1
  190. package/dist/{postgres-Dhom7iiX.d.ts → postgres-BhpxGMC5.d.cts} +2651 -596
  191. package/dist/{postgres-jgXmD45C.d.cts → postgres-CWHLwNl1.d.ts} +2651 -596
  192. package/dist/profiler/index.cjs +5 -4
  193. package/dist/profiler/index.cjs.map +1 -1
  194. package/dist/profiler/index.d.cts +7 -7
  195. package/dist/profiler/index.d.ts +7 -7
  196. package/dist/profiler/index.js +3 -2
  197. package/dist/profiler/index.js.map +1 -1
  198. package/dist/provenance/index.cjs +591 -0
  199. package/dist/provenance/index.cjs.map +1 -0
  200. package/dist/provenance/index.d.cts +73 -0
  201. package/dist/provenance/index.d.ts +73 -0
  202. package/dist/provenance/index.js +589 -0
  203. package/dist/provenance/index.js.map +1 -0
  204. package/dist/schema/index.cjs +37 -32
  205. package/dist/schema/index.cjs.map +1 -1
  206. package/dist/schema/index.d.cts +7 -7
  207. package/dist/schema/index.d.ts +7 -7
  208. package/dist/schema/index.js +14 -9
  209. package/dist/schema/index.js.map +1 -1
  210. package/dist/{sqlite-DcQ_BCUW.d.cts → sqlite-CGu5SLsw.d.ts} +2726 -455
  211. package/dist/{sqlite-BfLsCEqO.d.ts → sqlite-XrDxNaa7.d.cts} +2726 -455
  212. package/dist/{store-view-pBOUrQte.d.ts → store-view-BlgnhEYf.d.ts} +467 -131
  213. package/dist/{store-view-lTcb_cnp.d.cts → store-view-D09po4H6.d.cts} +467 -131
  214. package/dist/{types-DGDiXAYc.d.ts → types-B1TbZJYS.d.ts} +2 -2
  215. package/dist/{types-Dk8r09KY.d.ts → types-D1Sqeyxy.d.ts} +161 -26
  216. package/dist/{types-5RQwzWXx.d.cts → types-DiE1AO7p.d.cts} +2 -2
  217. package/dist/{types-Dvmn-eal.d.cts → types-DkNnF-7K.d.cts} +161 -26
  218. package/dist/{where-Cx_glEEB.d.cts → where-DKjuofPr.d.cts} +2 -2
  219. package/dist/{where-CHZFELX0.d.ts → where-DrUIIWHb.d.ts} +2 -2
  220. package/package.json +8 -2
  221. package/dist/chunk-2BVHPOIG.js.map +0 -1
  222. package/dist/chunk-2LAT5BIK.cjs.map +0 -1
  223. package/dist/chunk-2YMGNYXY.js +0 -40
  224. package/dist/chunk-2YMGNYXY.js.map +0 -1
  225. package/dist/chunk-3HQDMOBK.cjs.map +0 -1
  226. package/dist/chunk-454I6GDF.js.map +0 -1
  227. package/dist/chunk-6G35I3VW.cjs +0 -40
  228. package/dist/chunk-6G35I3VW.cjs.map +0 -1
  229. package/dist/chunk-6RMLO5O4.cjs.map +0 -1
  230. package/dist/chunk-6ZR4QC3O.cjs +0 -12
  231. package/dist/chunk-73KASJGO.cjs.map +0 -1
  232. package/dist/chunk-7WW3WL6E.js.map +0 -1
  233. package/dist/chunk-C4C4Q7A6.js.map +0 -1
  234. package/dist/chunk-CAMMC3E4.cjs.map +0 -1
  235. package/dist/chunk-CEF2QOTO.js.map +0 -1
  236. package/dist/chunk-CFNT3ITG.cjs.map +0 -1
  237. package/dist/chunk-EEYV6UOE.cjs.map +0 -1
  238. package/dist/chunk-FDN43KXV.cjs.map +0 -1
  239. package/dist/chunk-HFBRAOF7.js.map +0 -1
  240. package/dist/chunk-IJORSAC3.js.map +0 -1
  241. package/dist/chunk-JKRKIEVA.cjs.map +0 -1
  242. package/dist/chunk-KTIEB7VH.cjs.map +0 -1
  243. package/dist/chunk-LAZGHOZW.cjs.map +0 -1
  244. package/dist/chunk-LM2IC4ZJ.cjs.map +0 -1
  245. package/dist/chunk-M6OC455F.js +0 -65
  246. package/dist/chunk-M6OC455F.js.map +0 -1
  247. package/dist/chunk-MXE2U3EX.js.map +0 -1
  248. package/dist/chunk-NDM5PXEH.js.map +0 -1
  249. package/dist/chunk-PRMKPFN5.js.map +0 -1
  250. package/dist/chunk-RP7YITHX.cjs +0 -70
  251. package/dist/chunk-RP7YITHX.cjs.map +0 -1
  252. package/dist/chunk-SAJSMR2B.js +0 -35
  253. package/dist/chunk-SAJSMR2B.js.map +0 -1
  254. package/dist/chunk-SB65GJNY.cjs.map +0 -1
  255. package/dist/chunk-TUA3MEJJ.js.map +0 -1
  256. package/dist/chunk-W4ZX2GCP.js.map +0 -1
  257. package/dist/chunk-WNORITK6.js.map +0 -1
  258. package/dist/chunk-XKNAK27R.js.map +0 -1
  259. package/dist/chunk-XQFAJVYW.js.map +0 -1
  260. package/dist/chunk-YCV72E6L.js.map +0 -1
  261. package/dist/chunk-YL4F3CMD.cjs.map +0 -1
  262. package/dist/chunk-YQGLVWB2.cjs.map +0 -1
  263. package/dist/chunk-YW7GHMF4.cjs.map +0 -1
  264. package/dist/chunk-ZFWNO3GE.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { K as KindEntity } from './extension-types-D1k0inWU.js';
2
- import { J as JsonPointer } from './types-Dk8r09KY.js';
1
+ import { K as KindEntity } from './extension-types-YGFJPrzK.js';
2
+ import { J as JsonPointer } from './types-D1Sqeyxy.js';
3
3
 
4
4
  /**
5
5
  * QueryProfiler types.
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { N as NodeType, g as EdgeType, U as UniquenessScope, C as Collation, D as DeleteBehavior, f as KindAnnotations, m as Cardinality, n as EndpointExistence, T as TemporalMode, G as GraphExtension, I as IndexEntity, K as KindEntity, a as NullCheckOp, A as AnyEdgeType } from './extension-types-D1k0inWU.js';
2
+ import { N as NodeType, g as EdgeType, s as UniquenessScope, n as Collation, D as DeleteBehavior, f as KindAnnotations, m as Cardinality, q as EndpointExistence, T as TemporalMode, G as GraphExtension, I as IndexEntity, K as KindEntity, a as NullCheckOp, A as AnyEdgeType } from './extension-types-YGFJPrzK.js';
3
3
  import { SQL } from 'drizzle-orm';
4
4
  import { PgDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
5
5
  import { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
@@ -120,25 +120,68 @@ type SqlTableNames = Readonly<{
120
120
  nodes: string;
121
121
  /** Edges table name (default: "typegraph_edges") */
122
122
  edges: string;
123
+ /** Recorded node relation table name (default: "typegraph_recorded_nodes") */
124
+ recordedNodes?: string | undefined;
125
+ /** Recorded edge relation table name (default: "typegraph_recorded_edges") */
126
+ recordedEdges?: string | undefined;
127
+ /** Recorded-time commit clock table name (default: "typegraph_recorded_clock") */
128
+ recordedClock?: string | undefined;
123
129
  /** Node fulltext table name (default: "typegraph_node_fulltext") */
124
130
  fulltext: string;
125
131
  /** Node uniques table name (default: "typegraph_node_uniques") */
126
132
  uniques: string;
127
133
  }>;
128
- /**
129
- * SQL schema configuration for query compilation.
130
- * Contains table identifiers and utility methods for generating SQL references.
131
- */
132
- type SqlSchema = Readonly<{
134
+ type ResolvedSqlTableNames = Readonly<{
135
+ /** Nodes table name */
136
+ nodes: string;
137
+ /** Edges table name */
138
+ edges: string;
139
+ /** Recorded node relation table name */
140
+ recordedNodes: string;
141
+ /** Recorded edge relation table name */
142
+ recordedEdges: string;
143
+ /** Recorded-time commit clock table name */
144
+ recordedClock: string;
145
+ /** Node fulltext table name */
146
+ fulltext: string;
147
+ /** Node uniques table name */
148
+ uniques: string;
149
+ }>;
150
+ type SqlSchemaFields = Readonly<{
133
151
  /** Table names */
134
- tables: SqlTableNames;
152
+ tables: ResolvedSqlTableNames;
135
153
  /** Get a SQL reference to the nodes table */
136
154
  nodesTable: SQL;
137
155
  /** Get a SQL reference to the edges table */
138
156
  edgesTable: SQL;
157
+ /** Get a SQL reference to the recorded node relation */
158
+ recordedNodesTable: SQL;
159
+ /** Get a SQL reference to the recorded edge relation */
160
+ recordedEdgesTable: SQL;
161
+ /** Get a SQL reference to the recorded-time commit clock */
162
+ recordedClockTable: SQL;
139
163
  /** Get a SQL reference to the fulltext table */
140
164
  fulltextTable: SQL;
141
165
  }>;
166
+ /**
167
+ * SQL schema configuration for query compilation.
168
+ * Contains table identifiers and utility methods for generating SQL references.
169
+ *
170
+ * Branded and frozen by {@link createSqlSchema}; callers should not construct
171
+ * schema-shaped objects by hand.
172
+ */
173
+ type SqlSchema = SqlSchemaDescriptor;
174
+ declare class SqlSchemaDescriptor implements SqlSchemaFields {
175
+ #private;
176
+ readonly tables: ResolvedSqlTableNames;
177
+ readonly nodesTable: SQL;
178
+ readonly edgesTable: SQL;
179
+ readonly recordedNodesTable: SQL;
180
+ readonly recordedEdgesTable: SQL;
181
+ readonly recordedClockTable: SQL;
182
+ readonly fulltextTable: SQL;
183
+ constructor(fields: SqlSchemaFields);
184
+ }
142
185
  /**
143
186
  * Creates a SqlSchema configuration from table names.
144
187
  *
@@ -163,6 +206,34 @@ type SqlSchema = Readonly<{
163
206
  * ```
164
207
  */
165
208
  declare function createSqlSchema(names?: Partial<SqlTableNames>): SqlSchema;
209
+ /**
210
+ * The recorded/system-time relation a read coordinate may reconstruct from.
211
+ *
212
+ * TypeGraph's built-in capture relation is bound by `createStore(..., {
213
+ * history: true })`. Hosts can also bind externally populated row-compatible
214
+ * recorded relations through `recordedRelation({ schema })`. Keeping both as
215
+ * explicit values separates the read contract from the write-capture mechanism
216
+ * so future external/TMS-owned recorded relations can feed the same query
217
+ * machinery without changing StoreView or ReadCoordinate.
218
+ */
219
+ declare const EXTERNAL_RECORDED_READ_SOURCE: unique symbol;
220
+ type ExternalRecordedReadSource = Readonly<{
221
+ source: "external";
222
+ schema: SqlSchema;
223
+ [EXTERNAL_RECORDED_READ_SOURCE]: true;
224
+ }>;
225
+ declare const TYPEGRAPH_RECORDED_READ_SOURCE: unique symbol;
226
+ type TypeGraphRecordedReadSource = Readonly<{
227
+ source: "typegraph-capture";
228
+ schema: SqlSchema;
229
+ [TYPEGRAPH_RECORDED_READ_SOURCE]: true;
230
+ }>;
231
+ type RecordedReadSource = ExternalRecordedReadSource | TypeGraphRecordedReadSource;
232
+ type RecordedReadBinding = RecordedReadSource;
233
+ type RecordedRelationOptions = Readonly<{
234
+ schema: SqlSchema;
235
+ }>;
236
+ declare function recordedRelation(options: RecordedRelationOptions): ExternalRecordedReadSource;
166
237
  /**
167
238
  * Default SqlSchema using standard TypeGraph table names.
168
239
  */
@@ -527,6 +598,18 @@ interface VectorStrategy {
527
598
  buildDropIndex?(slot: VectorSlot): SQL | undefined;
528
599
  }
529
600
 
601
+ declare const SqlIntentBrand: unique symbol;
602
+ type SqlIntent = "rows" | "statement";
603
+ type IntentSql<I extends SqlIntent> = SQL & Readonly<{
604
+ [SqlIntentBrand]: I;
605
+ }>;
606
+ type CompiledRowsSql = IntentSql<"rows">;
607
+ type CompiledSelectSql = CompiledRowsSql;
608
+ type CompiledStatementSql = IntentSql<"statement">;
609
+ declare function asCompiledRowsSql(query: SQL): CompiledRowsSql;
610
+ declare function asCompiledSelectSql(query: SQL): CompiledSelectSql;
611
+ declare function asCompiledStatementSql(query: SQL): CompiledStatementSql;
612
+
530
613
  /**
531
614
  * SQL Dialect Abstraction Layer
532
615
  *
@@ -711,10 +794,14 @@ type AnyPgDatabase = PgDatabase<PgQueryResultHKT, Record<string, unknown>>;
711
794
  /**
712
795
  * Controls how the backend manages SQLite transactions.
713
796
  *
714
- * - `"sql"`: TypeGraph issues BEGIN / COMMIT / ROLLBACK SQL directly.
715
- * Default for sync drivers (better-sqlite3, bun:sqlite).
797
+ * - `"sql"`: TypeGraph issues BEGIN / COMMIT / ROLLBACK SQL directly on
798
+ * the connection. Default for sync drivers (better-sqlite3,
799
+ * bun:sqlite); also selected by `createLibsqlBackend` for
800
+ * local `@libsql/client` connections (`file:` / `:memory:`),
801
+ * whose `client.transaction()` permanently abandons the
802
+ * current connection — fatal for an in-memory database.
716
803
  * - `"drizzle"`: Delegates to Drizzle's `db.transaction()` method.
717
- * Default for async drivers (libsql, sql.js).
804
+ * Default for async drivers (remote libsql/Turso, sql.js).
718
805
  * - `"do-sqlite"`: Delegates to the Cloudflare Durable Objects async
719
806
  * storage transaction runner (`db.$client.transaction`,
720
807
  * i.e. `ctx.storage.transaction(async ...)`). Drizzle's
@@ -801,6 +888,26 @@ type BackendCapabilities = Readonly<{
801
888
  transactions: boolean;
802
889
  /** Whether the backend supports SQL window functions such as ROW_NUMBER() */
803
890
  windowFunctions: boolean;
891
+ /**
892
+ * Whether the backend's `execute()` supports `UPDATE … RETURNING`. Absent or
893
+ * `true` means supported (every engine TypeGraph ships — SQLite ≥ 3.35,
894
+ * PostgreSQL ≥ 8.2 — supports it). A custom backend whose engine cannot run
895
+ * `RETURNING` must set this to `false` so recorded-time history capture
896
+ * (`history: true`), which relies on `UPDATE … RETURNING` on its hot path,
897
+ * is refused up front instead of failing mid-flush.
898
+ */
899
+ returning?: boolean;
900
+ /**
901
+ * Maximum number of bound parameters the engine accepts in one statement.
902
+ * SQLite defaults to 999 (raisable at compile time via
903
+ * `SQLITE_MAX_VARIABLE_NUMBER`); PostgreSQL's wire protocol caps it at 65535.
904
+ * Recorded-time capture and recorded point reads size their multi-row
905
+ * statements to this ceiling — the same budget the backend's own batched
906
+ * inserts use — instead of a conservative dialect-blind constant. A custom
907
+ * build that raises the SQLite limit can override this here. Absent means the
908
+ * recorded-time fallback budget applies.
909
+ */
910
+ maxBindParameters?: number;
804
911
  /** Vector search capabilities (undefined if not configured) */
805
912
  vector?: VectorCapabilities | undefined;
806
913
  /** Fulltext search capabilities (undefined if not configured) */
@@ -1327,20 +1434,6 @@ type TransactionOptions = Readonly<{
1327
1434
  * relational writes share one Postgres/SQLite transaction (#134).
1328
1435
  */
1329
1436
  type AdoptedTransaction = AnyPgDatabase | AnySqliteDatabase;
1330
- /**
1331
- * Transaction backend — a backend scoped to a transaction.
1332
- *
1333
- * `commitSchemaVersion` and `setActiveVersion` are intentionally omitted:
1334
- * the atomicity / CAS guarantees of those primitives depend on
1335
- * dialect-specific write-locking (BEGIN IMMEDIATE on SQLite,
1336
- * `pg_advisory_xact_lock` on Postgres) acquired by the top-level
1337
- * backend wrappers, not the transaction itself. Calling them from a
1338
- * user-supplied `backend.transaction(...)` callback would bypass that
1339
- * locking and silently weaken the orphan-row crash window the primitive
1340
- * exists to eliminate. Schema commits go through the top-level backend
1341
- * methods only.
1342
- */
1343
- type TransactionBackend = Omit<GraphBackend, "transaction" | "adoptTransaction" | "close" | "refreshStatistics" | "commitSchemaVersion" | "setActiveVersion">;
1344
1437
  /**
1345
1438
  * The GraphBackend interface abstracts database operations.
1346
1439
  *
@@ -1637,7 +1730,14 @@ type GraphBackend = Readonly<{
1637
1730
  * sizes this library is designed for.
1638
1731
  */
1639
1732
  refreshStatistics: () => Promise<void>;
1640
- execute: <T>(query: SQL) => Promise<readonly T[]>;
1733
+ execute: <T>(query: CompiledRowsSql) => Promise<readonly T[]>;
1734
+ /**
1735
+ * Execute a non-row-returning SQL statement bound to this backend or
1736
+ * transaction. Optional because custom backends may only expose the public
1737
+ * row-returning query path; features that need statement execution must
1738
+ * capability-check and fail loudly.
1739
+ */
1740
+ executeStatement?: (query: CompiledStatementSql) => Promise<void>;
1641
1741
  /** Execute pre-compiled SQL text with bound parameters. Available on sync SQLite and pg backends. */
1642
1742
  executeRaw?: <T>(sqlText: string, params: readonly unknown[]) => Promise<readonly T[]>;
1643
1743
  /** Compile a Drizzle SQL object to { sql, params } without executing. */
@@ -1699,6 +1799,39 @@ type GraphBackend = Readonly<{
1699
1799
  adoptTransaction?: (externalTx: AdoptedTransaction) => TransactionBackend;
1700
1800
  close: () => Promise<void>;
1701
1801
  }>;
1802
+ type BackendIdentity = Pick<GraphBackend, "dialect" | "capabilities" | "tableNames" | "fulltextStrategy" | "vectorStrategy">;
1803
+ type NodeEntityReadBackend = Pick<GraphBackend, "getNode" | "getNodes" | "findNodesByKind" | "countNodesByKind">;
1804
+ type NodeEntityWriteBackend = Pick<GraphBackend, "insertNode" | "insertNodeNoReturn" | "insertNodesBatch" | "insertNodesBatchReturning" | "updateNode" | "deleteNode" | "hardDeleteNode">;
1805
+ type EdgeEntityReadBackend = Pick<GraphBackend, "getEdge" | "getEdges" | "countEdgesFrom" | "edgeExistsBetween" | "findEdgesConnectedTo" | "findEdgesByKind" | "countEdgesByKind">;
1806
+ type EdgeEntityWriteBackend = Pick<GraphBackend, "insertEdge" | "insertEdgeNoReturn" | "insertEdgesBatch" | "insertEdgesBatchReturning" | "updateEdge" | "deleteEdge" | "hardDeleteEdge">;
1807
+ type GraphEntityReadBackend = NodeEntityReadBackend & EdgeEntityReadBackend;
1808
+ type GraphEntityWriteBackend = NodeEntityWriteBackend & EdgeEntityWriteBackend;
1809
+ type UniqueConstraintBackend = Pick<GraphBackend, "insertUnique" | "deleteUnique" | "checkUnique" | "checkUniqueBatch">;
1810
+ type SchemaReadBackend = Pick<GraphBackend, "getActiveSchema" | "getSchemaVersion">;
1811
+ type SchemaCommitBackend = Pick<GraphBackend, "commitSchemaVersion" | "setActiveVersion">;
1812
+ type VectorOperationBackend = Pick<GraphBackend, "upsertEmbedding" | "deleteEmbedding" | "vectorSearch" | "createVectorIndex" | "dropVectorIndex">;
1813
+ type FulltextOperationBackend = Pick<GraphBackend, "upsertFulltext" | "deleteFulltext" | "upsertFulltextBatch" | "deleteFulltextBatch" | "fulltextSearch">;
1814
+ type IndexMaterializationBackend = Pick<GraphBackend, "ensureIndexMaterializationsTable" | "getIndexMaterialization" | "getIndexMaterializations" | "recordIndexMaterialization">;
1815
+ type ContributionMaterializationBackend = Pick<GraphBackend, "ensureContributionMaterializationsTable" | "getContributionMaterialization" | "recordContributionMaterialization" | "assertRuntimeContributionsInitialized" | "ensureRuntimeContributions" | "ensureFulltextTable">;
1816
+ type RemovalMaterializationBackend = Pick<GraphBackend, "ensureKindRemovalsTable" | "getPendingKindRemovals" | "getAllKindRemovals" | "recordKindRemoval" | "ensureReconciliationMarkersTable" | "getReconciliationMarker" | "setReconciliationMarker">;
1817
+ type GraphLifecycleBackend = Pick<GraphBackend, "clearGraph" | "bootstrapTables">;
1818
+ type QueryExecutionBackend = Pick<GraphBackend, "execute">;
1819
+ type RawQueryExecutionBackend = Pick<GraphBackend, "executeRaw" | "compileSql">;
1820
+ type RawStatementExecutionBackend = Pick<GraphBackend, "executeStatement" | "executeDdl">;
1821
+ type BackendMaintenance = Pick<GraphBackend, "refreshStatistics">;
1822
+ type BackendTransactions = Pick<GraphBackend, "transaction" | "adoptTransaction">;
1823
+ type BackendLifecycle = Pick<GraphBackend, "close">;
1824
+ /**
1825
+ * Transaction backend — a backend scoped to a transaction.
1826
+ *
1827
+ * This is an explicit facet composition, not `Omit<GraphBackend, ...>`.
1828
+ * New top-level-only backend methods therefore do not silently appear on
1829
+ * transaction-scoped backends. `commitSchemaVersion`, `setActiveVersion`,
1830
+ * `refreshStatistics`, `transaction`, `adoptTransaction`, and `close` stay
1831
+ * deliberately absent: their guarantees depend on the top-level backend or
1832
+ * lifecycle owner rather than an already-open transaction.
1833
+ */
1834
+ type TransactionBackend = Readonly<BackendIdentity & GraphEntityReadBackend & GraphEntityWriteBackend & UniqueConstraintBackend & SchemaReadBackend & VectorOperationBackend & FulltextOperationBackend & IndexMaterializationBackend & ContributionMaterializationBackend & RemovalMaterializationBackend & GraphLifecycleBackend & QueryExecutionBackend & RawQueryExecutionBackend & RawStatementExecutionBackend>;
1702
1835
  /**
1703
1836
  * Parameters for inserting a unique constraint entry.
1704
1837
  */
@@ -2330,6 +2463,8 @@ type QueryAst = Readonly<{
2330
2463
  predicates: readonly NodePredicate[];
2331
2464
  projection: Projection;
2332
2465
  temporalMode: TemporalOptions;
2466
+ /** Recorded/system-time timestamp for recorded-pinned reads. */
2467
+ recordedAsOf?: string;
2333
2468
  orderBy?: readonly OrderSpec[];
2334
2469
  limit?: number;
2335
2470
  offset?: number;
@@ -2618,4 +2753,4 @@ type RelationalIndexDeclaration = NodeIndexDeclaration | EdgeIndexDeclaration;
2618
2753
  type IndexDeclaration = RelationalIndexDeclaration | VectorIndexDeclaration;
2619
2754
  type SystemColumnName = "graph_id" | "kind" | "id" | "from_kind" | "from_id" | "to_kind" | "to_id" | "deleted_at" | "valid_from" | "valid_to" | "created_at" | "updated_at" | "version";
2620
2755
 
2621
- export { type FulltextBatchRow as $, type AnySqliteDatabase as A, type BackendCapabilities as B, type VectorIndexMetric as C, type VectorIndexParams as D, type EdgeIndexConfig as E, type FulltextStrategy as F, type GraphBackend as G, type SchemaVersionRow as H, type IndexDeclaration as I, type JsonPointer as J, type InferenceType as K, type AggregateExpr as L, type MetaEdge as M, type NodeIndexConfig as N, type OntologyRelation as O, type FieldRef as P, type QueryAst as Q, type RelationalIndexDeclaration as R, type SqliteExecutionProfileHints as S, type ComparisonOp as T, type AggregateComparisonPredicate as U, type VectorStrategy as V, type AdoptedTransaction as W, type CommitSchemaVersionExpected as X, type CommitSchemaVersionParams as Y, DEFAULT_SQL_SCHEMA as Z, type DeleteFulltextBatchParams as _, type SqliteTransactionMode as a, type FulltextCapabilities as a0, type FulltextQueryMode as a1, type FulltextSearchParams as a2, type FulltextSearchResult as a3, type HybridFusionOptions as a4, type JsonPointerFor as a5, type JsonPointerInput as a6, type JsonPointerSegment as a7, type JsonPointerSegments as a8, type JsonPointerSegmentsFor as a9, type ValueType as aA, type PredicateExpression as aB, type VectorMetricType as aC, type Traversal as aD, type NodePredicate as aE, type ProjectedField as aF, type GroupBySpec as aG, type RecursiveCyclePolicy as aH, type TraversalDirection as aI, type EdgeRow as aJ, type NodeRow as aK, type VectorSlotMap as aL, type SelectiveField as aM, type ComposableQuery as aN, type SetOperationType as aO, type SetOperation as aP, type VectorMetric as aQ, type TransactionOptions as aR, MAX_JSON_POINTER_DEPTH as aa, type MetaEdgeProperties as ab, type OrderSpec as ac, type ParameterRef as ad, type ResolveJsonPointer as ae, type ResolveJsonPointerSegments as af, type SetActiveVersionParams as ag, type SortDirection as ah, type SqlSchema as ai, type SqlTableNames as aj, type StrategyTableContribution as ak, type TableContribution as al, type TransactionBackend as am, type TraversalExpansion as an, type UpsertFulltextBatchParams as ao, type VectorCapabilities as ap, type VectorSlot as aq, buildVectorCapabilities as ar, createSqlSchema as as, fts5Strategy as at, isMetaEdge as au, joinJsonPointers as av, jsonPointer as aw, normalizeJsonPointer as ax, parseJsonPointer as ay, tsvectorStrategy as az, type AnyPgDatabase as b, type EdgeIndexDeclaration as c, type NodeIndexDeclaration as d, type IndexWhereExpression as e, type SerializedNodeDef as f, type SerializedEdgeDef as g, type SerializedMetaEdge as h, type SerializedOntologyRelation as i, type SerializedClosures as j, type SerializedSchema as k, type SchemaHash as l, type JsonSchema as m, type SerializedOntology as n, type SerializedUniqueConstraint as o, type SqlDialect as p, type EdgeIndexDirection as q, type EdgeIndexWhereBuilder as r, type IndexOrigin as s, type IndexScope as t, type IndexWhereFieldBuilder as u, type IndexWhereInput as v, type NodeIndexWhereBuilder as w, type SystemColumnName as x, type VectorIndexDeclaration as y, type VectorIndexImplementation as z };
2756
+ export { type BackendTransactions as $, type AnySqliteDatabase as A, type BackendCapabilities as B, type VectorIndexMetric as C, type VectorIndexParams as D, type EdgeIndexConfig as E, type FulltextStrategy as F, type GraphBackend as G, type SchemaVersionRow as H, type IndexDeclaration as I, type JsonPointer as J, type InferenceType as K, type AggregateExpr as L, type MetaEdge as M, type NodeIndexConfig as N, type OntologyRelation as O, type FieldRef as P, type QueryAst as Q, type RelationalIndexDeclaration as R, type SqliteExecutionProfileHints as S, type ComparisonOp as T, type AggregateComparisonPredicate as U, type VectorStrategy as V, type TraversalDirection as W, type AdoptedTransaction as X, type BackendIdentity as Y, type BackendLifecycle as Z, type BackendMaintenance as _, type SqliteTransactionMode as a, fts5Strategy as a$, type CommitSchemaVersionExpected as a0, type CommitSchemaVersionParams as a1, type CompiledRowsSql as a2, type CompiledSelectSql as a3, type CompiledStatementSql as a4, type ContributionMaterializationBackend as a5, DEFAULT_SQL_SCHEMA as a6, type DeleteFulltextBatchParams as a7, type EdgeEntityReadBackend as a8, type EdgeEntityWriteBackend as a9, type RawStatementExecutionBackend as aA, type RecordedRelationOptions as aB, type RemovalMaterializationBackend as aC, type ResolveJsonPointer as aD, type ResolveJsonPointerSegments as aE, type ResolvedSqlTableNames as aF, type SchemaCommitBackend as aG, type SchemaReadBackend as aH, type SetActiveVersionParams as aI, type SortDirection as aJ, type SqlIntent as aK, type SqlSchema as aL, type SqlTableNames as aM, type StrategyTableContribution as aN, type TableContribution as aO, type TransactionBackend as aP, type TraversalExpansion as aQ, type UniqueConstraintBackend as aR, type UpsertFulltextBatchParams as aS, type VectorCapabilities as aT, type VectorOperationBackend as aU, type VectorSlot as aV, asCompiledRowsSql as aW, asCompiledSelectSql as aX, asCompiledStatementSql as aY, buildVectorCapabilities as aZ, createSqlSchema as a_, type ExternalRecordedReadSource as aa, type FulltextBatchRow as ab, type FulltextCapabilities as ac, type FulltextOperationBackend as ad, type FulltextQueryMode as ae, type FulltextSearchParams as af, type FulltextSearchResult as ag, type GraphEntityReadBackend as ah, type GraphEntityWriteBackend as ai, type GraphLifecycleBackend as aj, type HybridFusionOptions as ak, type IndexMaterializationBackend as al, type IntentSql as am, type JsonPointerFor as an, type JsonPointerInput as ao, type JsonPointerSegment as ap, type JsonPointerSegments as aq, type JsonPointerSegmentsFor as ar, MAX_JSON_POINTER_DEPTH as as, type MetaEdgeProperties as at, type NodeEntityReadBackend as au, type NodeEntityWriteBackend as av, type OrderSpec as aw, type ParameterRef as ax, type QueryExecutionBackend as ay, type RawQueryExecutionBackend as az, type AnyPgDatabase as b, isMetaEdge as b0, joinJsonPointers as b1, jsonPointer as b2, normalizeJsonPointer as b3, parseJsonPointer as b4, recordedRelation as b5, tsvectorStrategy as b6, type ValueType as b7, type PredicateExpression as b8, type VectorMetricType as b9, type Traversal as ba, type NodePredicate as bb, type ProjectedField as bc, type GroupBySpec as bd, type RecursiveCyclePolicy as be, type EdgeRow as bf, type NodeRow as bg, type VectorSlotMap as bh, type RecordedReadBinding as bi, type SelectiveField as bj, type ComposableQuery as bk, type SetOperationType as bl, type SetOperation as bm, type VectorMetric as bn, type TransactionOptions as bo, type EdgeIndexDeclaration as c, type NodeIndexDeclaration as d, type IndexWhereExpression as e, type SerializedNodeDef as f, type SerializedEdgeDef as g, type SerializedMetaEdge as h, type SerializedOntologyRelation as i, type SerializedClosures as j, type SerializedSchema as k, type SchemaHash as l, type JsonSchema as m, type SerializedOntology as n, type SerializedUniqueConstraint as o, type SqlDialect as p, type EdgeIndexDirection as q, type EdgeIndexWhereBuilder as r, type IndexOrigin as s, type IndexScope as t, type IndexWhereFieldBuilder as u, type IndexWhereInput as v, type NodeIndexWhereBuilder as w, type SystemColumnName as x, type VectorIndexDeclaration as y, type VectorIndexImplementation as z };
@@ -1,5 +1,5 @@
1
- import { K as KindEntity } from './extension-types-D1k0inWU.cjs';
2
- import { J as JsonPointer } from './types-Dvmn-eal.cjs';
1
+ import { K as KindEntity } from './extension-types-YGFJPrzK.cjs';
2
+ import { J as JsonPointer } from './types-DkNnF-7K.cjs';
3
3
 
4
4
  /**
5
5
  * QueryProfiler types.
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { N as NodeType, g as EdgeType, U as UniquenessScope, C as Collation, D as DeleteBehavior, f as KindAnnotations, m as Cardinality, n as EndpointExistence, T as TemporalMode, G as GraphExtension, I as IndexEntity, K as KindEntity, a as NullCheckOp, A as AnyEdgeType } from './extension-types-D1k0inWU.cjs';
2
+ import { N as NodeType, g as EdgeType, s as UniquenessScope, n as Collation, D as DeleteBehavior, f as KindAnnotations, m as Cardinality, q as EndpointExistence, T as TemporalMode, G as GraphExtension, I as IndexEntity, K as KindEntity, a as NullCheckOp, A as AnyEdgeType } from './extension-types-YGFJPrzK.cjs';
3
3
  import { SQL } from 'drizzle-orm';
4
4
  import { PgDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
5
5
  import { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
@@ -120,25 +120,68 @@ type SqlTableNames = Readonly<{
120
120
  nodes: string;
121
121
  /** Edges table name (default: "typegraph_edges") */
122
122
  edges: string;
123
+ /** Recorded node relation table name (default: "typegraph_recorded_nodes") */
124
+ recordedNodes?: string | undefined;
125
+ /** Recorded edge relation table name (default: "typegraph_recorded_edges") */
126
+ recordedEdges?: string | undefined;
127
+ /** Recorded-time commit clock table name (default: "typegraph_recorded_clock") */
128
+ recordedClock?: string | undefined;
123
129
  /** Node fulltext table name (default: "typegraph_node_fulltext") */
124
130
  fulltext: string;
125
131
  /** Node uniques table name (default: "typegraph_node_uniques") */
126
132
  uniques: string;
127
133
  }>;
128
- /**
129
- * SQL schema configuration for query compilation.
130
- * Contains table identifiers and utility methods for generating SQL references.
131
- */
132
- type SqlSchema = Readonly<{
134
+ type ResolvedSqlTableNames = Readonly<{
135
+ /** Nodes table name */
136
+ nodes: string;
137
+ /** Edges table name */
138
+ edges: string;
139
+ /** Recorded node relation table name */
140
+ recordedNodes: string;
141
+ /** Recorded edge relation table name */
142
+ recordedEdges: string;
143
+ /** Recorded-time commit clock table name */
144
+ recordedClock: string;
145
+ /** Node fulltext table name */
146
+ fulltext: string;
147
+ /** Node uniques table name */
148
+ uniques: string;
149
+ }>;
150
+ type SqlSchemaFields = Readonly<{
133
151
  /** Table names */
134
- tables: SqlTableNames;
152
+ tables: ResolvedSqlTableNames;
135
153
  /** Get a SQL reference to the nodes table */
136
154
  nodesTable: SQL;
137
155
  /** Get a SQL reference to the edges table */
138
156
  edgesTable: SQL;
157
+ /** Get a SQL reference to the recorded node relation */
158
+ recordedNodesTable: SQL;
159
+ /** Get a SQL reference to the recorded edge relation */
160
+ recordedEdgesTable: SQL;
161
+ /** Get a SQL reference to the recorded-time commit clock */
162
+ recordedClockTable: SQL;
139
163
  /** Get a SQL reference to the fulltext table */
140
164
  fulltextTable: SQL;
141
165
  }>;
166
+ /**
167
+ * SQL schema configuration for query compilation.
168
+ * Contains table identifiers and utility methods for generating SQL references.
169
+ *
170
+ * Branded and frozen by {@link createSqlSchema}; callers should not construct
171
+ * schema-shaped objects by hand.
172
+ */
173
+ type SqlSchema = SqlSchemaDescriptor;
174
+ declare class SqlSchemaDescriptor implements SqlSchemaFields {
175
+ #private;
176
+ readonly tables: ResolvedSqlTableNames;
177
+ readonly nodesTable: SQL;
178
+ readonly edgesTable: SQL;
179
+ readonly recordedNodesTable: SQL;
180
+ readonly recordedEdgesTable: SQL;
181
+ readonly recordedClockTable: SQL;
182
+ readonly fulltextTable: SQL;
183
+ constructor(fields: SqlSchemaFields);
184
+ }
142
185
  /**
143
186
  * Creates a SqlSchema configuration from table names.
144
187
  *
@@ -163,6 +206,34 @@ type SqlSchema = Readonly<{
163
206
  * ```
164
207
  */
165
208
  declare function createSqlSchema(names?: Partial<SqlTableNames>): SqlSchema;
209
+ /**
210
+ * The recorded/system-time relation a read coordinate may reconstruct from.
211
+ *
212
+ * TypeGraph's built-in capture relation is bound by `createStore(..., {
213
+ * history: true })`. Hosts can also bind externally populated row-compatible
214
+ * recorded relations through `recordedRelation({ schema })`. Keeping both as
215
+ * explicit values separates the read contract from the write-capture mechanism
216
+ * so future external/TMS-owned recorded relations can feed the same query
217
+ * machinery without changing StoreView or ReadCoordinate.
218
+ */
219
+ declare const EXTERNAL_RECORDED_READ_SOURCE: unique symbol;
220
+ type ExternalRecordedReadSource = Readonly<{
221
+ source: "external";
222
+ schema: SqlSchema;
223
+ [EXTERNAL_RECORDED_READ_SOURCE]: true;
224
+ }>;
225
+ declare const TYPEGRAPH_RECORDED_READ_SOURCE: unique symbol;
226
+ type TypeGraphRecordedReadSource = Readonly<{
227
+ source: "typegraph-capture";
228
+ schema: SqlSchema;
229
+ [TYPEGRAPH_RECORDED_READ_SOURCE]: true;
230
+ }>;
231
+ type RecordedReadSource = ExternalRecordedReadSource | TypeGraphRecordedReadSource;
232
+ type RecordedReadBinding = RecordedReadSource;
233
+ type RecordedRelationOptions = Readonly<{
234
+ schema: SqlSchema;
235
+ }>;
236
+ declare function recordedRelation(options: RecordedRelationOptions): ExternalRecordedReadSource;
166
237
  /**
167
238
  * Default SqlSchema using standard TypeGraph table names.
168
239
  */
@@ -527,6 +598,18 @@ interface VectorStrategy {
527
598
  buildDropIndex?(slot: VectorSlot): SQL | undefined;
528
599
  }
529
600
 
601
+ declare const SqlIntentBrand: unique symbol;
602
+ type SqlIntent = "rows" | "statement";
603
+ type IntentSql<I extends SqlIntent> = SQL & Readonly<{
604
+ [SqlIntentBrand]: I;
605
+ }>;
606
+ type CompiledRowsSql = IntentSql<"rows">;
607
+ type CompiledSelectSql = CompiledRowsSql;
608
+ type CompiledStatementSql = IntentSql<"statement">;
609
+ declare function asCompiledRowsSql(query: SQL): CompiledRowsSql;
610
+ declare function asCompiledSelectSql(query: SQL): CompiledSelectSql;
611
+ declare function asCompiledStatementSql(query: SQL): CompiledStatementSql;
612
+
530
613
  /**
531
614
  * SQL Dialect Abstraction Layer
532
615
  *
@@ -711,10 +794,14 @@ type AnyPgDatabase = PgDatabase<PgQueryResultHKT, Record<string, unknown>>;
711
794
  /**
712
795
  * Controls how the backend manages SQLite transactions.
713
796
  *
714
- * - `"sql"`: TypeGraph issues BEGIN / COMMIT / ROLLBACK SQL directly.
715
- * Default for sync drivers (better-sqlite3, bun:sqlite).
797
+ * - `"sql"`: TypeGraph issues BEGIN / COMMIT / ROLLBACK SQL directly on
798
+ * the connection. Default for sync drivers (better-sqlite3,
799
+ * bun:sqlite); also selected by `createLibsqlBackend` for
800
+ * local `@libsql/client` connections (`file:` / `:memory:`),
801
+ * whose `client.transaction()` permanently abandons the
802
+ * current connection — fatal for an in-memory database.
716
803
  * - `"drizzle"`: Delegates to Drizzle's `db.transaction()` method.
717
- * Default for async drivers (libsql, sql.js).
804
+ * Default for async drivers (remote libsql/Turso, sql.js).
718
805
  * - `"do-sqlite"`: Delegates to the Cloudflare Durable Objects async
719
806
  * storage transaction runner (`db.$client.transaction`,
720
807
  * i.e. `ctx.storage.transaction(async ...)`). Drizzle's
@@ -801,6 +888,26 @@ type BackendCapabilities = Readonly<{
801
888
  transactions: boolean;
802
889
  /** Whether the backend supports SQL window functions such as ROW_NUMBER() */
803
890
  windowFunctions: boolean;
891
+ /**
892
+ * Whether the backend's `execute()` supports `UPDATE … RETURNING`. Absent or
893
+ * `true` means supported (every engine TypeGraph ships — SQLite ≥ 3.35,
894
+ * PostgreSQL ≥ 8.2 — supports it). A custom backend whose engine cannot run
895
+ * `RETURNING` must set this to `false` so recorded-time history capture
896
+ * (`history: true`), which relies on `UPDATE … RETURNING` on its hot path,
897
+ * is refused up front instead of failing mid-flush.
898
+ */
899
+ returning?: boolean;
900
+ /**
901
+ * Maximum number of bound parameters the engine accepts in one statement.
902
+ * SQLite defaults to 999 (raisable at compile time via
903
+ * `SQLITE_MAX_VARIABLE_NUMBER`); PostgreSQL's wire protocol caps it at 65535.
904
+ * Recorded-time capture and recorded point reads size their multi-row
905
+ * statements to this ceiling — the same budget the backend's own batched
906
+ * inserts use — instead of a conservative dialect-blind constant. A custom
907
+ * build that raises the SQLite limit can override this here. Absent means the
908
+ * recorded-time fallback budget applies.
909
+ */
910
+ maxBindParameters?: number;
804
911
  /** Vector search capabilities (undefined if not configured) */
805
912
  vector?: VectorCapabilities | undefined;
806
913
  /** Fulltext search capabilities (undefined if not configured) */
@@ -1327,20 +1434,6 @@ type TransactionOptions = Readonly<{
1327
1434
  * relational writes share one Postgres/SQLite transaction (#134).
1328
1435
  */
1329
1436
  type AdoptedTransaction = AnyPgDatabase | AnySqliteDatabase;
1330
- /**
1331
- * Transaction backend — a backend scoped to a transaction.
1332
- *
1333
- * `commitSchemaVersion` and `setActiveVersion` are intentionally omitted:
1334
- * the atomicity / CAS guarantees of those primitives depend on
1335
- * dialect-specific write-locking (BEGIN IMMEDIATE on SQLite,
1336
- * `pg_advisory_xact_lock` on Postgres) acquired by the top-level
1337
- * backend wrappers, not the transaction itself. Calling them from a
1338
- * user-supplied `backend.transaction(...)` callback would bypass that
1339
- * locking and silently weaken the orphan-row crash window the primitive
1340
- * exists to eliminate. Schema commits go through the top-level backend
1341
- * methods only.
1342
- */
1343
- type TransactionBackend = Omit<GraphBackend, "transaction" | "adoptTransaction" | "close" | "refreshStatistics" | "commitSchemaVersion" | "setActiveVersion">;
1344
1437
  /**
1345
1438
  * The GraphBackend interface abstracts database operations.
1346
1439
  *
@@ -1637,7 +1730,14 @@ type GraphBackend = Readonly<{
1637
1730
  * sizes this library is designed for.
1638
1731
  */
1639
1732
  refreshStatistics: () => Promise<void>;
1640
- execute: <T>(query: SQL) => Promise<readonly T[]>;
1733
+ execute: <T>(query: CompiledRowsSql) => Promise<readonly T[]>;
1734
+ /**
1735
+ * Execute a non-row-returning SQL statement bound to this backend or
1736
+ * transaction. Optional because custom backends may only expose the public
1737
+ * row-returning query path; features that need statement execution must
1738
+ * capability-check and fail loudly.
1739
+ */
1740
+ executeStatement?: (query: CompiledStatementSql) => Promise<void>;
1641
1741
  /** Execute pre-compiled SQL text with bound parameters. Available on sync SQLite and pg backends. */
1642
1742
  executeRaw?: <T>(sqlText: string, params: readonly unknown[]) => Promise<readonly T[]>;
1643
1743
  /** Compile a Drizzle SQL object to { sql, params } without executing. */
@@ -1699,6 +1799,39 @@ type GraphBackend = Readonly<{
1699
1799
  adoptTransaction?: (externalTx: AdoptedTransaction) => TransactionBackend;
1700
1800
  close: () => Promise<void>;
1701
1801
  }>;
1802
+ type BackendIdentity = Pick<GraphBackend, "dialect" | "capabilities" | "tableNames" | "fulltextStrategy" | "vectorStrategy">;
1803
+ type NodeEntityReadBackend = Pick<GraphBackend, "getNode" | "getNodes" | "findNodesByKind" | "countNodesByKind">;
1804
+ type NodeEntityWriteBackend = Pick<GraphBackend, "insertNode" | "insertNodeNoReturn" | "insertNodesBatch" | "insertNodesBatchReturning" | "updateNode" | "deleteNode" | "hardDeleteNode">;
1805
+ type EdgeEntityReadBackend = Pick<GraphBackend, "getEdge" | "getEdges" | "countEdgesFrom" | "edgeExistsBetween" | "findEdgesConnectedTo" | "findEdgesByKind" | "countEdgesByKind">;
1806
+ type EdgeEntityWriteBackend = Pick<GraphBackend, "insertEdge" | "insertEdgeNoReturn" | "insertEdgesBatch" | "insertEdgesBatchReturning" | "updateEdge" | "deleteEdge" | "hardDeleteEdge">;
1807
+ type GraphEntityReadBackend = NodeEntityReadBackend & EdgeEntityReadBackend;
1808
+ type GraphEntityWriteBackend = NodeEntityWriteBackend & EdgeEntityWriteBackend;
1809
+ type UniqueConstraintBackend = Pick<GraphBackend, "insertUnique" | "deleteUnique" | "checkUnique" | "checkUniqueBatch">;
1810
+ type SchemaReadBackend = Pick<GraphBackend, "getActiveSchema" | "getSchemaVersion">;
1811
+ type SchemaCommitBackend = Pick<GraphBackend, "commitSchemaVersion" | "setActiveVersion">;
1812
+ type VectorOperationBackend = Pick<GraphBackend, "upsertEmbedding" | "deleteEmbedding" | "vectorSearch" | "createVectorIndex" | "dropVectorIndex">;
1813
+ type FulltextOperationBackend = Pick<GraphBackend, "upsertFulltext" | "deleteFulltext" | "upsertFulltextBatch" | "deleteFulltextBatch" | "fulltextSearch">;
1814
+ type IndexMaterializationBackend = Pick<GraphBackend, "ensureIndexMaterializationsTable" | "getIndexMaterialization" | "getIndexMaterializations" | "recordIndexMaterialization">;
1815
+ type ContributionMaterializationBackend = Pick<GraphBackend, "ensureContributionMaterializationsTable" | "getContributionMaterialization" | "recordContributionMaterialization" | "assertRuntimeContributionsInitialized" | "ensureRuntimeContributions" | "ensureFulltextTable">;
1816
+ type RemovalMaterializationBackend = Pick<GraphBackend, "ensureKindRemovalsTable" | "getPendingKindRemovals" | "getAllKindRemovals" | "recordKindRemoval" | "ensureReconciliationMarkersTable" | "getReconciliationMarker" | "setReconciliationMarker">;
1817
+ type GraphLifecycleBackend = Pick<GraphBackend, "clearGraph" | "bootstrapTables">;
1818
+ type QueryExecutionBackend = Pick<GraphBackend, "execute">;
1819
+ type RawQueryExecutionBackend = Pick<GraphBackend, "executeRaw" | "compileSql">;
1820
+ type RawStatementExecutionBackend = Pick<GraphBackend, "executeStatement" | "executeDdl">;
1821
+ type BackendMaintenance = Pick<GraphBackend, "refreshStatistics">;
1822
+ type BackendTransactions = Pick<GraphBackend, "transaction" | "adoptTransaction">;
1823
+ type BackendLifecycle = Pick<GraphBackend, "close">;
1824
+ /**
1825
+ * Transaction backend — a backend scoped to a transaction.
1826
+ *
1827
+ * This is an explicit facet composition, not `Omit<GraphBackend, ...>`.
1828
+ * New top-level-only backend methods therefore do not silently appear on
1829
+ * transaction-scoped backends. `commitSchemaVersion`, `setActiveVersion`,
1830
+ * `refreshStatistics`, `transaction`, `adoptTransaction`, and `close` stay
1831
+ * deliberately absent: their guarantees depend on the top-level backend or
1832
+ * lifecycle owner rather than an already-open transaction.
1833
+ */
1834
+ type TransactionBackend = Readonly<BackendIdentity & GraphEntityReadBackend & GraphEntityWriteBackend & UniqueConstraintBackend & SchemaReadBackend & VectorOperationBackend & FulltextOperationBackend & IndexMaterializationBackend & ContributionMaterializationBackend & RemovalMaterializationBackend & GraphLifecycleBackend & QueryExecutionBackend & RawQueryExecutionBackend & RawStatementExecutionBackend>;
1702
1835
  /**
1703
1836
  * Parameters for inserting a unique constraint entry.
1704
1837
  */
@@ -2330,6 +2463,8 @@ type QueryAst = Readonly<{
2330
2463
  predicates: readonly NodePredicate[];
2331
2464
  projection: Projection;
2332
2465
  temporalMode: TemporalOptions;
2466
+ /** Recorded/system-time timestamp for recorded-pinned reads. */
2467
+ recordedAsOf?: string;
2333
2468
  orderBy?: readonly OrderSpec[];
2334
2469
  limit?: number;
2335
2470
  offset?: number;
@@ -2618,4 +2753,4 @@ type RelationalIndexDeclaration = NodeIndexDeclaration | EdgeIndexDeclaration;
2618
2753
  type IndexDeclaration = RelationalIndexDeclaration | VectorIndexDeclaration;
2619
2754
  type SystemColumnName = "graph_id" | "kind" | "id" | "from_kind" | "from_id" | "to_kind" | "to_id" | "deleted_at" | "valid_from" | "valid_to" | "created_at" | "updated_at" | "version";
2620
2755
 
2621
- export { type FulltextBatchRow as $, type AnySqliteDatabase as A, type BackendCapabilities as B, type VectorIndexMetric as C, type VectorIndexParams as D, type EdgeIndexConfig as E, type FulltextStrategy as F, type GraphBackend as G, type SchemaVersionRow as H, type IndexDeclaration as I, type JsonPointer as J, type InferenceType as K, type AggregateExpr as L, type MetaEdge as M, type NodeIndexConfig as N, type OntologyRelation as O, type FieldRef as P, type QueryAst as Q, type RelationalIndexDeclaration as R, type SqliteExecutionProfileHints as S, type ComparisonOp as T, type AggregateComparisonPredicate as U, type VectorStrategy as V, type AdoptedTransaction as W, type CommitSchemaVersionExpected as X, type CommitSchemaVersionParams as Y, DEFAULT_SQL_SCHEMA as Z, type DeleteFulltextBatchParams as _, type SqliteTransactionMode as a, type FulltextCapabilities as a0, type FulltextQueryMode as a1, type FulltextSearchParams as a2, type FulltextSearchResult as a3, type HybridFusionOptions as a4, type JsonPointerFor as a5, type JsonPointerInput as a6, type JsonPointerSegment as a7, type JsonPointerSegments as a8, type JsonPointerSegmentsFor as a9, type ValueType as aA, type PredicateExpression as aB, type VectorMetricType as aC, type Traversal as aD, type NodePredicate as aE, type ProjectedField as aF, type GroupBySpec as aG, type RecursiveCyclePolicy as aH, type TraversalDirection as aI, type EdgeRow as aJ, type NodeRow as aK, type VectorSlotMap as aL, type SelectiveField as aM, type ComposableQuery as aN, type SetOperationType as aO, type SetOperation as aP, type VectorMetric as aQ, type TransactionOptions as aR, MAX_JSON_POINTER_DEPTH as aa, type MetaEdgeProperties as ab, type OrderSpec as ac, type ParameterRef as ad, type ResolveJsonPointer as ae, type ResolveJsonPointerSegments as af, type SetActiveVersionParams as ag, type SortDirection as ah, type SqlSchema as ai, type SqlTableNames as aj, type StrategyTableContribution as ak, type TableContribution as al, type TransactionBackend as am, type TraversalExpansion as an, type UpsertFulltextBatchParams as ao, type VectorCapabilities as ap, type VectorSlot as aq, buildVectorCapabilities as ar, createSqlSchema as as, fts5Strategy as at, isMetaEdge as au, joinJsonPointers as av, jsonPointer as aw, normalizeJsonPointer as ax, parseJsonPointer as ay, tsvectorStrategy as az, type AnyPgDatabase as b, type EdgeIndexDeclaration as c, type NodeIndexDeclaration as d, type IndexWhereExpression as e, type SerializedNodeDef as f, type SerializedEdgeDef as g, type SerializedMetaEdge as h, type SerializedOntologyRelation as i, type SerializedClosures as j, type SerializedSchema as k, type SchemaHash as l, type JsonSchema as m, type SerializedOntology as n, type SerializedUniqueConstraint as o, type SqlDialect as p, type EdgeIndexDirection as q, type EdgeIndexWhereBuilder as r, type IndexOrigin as s, type IndexScope as t, type IndexWhereFieldBuilder as u, type IndexWhereInput as v, type NodeIndexWhereBuilder as w, type SystemColumnName as x, type VectorIndexDeclaration as y, type VectorIndexImplementation as z };
2756
+ export { type BackendTransactions as $, type AnySqliteDatabase as A, type BackendCapabilities as B, type VectorIndexMetric as C, type VectorIndexParams as D, type EdgeIndexConfig as E, type FulltextStrategy as F, type GraphBackend as G, type SchemaVersionRow as H, type IndexDeclaration as I, type JsonPointer as J, type InferenceType as K, type AggregateExpr as L, type MetaEdge as M, type NodeIndexConfig as N, type OntologyRelation as O, type FieldRef as P, type QueryAst as Q, type RelationalIndexDeclaration as R, type SqliteExecutionProfileHints as S, type ComparisonOp as T, type AggregateComparisonPredicate as U, type VectorStrategy as V, type TraversalDirection as W, type AdoptedTransaction as X, type BackendIdentity as Y, type BackendLifecycle as Z, type BackendMaintenance as _, type SqliteTransactionMode as a, fts5Strategy as a$, type CommitSchemaVersionExpected as a0, type CommitSchemaVersionParams as a1, type CompiledRowsSql as a2, type CompiledSelectSql as a3, type CompiledStatementSql as a4, type ContributionMaterializationBackend as a5, DEFAULT_SQL_SCHEMA as a6, type DeleteFulltextBatchParams as a7, type EdgeEntityReadBackend as a8, type EdgeEntityWriteBackend as a9, type RawStatementExecutionBackend as aA, type RecordedRelationOptions as aB, type RemovalMaterializationBackend as aC, type ResolveJsonPointer as aD, type ResolveJsonPointerSegments as aE, type ResolvedSqlTableNames as aF, type SchemaCommitBackend as aG, type SchemaReadBackend as aH, type SetActiveVersionParams as aI, type SortDirection as aJ, type SqlIntent as aK, type SqlSchema as aL, type SqlTableNames as aM, type StrategyTableContribution as aN, type TableContribution as aO, type TransactionBackend as aP, type TraversalExpansion as aQ, type UniqueConstraintBackend as aR, type UpsertFulltextBatchParams as aS, type VectorCapabilities as aT, type VectorOperationBackend as aU, type VectorSlot as aV, asCompiledRowsSql as aW, asCompiledSelectSql as aX, asCompiledStatementSql as aY, buildVectorCapabilities as aZ, createSqlSchema as a_, type ExternalRecordedReadSource as aa, type FulltextBatchRow as ab, type FulltextCapabilities as ac, type FulltextOperationBackend as ad, type FulltextQueryMode as ae, type FulltextSearchParams as af, type FulltextSearchResult as ag, type GraphEntityReadBackend as ah, type GraphEntityWriteBackend as ai, type GraphLifecycleBackend as aj, type HybridFusionOptions as ak, type IndexMaterializationBackend as al, type IntentSql as am, type JsonPointerFor as an, type JsonPointerInput as ao, type JsonPointerSegment as ap, type JsonPointerSegments as aq, type JsonPointerSegmentsFor as ar, MAX_JSON_POINTER_DEPTH as as, type MetaEdgeProperties as at, type NodeEntityReadBackend as au, type NodeEntityWriteBackend as av, type OrderSpec as aw, type ParameterRef as ax, type QueryExecutionBackend as ay, type RawQueryExecutionBackend as az, type AnyPgDatabase as b, isMetaEdge as b0, joinJsonPointers as b1, jsonPointer as b2, normalizeJsonPointer as b3, parseJsonPointer as b4, recordedRelation as b5, tsvectorStrategy as b6, type ValueType as b7, type PredicateExpression as b8, type VectorMetricType as b9, type Traversal as ba, type NodePredicate as bb, type ProjectedField as bc, type GroupBySpec as bd, type RecursiveCyclePolicy as be, type EdgeRow as bf, type NodeRow as bg, type VectorSlotMap as bh, type RecordedReadBinding as bi, type SelectiveField as bj, type ComposableQuery as bk, type SetOperationType as bl, type SetOperation as bm, type VectorMetric as bn, type TransactionOptions as bo, type EdgeIndexDeclaration as c, type NodeIndexDeclaration as d, type IndexWhereExpression as e, type SerializedNodeDef as f, type SerializedEdgeDef as g, type SerializedMetaEdge as h, type SerializedOntologyRelation as i, type SerializedClosures as j, type SerializedSchema as k, type SchemaHash as l, type JsonSchema as m, type SerializedOntology as n, type SerializedUniqueConstraint as o, type SqlDialect as p, type EdgeIndexDirection as q, type EdgeIndexWhereBuilder as r, type IndexOrigin as s, type IndexScope as t, type IndexWhereFieldBuilder as u, type IndexWhereInput as v, type NodeIndexWhereBuilder as w, type SystemColumnName as x, type VectorIndexDeclaration as y, type VectorIndexImplementation as z };
@@ -1,5 +1,5 @@
1
- import { A as AnyEdgeType, N as NodeType } from './extension-types-D1k0inWU.cjs';
2
- import { E as EdgeIndexConfig, c as EdgeIndexDeclaration, N as NodeIndexConfig, d as NodeIndexDeclaration, e as IndexWhereExpression } from './types-Dvmn-eal.cjs';
1
+ import { A as AnyEdgeType, N as NodeType } from './extension-types-YGFJPrzK.cjs';
2
+ import { E as EdgeIndexConfig, c as EdgeIndexDeclaration, N as NodeIndexConfig, d as NodeIndexDeclaration, e as IndexWhereExpression } from './types-DkNnF-7K.cjs';
3
3
 
4
4
  declare function defineNodeIndex<N extends NodeType>(node: N, config: NodeIndexConfig<N>): NodeIndexDeclaration;
5
5
  declare function defineEdgeIndex<E extends AnyEdgeType>(edge: E, config: EdgeIndexConfig<E>): EdgeIndexDeclaration;
@@ -1,5 +1,5 @@
1
- import { A as AnyEdgeType, N as NodeType } from './extension-types-D1k0inWU.js';
2
- import { E as EdgeIndexConfig, c as EdgeIndexDeclaration, N as NodeIndexConfig, d as NodeIndexDeclaration, e as IndexWhereExpression } from './types-Dk8r09KY.js';
1
+ import { A as AnyEdgeType, N as NodeType } from './extension-types-YGFJPrzK.js';
2
+ import { E as EdgeIndexConfig, c as EdgeIndexDeclaration, N as NodeIndexConfig, d as NodeIndexDeclaration, e as IndexWhereExpression } from './types-D1Sqeyxy.js';
3
3
 
4
4
  declare function defineNodeIndex<N extends NodeType>(node: N, config: NodeIndexConfig<N>): NodeIndexDeclaration;
5
5
  declare function defineEdgeIndex<E extends AnyEdgeType>(edge: E, config: EdgeIndexConfig<E>): EdgeIndexDeclaration;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nicia-ai/typegraph",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "TypeScript-first embedded knowledge graph library with ontological reasoning",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -42,6 +42,11 @@
42
42
  "import": "./dist/graph-merge/index.js",
43
43
  "require": "./dist/graph-merge/index.cjs"
44
44
  },
45
+ "./provenance": {
46
+ "types": "./dist/provenance/index.d.ts",
47
+ "import": "./dist/provenance/index.js",
48
+ "require": "./dist/provenance/index.cjs"
49
+ },
45
50
  "./sqlite": {
46
51
  "types": "./dist/backend/sqlite/index.d.ts",
47
52
  "import": "./dist/backend/sqlite/index.js",
@@ -187,6 +192,7 @@
187
192
  "test:postgres": "./scripts/test-postgres.sh",
188
193
  "test:do": "vitest run --config vitest.workers.config.ts",
189
194
  "test:coverage": "vitest run --coverage",
190
- "test:mutation": "stryker run"
195
+ "test:mutation": "stryker run",
196
+ "test:mutation:critical": "stryker run stryker.critical.config.json"
191
197
  }
192
198
  }