@nicia-ai/typegraph 0.25.1 → 0.27.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 (122) hide show
  1. package/dist/backend/postgres/index.cjs +161 -113
  2. package/dist/backend/postgres/index.cjs.map +1 -1
  3. package/dist/backend/postgres/index.d.cts +6 -8
  4. package/dist/backend/postgres/index.d.ts +6 -8
  5. package/dist/backend/postgres/index.js +116 -68
  6. package/dist/backend/postgres/index.js.map +1 -1
  7. package/dist/backend/sqlite/index.cjs +16 -15
  8. package/dist/backend/sqlite/index.d.cts +11 -26
  9. package/dist/backend/sqlite/index.d.ts +11 -26
  10. package/dist/backend/sqlite/index.js +6 -5
  11. package/dist/backend/sqlite/libsql.cjs +9 -8
  12. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  13. package/dist/backend/sqlite/libsql.d.cts +4 -3
  14. package/dist/backend/sqlite/libsql.d.ts +4 -3
  15. package/dist/backend/sqlite/libsql.js +6 -5
  16. package/dist/backend/sqlite/libsql.js.map +1 -1
  17. package/dist/backend/sqlite/local.cjs +11 -10
  18. package/dist/backend/sqlite/local.cjs.map +1 -1
  19. package/dist/backend/sqlite/local.d.cts +4 -3
  20. package/dist/backend/sqlite/local.d.ts +4 -3
  21. package/dist/backend/sqlite/local.js +6 -5
  22. package/dist/backend/sqlite/local.js.map +1 -1
  23. package/dist/chunk-4FJVSF3K.cjs +12 -0
  24. package/dist/{chunk-D2GO3RBL.cjs.map → chunk-4FJVSF3K.cjs.map} +1 -1
  25. package/dist/chunk-5H3BAMTB.js +32 -0
  26. package/dist/chunk-5H3BAMTB.js.map +1 -0
  27. package/dist/{chunk-CLEUFN2K.js → chunk-DDVA4QBA.js} +174 -78
  28. package/dist/chunk-DDVA4QBA.js.map +1 -0
  29. package/dist/{chunk-OECDVACY.cjs → chunk-DN4RUDF3.cjs} +2 -2
  30. package/dist/chunk-DN4RUDF3.cjs.map +1 -0
  31. package/dist/{chunk-NHQWXSTS.js → chunk-E5ROA3MN.js} +3 -3
  32. package/dist/{chunk-NHQWXSTS.js.map → chunk-E5ROA3MN.js.map} +1 -1
  33. package/dist/{chunk-CPFR3O7L.js → chunk-ENXJLDRK.js} +2 -2
  34. package/dist/chunk-ENXJLDRK.js.map +1 -0
  35. package/dist/chunk-IUIWCFG3.cjs +36 -0
  36. package/dist/chunk-IUIWCFG3.cjs.map +1 -0
  37. package/dist/{chunk-EG6TJ3I5.js → chunk-OYLF3IC7.js} +3 -3
  38. package/dist/{chunk-EG6TJ3I5.js.map → chunk-OYLF3IC7.js.map} +1 -1
  39. package/dist/{chunk-JTI5WT4P.cjs → chunk-PN37HVAV.cjs} +32 -10
  40. package/dist/chunk-PN37HVAV.cjs.map +1 -0
  41. package/dist/{chunk-RCAJZG67.cjs → chunk-PYJOBZR3.cjs} +10 -10
  42. package/dist/{chunk-RCAJZG67.cjs.map → chunk-PYJOBZR3.cjs.map} +1 -1
  43. package/dist/{chunk-PSKUWVCB.js → chunk-RF5EUQWS.js} +336 -36
  44. package/dist/chunk-RF5EUQWS.js.map +1 -0
  45. package/dist/{chunk-CLGC7AQ2.cjs → chunk-RVT2N4RF.cjs} +206 -110
  46. package/dist/chunk-RVT2N4RF.cjs.map +1 -0
  47. package/dist/{chunk-4BOWVUGQ.js → chunk-TSGBRPNE.js} +3 -3
  48. package/dist/{chunk-4BOWVUGQ.js.map → chunk-TSGBRPNE.js.map} +1 -1
  49. package/dist/{chunk-CQVNGKU7.cjs → chunk-TVUARC7S.cjs} +410 -100
  50. package/dist/chunk-TVUARC7S.cjs.map +1 -0
  51. package/dist/{chunk-DOTEN2FG.js → chunk-U5ROKVRF.js} +26 -3
  52. package/dist/chunk-U5ROKVRF.js.map +1 -0
  53. package/dist/{chunk-E5JZSEGJ.cjs → chunk-WFUN6DCM.cjs} +8 -8
  54. package/dist/{chunk-E5JZSEGJ.cjs.map → chunk-WFUN6DCM.cjs.map} +1 -1
  55. package/dist/{chunk-AAA2CR3P.js → chunk-X53YKGHR.js} +78 -37
  56. package/dist/chunk-X53YKGHR.js.map +1 -0
  57. package/dist/{chunk-W5MTHMTE.cjs → chunk-YEDQLNVE.cjs} +26 -2
  58. package/dist/chunk-YEDQLNVE.cjs.map +1 -0
  59. package/dist/{chunk-QMQYK3IF.cjs → chunk-ZGEMI7MJ.cjs} +163 -122
  60. package/dist/chunk-ZGEMI7MJ.cjs.map +1 -0
  61. package/dist/{chunk-YZZBDCLV.js → chunk-ZTREJOGB.js} +32 -11
  62. package/dist/chunk-ZTREJOGB.js.map +1 -0
  63. package/dist/{ddl-BqMmpNor.d.ts → ddl-9kw8UADK.d.ts} +298 -12
  64. package/dist/{ddl-Bwjh8Hff.d.cts → ddl-Cw82BPM4.d.cts} +298 -12
  65. package/dist/{extension-types-D07e_NTw.d.cts → extension-types-B78CZfA5.d.cts} +1 -1
  66. package/dist/{extension-types-D07e_NTw.d.ts → extension-types-B78CZfA5.d.ts} +1 -1
  67. package/dist/graph-extension/index.cjs +18 -18
  68. package/dist/graph-extension/index.d.cts +4 -4
  69. package/dist/graph-extension/index.d.ts +4 -4
  70. package/dist/graph-extension/index.js +3 -3
  71. package/dist/{index-CT6nvtxL.d.cts → index-Bilw0pYm.d.cts} +34 -3
  72. package/dist/{index-DQheiVQV.d.ts → index-CWdBFWbI.d.ts} +34 -3
  73. package/dist/index.cjs +482 -361
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.d.cts +13 -11
  76. package/dist/index.d.ts +13 -11
  77. package/dist/index.js +153 -37
  78. package/dist/index.js.map +1 -1
  79. package/dist/indexes/index.cjs +13 -13
  80. package/dist/indexes/index.d.cts +5 -5
  81. package/dist/indexes/index.d.ts +5 -5
  82. package/dist/indexes/index.js +1 -1
  83. package/dist/interchange/index.cjs +7 -7
  84. package/dist/interchange/index.d.cts +7 -5
  85. package/dist/interchange/index.d.ts +7 -5
  86. package/dist/interchange/index.js +2 -2
  87. package/dist/{manager-Cy3dhwYO.d.cts → manager-CWa9cgwb.d.cts} +36 -9
  88. package/dist/{manager-sZkU2VPC.d.ts → manager-Cfcb2sJL.d.ts} +36 -9
  89. package/dist/{materialize-indexes-BB9N5uQl.d.cts → materialize-indexes-BQfaAZKA.d.cts} +1 -1
  90. package/dist/{materialize-indexes-BYpU2RKh.d.ts → materialize-indexes-DFavFQah.d.ts} +1 -1
  91. package/dist/profiler/index.d.cts +9 -7
  92. package/dist/profiler/index.d.ts +9 -7
  93. package/dist/schema/index.cjs +32 -27
  94. package/dist/schema/index.cjs.map +1 -1
  95. package/dist/schema/index.d.cts +9 -7
  96. package/dist/schema/index.d.ts +9 -7
  97. package/dist/schema/index.js +6 -5
  98. package/dist/schema/index.js.map +1 -1
  99. package/dist/{sqlite-h6dta1IJ.d.ts → sqlite-BvSEbybu.d.cts} +320 -1
  100. package/dist/{sqlite-BhFswiAR.d.cts → sqlite-GKvcDPVn.d.ts} +320 -1
  101. package/dist/{store-BS_hehiz.d.ts → store-C57kdvAa.d.ts} +155 -5
  102. package/dist/{store-CkCvqRUf.d.cts → store-Ojf0NOKk.d.cts} +155 -5
  103. package/dist/{types-BpgACExN.d.cts → types-CF7nDH3q.d.cts} +2 -2
  104. package/dist/{types-Bz-Pi681.d.ts → types-Cars4JZ1.d.ts} +2 -2
  105. package/dist/{types-DptZHe-l.d.ts → types-DZPBXZOK.d.cts} +272 -14
  106. package/dist/{types-WF5ItKQu.d.cts → types-Dzkr0Eqi.d.ts} +272 -14
  107. package/dist/{where-DZYMiXVq.d.cts → where-BmtjfWuS.d.cts} +2 -2
  108. package/dist/{where-C40InMIp.d.ts → where-kk1Zz2En.d.ts} +2 -2
  109. package/package.json +3 -1
  110. package/dist/chunk-AAA2CR3P.js.map +0 -1
  111. package/dist/chunk-CLEUFN2K.js.map +0 -1
  112. package/dist/chunk-CLGC7AQ2.cjs.map +0 -1
  113. package/dist/chunk-CPFR3O7L.js.map +0 -1
  114. package/dist/chunk-CQVNGKU7.cjs.map +0 -1
  115. package/dist/chunk-D2GO3RBL.cjs +0 -12
  116. package/dist/chunk-DOTEN2FG.js.map +0 -1
  117. package/dist/chunk-JTI5WT4P.cjs.map +0 -1
  118. package/dist/chunk-OECDVACY.cjs.map +0 -1
  119. package/dist/chunk-PSKUWVCB.js.map +0 -1
  120. package/dist/chunk-QMQYK3IF.cjs.map +0 -1
  121. package/dist/chunk-W5MTHMTE.cjs.map +0 -1
  122. package/dist/chunk-YZZBDCLV.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
2
- import { I as IndexDeclaration } from './types-WF5ItKQu.cjs';
2
+ import { I as IndexDeclaration } from './types-Dzkr0Eqi.js';
3
3
 
4
4
  /**
5
5
  * Table name configuration.
@@ -12,6 +12,7 @@ type SqliteTableNames = Readonly<{
12
12
  embeddings: string;
13
13
  fulltext: string;
14
14
  indexMaterializations: string;
15
+ contributionMaterializations: string;
15
16
  kindRemovals: string;
16
17
  reconciliationMarkers: string;
17
18
  }>;
@@ -1066,6 +1067,165 @@ declare function createSqliteTables(names?: Partial<SqliteTableNames>, options?:
1066
1067
  };
1067
1068
  dialect: "sqlite";
1068
1069
  }>;
1070
+ readonly contributionMaterializations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1071
+ name: string;
1072
+ schema: undefined;
1073
+ columns: {
1074
+ graphId: drizzle_orm_sqlite_core.SQLiteColumn<{
1075
+ name: "graph_id";
1076
+ tableName: string;
1077
+ dataType: "string";
1078
+ columnType: "SQLiteText";
1079
+ data: string;
1080
+ driverParam: string;
1081
+ notNull: true;
1082
+ hasDefault: false;
1083
+ isPrimaryKey: false;
1084
+ isAutoincrement: false;
1085
+ hasRuntimeDefault: false;
1086
+ enumValues: [string, ...string[]];
1087
+ baseColumn: never;
1088
+ identity: undefined;
1089
+ generated: undefined;
1090
+ }, {}, {
1091
+ length: number | undefined;
1092
+ }>;
1093
+ logicalName: drizzle_orm_sqlite_core.SQLiteColumn<{
1094
+ name: "logical_name";
1095
+ tableName: string;
1096
+ dataType: "string";
1097
+ columnType: "SQLiteText";
1098
+ data: string;
1099
+ driverParam: string;
1100
+ notNull: true;
1101
+ hasDefault: false;
1102
+ isPrimaryKey: false;
1103
+ isAutoincrement: false;
1104
+ hasRuntimeDefault: false;
1105
+ enumValues: [string, ...string[]];
1106
+ baseColumn: never;
1107
+ identity: undefined;
1108
+ generated: undefined;
1109
+ }, {}, {
1110
+ length: number | undefined;
1111
+ }>;
1112
+ owner: drizzle_orm_sqlite_core.SQLiteColumn<{
1113
+ name: "owner";
1114
+ tableName: string;
1115
+ dataType: "string";
1116
+ columnType: "SQLiteText";
1117
+ data: string;
1118
+ driverParam: string;
1119
+ notNull: true;
1120
+ hasDefault: false;
1121
+ isPrimaryKey: false;
1122
+ isAutoincrement: false;
1123
+ hasRuntimeDefault: false;
1124
+ enumValues: [string, ...string[]];
1125
+ baseColumn: never;
1126
+ identity: undefined;
1127
+ generated: undefined;
1128
+ }, {}, {
1129
+ length: number | undefined;
1130
+ }>;
1131
+ tableName: drizzle_orm_sqlite_core.SQLiteColumn<{
1132
+ name: "table_name";
1133
+ tableName: string;
1134
+ dataType: "string";
1135
+ columnType: "SQLiteText";
1136
+ data: string;
1137
+ driverParam: string;
1138
+ notNull: true;
1139
+ hasDefault: false;
1140
+ isPrimaryKey: false;
1141
+ isAutoincrement: false;
1142
+ hasRuntimeDefault: false;
1143
+ enumValues: [string, ...string[]];
1144
+ baseColumn: never;
1145
+ identity: undefined;
1146
+ generated: undefined;
1147
+ }, {}, {
1148
+ length: number | undefined;
1149
+ }>;
1150
+ signature: drizzle_orm_sqlite_core.SQLiteColumn<{
1151
+ name: "signature";
1152
+ tableName: string;
1153
+ dataType: "string";
1154
+ columnType: "SQLiteText";
1155
+ data: string;
1156
+ driverParam: string;
1157
+ notNull: true;
1158
+ hasDefault: false;
1159
+ isPrimaryKey: false;
1160
+ isAutoincrement: false;
1161
+ hasRuntimeDefault: false;
1162
+ enumValues: [string, ...string[]];
1163
+ baseColumn: never;
1164
+ identity: undefined;
1165
+ generated: undefined;
1166
+ }, {}, {
1167
+ length: number | undefined;
1168
+ }>;
1169
+ materializedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1170
+ name: "materialized_at";
1171
+ tableName: string;
1172
+ dataType: "string";
1173
+ columnType: "SQLiteText";
1174
+ data: string;
1175
+ driverParam: string;
1176
+ notNull: false;
1177
+ hasDefault: false;
1178
+ isPrimaryKey: false;
1179
+ isAutoincrement: false;
1180
+ hasRuntimeDefault: false;
1181
+ enumValues: [string, ...string[]];
1182
+ baseColumn: never;
1183
+ identity: undefined;
1184
+ generated: undefined;
1185
+ }, {}, {
1186
+ length: number | undefined;
1187
+ }>;
1188
+ lastAttemptedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
1189
+ name: "last_attempted_at";
1190
+ tableName: string;
1191
+ dataType: "string";
1192
+ columnType: "SQLiteText";
1193
+ data: string;
1194
+ driverParam: string;
1195
+ notNull: true;
1196
+ hasDefault: false;
1197
+ isPrimaryKey: false;
1198
+ isAutoincrement: false;
1199
+ hasRuntimeDefault: false;
1200
+ enumValues: [string, ...string[]];
1201
+ baseColumn: never;
1202
+ identity: undefined;
1203
+ generated: undefined;
1204
+ }, {}, {
1205
+ length: number | undefined;
1206
+ }>;
1207
+ lastError: drizzle_orm_sqlite_core.SQLiteColumn<{
1208
+ name: "last_error";
1209
+ tableName: string;
1210
+ dataType: "string";
1211
+ columnType: "SQLiteText";
1212
+ data: string;
1213
+ driverParam: string;
1214
+ notNull: false;
1215
+ hasDefault: false;
1216
+ isPrimaryKey: false;
1217
+ isAutoincrement: false;
1218
+ hasRuntimeDefault: false;
1219
+ enumValues: [string, ...string[]];
1220
+ baseColumn: never;
1221
+ identity: undefined;
1222
+ generated: undefined;
1223
+ }, {}, {
1224
+ length: number | undefined;
1225
+ }>;
1226
+ };
1227
+ dialect: "sqlite";
1228
+ }>;
1069
1229
  readonly kindRemovals: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
1070
1230
  name: string;
1071
1231
  schema: undefined;
@@ -2295,6 +2455,165 @@ declare const tables: {
2295
2455
  };
2296
2456
  dialect: "sqlite";
2297
2457
  }>;
2458
+ readonly contributionMaterializations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
2459
+ name: string;
2460
+ schema: undefined;
2461
+ columns: {
2462
+ graphId: drizzle_orm_sqlite_core.SQLiteColumn<{
2463
+ name: "graph_id";
2464
+ tableName: string;
2465
+ dataType: "string";
2466
+ columnType: "SQLiteText";
2467
+ data: string;
2468
+ driverParam: string;
2469
+ notNull: true;
2470
+ hasDefault: false;
2471
+ isPrimaryKey: false;
2472
+ isAutoincrement: false;
2473
+ hasRuntimeDefault: false;
2474
+ enumValues: [string, ...string[]];
2475
+ baseColumn: never;
2476
+ identity: undefined;
2477
+ generated: undefined;
2478
+ }, {}, {
2479
+ length: number | undefined;
2480
+ }>;
2481
+ logicalName: drizzle_orm_sqlite_core.SQLiteColumn<{
2482
+ name: "logical_name";
2483
+ tableName: string;
2484
+ dataType: "string";
2485
+ columnType: "SQLiteText";
2486
+ data: string;
2487
+ driverParam: string;
2488
+ notNull: true;
2489
+ hasDefault: false;
2490
+ isPrimaryKey: false;
2491
+ isAutoincrement: false;
2492
+ hasRuntimeDefault: false;
2493
+ enumValues: [string, ...string[]];
2494
+ baseColumn: never;
2495
+ identity: undefined;
2496
+ generated: undefined;
2497
+ }, {}, {
2498
+ length: number | undefined;
2499
+ }>;
2500
+ owner: drizzle_orm_sqlite_core.SQLiteColumn<{
2501
+ name: "owner";
2502
+ tableName: string;
2503
+ dataType: "string";
2504
+ columnType: "SQLiteText";
2505
+ data: string;
2506
+ driverParam: string;
2507
+ notNull: true;
2508
+ hasDefault: false;
2509
+ isPrimaryKey: false;
2510
+ isAutoincrement: false;
2511
+ hasRuntimeDefault: false;
2512
+ enumValues: [string, ...string[]];
2513
+ baseColumn: never;
2514
+ identity: undefined;
2515
+ generated: undefined;
2516
+ }, {}, {
2517
+ length: number | undefined;
2518
+ }>;
2519
+ tableName: drizzle_orm_sqlite_core.SQLiteColumn<{
2520
+ name: "table_name";
2521
+ tableName: string;
2522
+ dataType: "string";
2523
+ columnType: "SQLiteText";
2524
+ data: string;
2525
+ driverParam: string;
2526
+ notNull: true;
2527
+ hasDefault: false;
2528
+ isPrimaryKey: false;
2529
+ isAutoincrement: false;
2530
+ hasRuntimeDefault: false;
2531
+ enumValues: [string, ...string[]];
2532
+ baseColumn: never;
2533
+ identity: undefined;
2534
+ generated: undefined;
2535
+ }, {}, {
2536
+ length: number | undefined;
2537
+ }>;
2538
+ signature: drizzle_orm_sqlite_core.SQLiteColumn<{
2539
+ name: "signature";
2540
+ tableName: string;
2541
+ dataType: "string";
2542
+ columnType: "SQLiteText";
2543
+ data: string;
2544
+ driverParam: string;
2545
+ notNull: true;
2546
+ hasDefault: false;
2547
+ isPrimaryKey: false;
2548
+ isAutoincrement: false;
2549
+ hasRuntimeDefault: false;
2550
+ enumValues: [string, ...string[]];
2551
+ baseColumn: never;
2552
+ identity: undefined;
2553
+ generated: undefined;
2554
+ }, {}, {
2555
+ length: number | undefined;
2556
+ }>;
2557
+ materializedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2558
+ name: "materialized_at";
2559
+ tableName: string;
2560
+ dataType: "string";
2561
+ columnType: "SQLiteText";
2562
+ data: string;
2563
+ driverParam: string;
2564
+ notNull: false;
2565
+ hasDefault: false;
2566
+ isPrimaryKey: false;
2567
+ isAutoincrement: false;
2568
+ hasRuntimeDefault: false;
2569
+ enumValues: [string, ...string[]];
2570
+ baseColumn: never;
2571
+ identity: undefined;
2572
+ generated: undefined;
2573
+ }, {}, {
2574
+ length: number | undefined;
2575
+ }>;
2576
+ lastAttemptedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
2577
+ name: "last_attempted_at";
2578
+ tableName: string;
2579
+ dataType: "string";
2580
+ columnType: "SQLiteText";
2581
+ data: string;
2582
+ driverParam: string;
2583
+ notNull: true;
2584
+ hasDefault: false;
2585
+ isPrimaryKey: false;
2586
+ isAutoincrement: false;
2587
+ hasRuntimeDefault: false;
2588
+ enumValues: [string, ...string[]];
2589
+ baseColumn: never;
2590
+ identity: undefined;
2591
+ generated: undefined;
2592
+ }, {}, {
2593
+ length: number | undefined;
2594
+ }>;
2595
+ lastError: drizzle_orm_sqlite_core.SQLiteColumn<{
2596
+ name: "last_error";
2597
+ tableName: string;
2598
+ dataType: "string";
2599
+ columnType: "SQLiteText";
2600
+ data: string;
2601
+ driverParam: string;
2602
+ notNull: false;
2603
+ hasDefault: false;
2604
+ isPrimaryKey: false;
2605
+ isAutoincrement: false;
2606
+ hasRuntimeDefault: false;
2607
+ enumValues: [string, ...string[]];
2608
+ baseColumn: never;
2609
+ identity: undefined;
2610
+ generated: undefined;
2611
+ }, {}, {
2612
+ length: number | undefined;
2613
+ }>;
2614
+ };
2615
+ dialect: "sqlite";
2616
+ }>;
2298
2617
  readonly kindRemovals: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
2299
2618
  name: string;
2300
2619
  schema: undefined;
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { m as SqlDialect, ac as SqlSchema, F as FulltextStrategy, aq as ValueType, ar as PredicateExpression, as as VectorMetricType, X as FulltextQueryMode, Q as QueryAst, J as JsonPointer, C as FieldRef, a7 as ParameterRef, G as GraphBackend, ae as TransactionBackend, a0 as JsonPointerInput, af as TraversalExpansion, at as Traversal, au as NodePredicate, av as ProjectedField, a6 as OrderSpec, aw as GroupBySpec, _ as HybridFusionOptions, ax as RecursiveCyclePolicy, ay as TraversalDirection$1, az as EdgeRow, aA as NodeRow, A as AggregateExpr, aB as SelectiveField, aC as ComposableQuery, aD as SetOperationType, aE as SetOperation, ab as SortDirection, j as JsonSchema, aF as VectorMetric } from './types-DptZHe-l.js';
3
- import { K as KindRegistry, G as GraphDef, t as EdgeKinds, w as NodeKinds, s as AllNodeTypes, c as SchemaManagerOptions, d as SchemaValidationResult } from './manager-sZkU2VPC.js';
4
- import { A as AnyEdgeType, N as NodeType, T as TemporalMode, d as EdgeType, E as EdgeRegistration, i as EdgeId, m as NodeId, b as NodeRegistration, K as KindEntity, f as Cardinality, g as EndpointExistence, e as KindAnnotations, U as UniquenessScope, C as Collation, G as GraphExtension } from './extension-types-D07e_NTw.js';
2
+ import { p as SqlDialect, ah as SqlSchema, F as FulltextStrategy, ax as ValueType, ay as PredicateExpression, az as VectorMetricType, a0 as FulltextQueryMode, Q as QueryAst, J as JsonPointer, L as FieldRef, ac as ParameterRef, G as GraphBackend, al as TransactionBackend, a5 as JsonPointerInput, am as TraversalExpansion, aA as Traversal, aB as NodePredicate, aC as ProjectedField, ab as OrderSpec, aD as GroupBySpec, a3 as HybridFusionOptions, aE as RecursiveCyclePolicy, aF as TraversalDirection$1, aG as EdgeRow, aH as NodeRow, U as AdoptedTransaction, K as AggregateExpr, aI as SelectiveField, aJ as ComposableQuery, aK as SetOperationType, aL as SetOperation, ag as SortDirection, m as JsonSchema, aM as VectorMetric } from './types-Dzkr0Eqi.js';
3
+ import { K as KindRegistry, G as GraphDef, u as EdgeKinds, x as NodeKinds, t as AllNodeTypes, c as SchemaManagerOptions, d as SchemaValidationResult } from './manager-Cfcb2sJL.js';
4
+ import { A as AnyEdgeType, N as NodeType, T as TemporalMode, e as EdgeType, E as EdgeRegistration, h as EdgeId, m as NodeId, b as NodeRegistration, K as KindEntity, f as Cardinality, k as EndpointExistence, d as KindAnnotations, o as UniquenessScope, g as Collation, G as GraphExtension } from './extension-types-B78CZfA5.js';
5
5
  import { SQL } from 'drizzle-orm';
6
- import { b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-BYpU2RKh.js';
6
+ import { b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-DFavFQah.js';
7
7
 
8
8
  /**
9
9
  * Embedding type for vector search.
@@ -1615,6 +1615,41 @@ type GraphEdgeCollections<G extends GraphDef> = {
1615
1615
  * Provides the same `tx.nodes.*` and `tx.edges.*` API as the Store,
1616
1616
  * but operations are executed within the transaction scope.
1617
1617
  *
1618
+ * `tx.sql` is the raw Drizzle handle **bound to this same
1619
+ * transaction** — use it to write the caller's own relational tables
1620
+ * inside the graph-owned transaction so both layers commit or roll
1621
+ * back together (the graph-owned counterpart of
1622
+ * {@link Store.withTransaction}, where the caller owns the boundary):
1623
+ *
1624
+ * ```typescript
1625
+ * await store.transaction(async (tx) => {
1626
+ * await tx.nodes.Document.update(documentId, props);
1627
+ * // `tx.sql` is the `AdoptedTransaction` union — cast to your
1628
+ * // concrete Drizzle database type at the call site.
1629
+ * const sqlTx = tx.sql as NodePgDatabase;
1630
+ * await sqlTx.insert(documentVersions).values(versionRow);
1631
+ * await sqlTx.insert(changeEvents).values(eventRow);
1632
+ * });
1633
+ * ```
1634
+ *
1635
+ * Per-backend semantics:
1636
+ * - **Postgres / libsql** (async drivers): `tx.sql` is the Drizzle
1637
+ * transaction handle. Using the outer `db` instead would write on a
1638
+ * *different* connection and silently escape the transaction — so
1639
+ * `tx.sql` is a correctness requirement there.
1640
+ * - **better-sqlite3**: the single connection, framed by TypeGraph's
1641
+ * `BEGIN`/`COMMIT`/`ROLLBACK`.
1642
+ * - **Durable Objects (`do-sqlite`)**: the bound Drizzle handle; the
1643
+ * storage transaction is ambient, so writing the outer `db` also
1644
+ * enlists — `tx.sql` is the explicit, portable form.
1645
+ *
1646
+ * It is `undefined` only on the non-transactional fallback
1647
+ * (`backend.capabilities.transactions === false` — e.g. Cloudflare
1648
+ * D1, `drizzle-orm/neon-http`), where `store.transaction()` runs the
1649
+ * callback with no atomicity and there is no transaction to enlist.
1650
+ * Its type is the `AdoptedTransaction` union; cast to your concrete
1651
+ * Drizzle database type at the call site.
1652
+ *
1618
1653
  * @example
1619
1654
  * ```typescript
1620
1655
  * await store.transaction(async (tx) => {
@@ -1627,6 +1662,7 @@ type GraphEdgeCollections<G extends GraphDef> = {
1627
1662
  type TransactionContext<G extends GraphDef> = Readonly<{
1628
1663
  nodes: GraphNodeCollections<G>;
1629
1664
  edges: GraphEdgeCollections<G>;
1665
+ sql?: AdoptedTransaction;
1630
1666
  }>;
1631
1667
  /**
1632
1668
  * Replace branded `NodeId` / `EdgeId` with plain `string` in each
@@ -3341,6 +3377,12 @@ declare class Store<G extends GraphDef> {
3341
3377
  * The transaction context provides the same collection API as the Store:
3342
3378
  * - `tx.nodes.Person.create(...)` - Create a node
3343
3379
  * - `tx.edges.worksAt.create(...)` - Create an edge
3380
+ * - `tx.sql` - the raw Drizzle handle **bound to this same
3381
+ * transaction**, for writing the caller's own relational tables in
3382
+ * the same atomic boundary (the graph-owned counterpart of
3383
+ * {@link Store.withTransaction}). See {@link TransactionContext}
3384
+ * for per-backend semantics; it is `undefined` only on the
3385
+ * non-transactional fallback.
3344
3386
  *
3345
3387
  * @example
3346
3388
  * ```typescript
@@ -3355,6 +3397,16 @@ declare class Store<G extends GraphDef> {
3355
3397
  * });
3356
3398
  * ```
3357
3399
  *
3400
+ * @example Cross-store write via `tx.sql` (graph-owned boundary):
3401
+ * ```typescript
3402
+ * await store.transaction(async (tx) => {
3403
+ * await tx.nodes.Document.update(documentId, props);
3404
+ * // cast `tx.sql` to your concrete Drizzle database type
3405
+ * const sqlTx = tx.sql as NodePgDatabase;
3406
+ * await sqlTx.insert(documentVersions).values(versionRow);
3407
+ * });
3408
+ * ```
3409
+ *
3358
3410
  * **Backends without transactions.** When `backend.capabilities.transactions`
3359
3411
  * is `false` (Cloudflare D1, `drizzle-orm/neon-http`), this method runs the
3360
3412
  * callback against the same backend used outside `transaction()` — writes
@@ -3371,6 +3423,62 @@ declare class Store<G extends GraphDef> {
3371
3423
  * ```
3372
3424
  */
3373
3425
  transaction<T>(fn: (tx: TransactionContext<G>) => Promise<T>): Promise<T>;
3426
+ /**
3427
+ * Adopts a caller-owned, already-open Drizzle transaction so the graph
3428
+ * store and the caller's relational writes commit or roll back as one
3429
+ * Postgres/SQLite transaction (#134).
3430
+ *
3431
+ * Use this when the **relational layer owns the transaction**: the
3432
+ * caller has opened a transaction and needs TypeGraph writes enlisted
3433
+ * on the *same* connection. Unlike {@link transaction}, this opens no
3434
+ * transaction — the caller's transaction is the single commit/rollback
3435
+ * boundary.
3436
+ *
3437
+ * `withTransaction` is driver-agnostic; how the caller opens the
3438
+ * transaction is not. **Async drivers** (node-postgres,
3439
+ * `neon-serverless` Pool, libsql) use `db.transaction(async …)`.
3440
+ * **Synchronous `better-sqlite3`** cannot — its driver rejects an
3441
+ * `async` transaction callback (`Transaction function cannot return a
3442
+ * promise`) and the async continuation would run outside the
3443
+ * rolled-back transaction — so the caller opens the transaction with
3444
+ * explicit `BEGIN`/`COMMIT`/`ROLLBACK` on the single connection
3445
+ * instead. See the "Cross-Store Transactions" recipe for both shapes.
3446
+ *
3447
+ * The returned context reuses this store's already-resolved
3448
+ * schema/registry: it runs **no** schema bootstrap, `evolve`, or
3449
+ * migration, and emits **no DDL** inside the caller's transaction.
3450
+ * Fulltext operations assert the durable materialization marker (a
3451
+ * cached SELECT) and throw {@link StoreNotInitializedError} on a
3452
+ * missing/stale/failed marker rather than migrating mid-transaction —
3453
+ * so boot the parent store via `createStoreWithSchema` once at
3454
+ * startup.
3455
+ *
3456
+ * @example
3457
+ * ```typescript
3458
+ * // Async driver (Postgres / libsql):
3459
+ * await db.transaction(async (sqlTx) => {
3460
+ * const connector = await createConnectorRow(sqlTx, input); // Drizzle
3461
+ * const txStore = store.withTransaction(sqlTx);
3462
+ * await txStore.nodes.ArtifactSource.create({ // TypeGraph
3463
+ * connectorId: connector.id,
3464
+ * });
3465
+ * }); // one COMMIT / ROLLBACK across both layers
3466
+ * ```
3467
+ *
3468
+ * @throws {ConfigurationError} when the backend cannot adopt an
3469
+ * external transaction — either it is not a Drizzle Postgres/SQLite
3470
+ * backend, or `backend.capabilities.transactions` is `false`
3471
+ * (`drizzle-orm/neon-http`, Cloudflare D1, SQLite
3472
+ * `transactionMode: "none"`). A non-atomic fallback is deliberately
3473
+ * not offered here: the caller's relational write *would* still
3474
+ * commit, defeating the purpose of cross-store atomicity.
3475
+ * @throws {StoreNotInitializedError} at point of use, when a fulltext
3476
+ * operation on the returned context observes a missing/stale/failed
3477
+ * durable materialization marker (parent store not booted via
3478
+ * `createStoreWithSchema`). Rolls back the caller's transaction
3479
+ * without emitting any DDL.
3480
+ */
3481
+ withTransaction(externalTx: AdoptedTransaction): TransactionContext<G>;
3374
3482
  /**
3375
3483
  * Hard-deletes all data for this graph from the database.
3376
3484
  *
@@ -3658,5 +3766,47 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
3658
3766
  * ```
3659
3767
  */
3660
3768
  declare function createStoreWithSchema<G extends GraphDef>(graph: G, backend: GraphBackend, options?: StoreOptions & SchemaManagerOptions): Promise<[Store<G>, SchemaValidationResult]>;
3769
+ /**
3770
+ * Creates a Store after **verifying** that the database is at the same
3771
+ * schema version as the code graph — without running any DDL, bootstrap,
3772
+ * or marker writes. The runtime counterpart of `createStoreWithSchema`
3773
+ * for the deployment model in "Database roles & least privilege":
3774
+ *
3775
+ * - **`createStoreWithSchema(graph, backend)`** runs DDL (bootstrap,
3776
+ * safe auto-migrations, durable contribution materialization). Run it
3777
+ * once at startup under a privileged role that holds `CREATE` / DDL.
3778
+ * - **`createVerifiedStore(graph, backend)`** is the zero-DDL runtime
3779
+ * attach with a verification gate. Throws `MigrationError` when the
3780
+ * persisted schema is behind the code graph (any pending change, safe
3781
+ * or breaking), `ConfigurationError` when no schema has been
3782
+ * initialized, or `StoreNotInitializedError` when the schema is
3783
+ * current but the runtime-contribution markers are missing/stale.
3784
+ * The runtime can use a least-privilege, DML-only database role.
3785
+ * - **`createStore(graph, backend)`** is the same zero-DDL attach
3786
+ * *without* the verification gate — fastest, but schema drift goes
3787
+ * undetected until a hot-path operation trips.
3788
+ *
3789
+ * Folds any persisted graph-extension document into the supplied graph
3790
+ * before building the Store, just like `createStoreWithSchema`.
3791
+ *
3792
+ * @param graph - The graph definition
3793
+ * @param backend - The database backend
3794
+ * @param options - Optional store configuration
3795
+ * @returns A tuple of [store, validationResult] — `result.status` is
3796
+ * always `"unchanged"` on success
3797
+ *
3798
+ * @example
3799
+ * ```typescript
3800
+ * // Runtime — least-privilege, DML-only role. Zero DDL.
3801
+ * const [store, result] = await createVerifiedStore(graph, backend);
3802
+ * // result.status === "unchanged" — the privileged migrator is current.
3803
+ * ```
3804
+ *
3805
+ * @throws ConfigurationError if no schema has been initialized.
3806
+ * @throws MigrationError if the persisted schema is behind the code graph.
3807
+ * @throws StoreNotInitializedError if runtime-contribution markers are
3808
+ * missing/stale/failed for this graph on this connection.
3809
+ */
3810
+ declare function createVerifiedStore<G extends GraphDef>(graph: G, backend: GraphBackend, options?: StoreOptions): Promise<[Store<G>, SchemaValidationResult]>;
3661
3811
 
3662
- export { type MaterializeRemovalsOptions as $, type AliasMap as A, type BaseTraversalOptions as B, type CreateQueryBuilderOptions as C, DEFAULT_SEARCHABLE_LANGUAGE as D, type EdgeAliasMap as E, type EmbeddingSchema as F, type EmbeddingValue as G, ExecutableAggregateQuery as H, ExecutableQuery as I, type FieldAccessor as J, type FulltextSearchHit as K, type FulltextSearchOptions as L, type GetOrCreateAction as M, type GraphAlgorithms as N, type GraphEdgeCollections as O, type GraphNodeCollections as P, QueryBuilder as Q, type HookContext as R, Store as S, TraversalBuilder as T, type HybridFulltextOptions as U, type HybridSearchHit as V, type HybridSearchOptions as W, type HybridVectorOptions as X, type IfExistsMode as Y, type KindIntrospection as Z, type MaterializeRemovalsEntry as _, type AggregateResult as a, getSearchableMetadata as a$, type MaterializeRemovalsResult as a0, type NeighborsOptions as a1, type Node as a2, type NodeAccessor as a3, type NodeAlias as a4, type NodeCollection as a5, type NodeGetOrCreateByConstraintOptions as a6, type NodeGetOrCreateByConstraintResult as a7, type NodeIdentifier as a8, type NodeRef as a9, type StoreProjection as aA, type StoreRef as aB, StoreSearch as aC, type StreamOptions as aD, type SubgraphEdgeResult as aE, type SubgraphNodeResult as aF, type SubgraphOptions as aG, type SubgraphResult as aH, type SubsetEdge as aI, type SubsetNode as aJ, type TemporalAlgorithmOptions as aK, type TransactionContext as aL, type TraversalDirection as aM, type TypedEdgeCollection as aN, UnionableQuery as aO, type UniqueIntrospection as aP, type UpdateEdgeInput as aQ, type UpdateNodeInput as aR, type VectorSearchHit as aS, type VectorSearchOptions as aT, createStore as aU, createStoreWithSchema as aV, defineSubgraphProject as aW, embedding as aX, exists as aY, fieldRef as aZ, getEmbeddingDimensions as a_, type OntologyIntrospection as aa, type OperationHookContext as ab, type PaginateOptions as ac, type PaginatedResult as ad, type PathNode as ae, type Predicate as af, PreparedQuery as ag, type PropsAccessor as ah, type QueryHookContext as ai, type QueryOptions as aj, type ReachableNode as ak, type ReachableOptions as al, type RebuildFulltextOptions as am, type RebuildFulltextResult as an, type RecursiveTraversalOptions as ao, type SchemaIntrospection as ap, type SearchableMetadata as aq, type SearchableOptions as ar, type SearchableSchema as as, type SelectContext as at, type SelectableEdge as au, type SelectableNode as av, type ShortestPathOptions as aw, type ShortestPathResult as ax, type StoreHooks as ay, type StoreOptions as az, type AlgorithmCyclePolicy as b, inSubquery as b0, isEmbeddingSchema as b1, isParameterRef as b2, isSearchableSchema as b3, notExists as b4, notInSubquery as b5, param as b6, searchable as b7, type AnyEdge as c, type AnyNode as d, type BatchResults as e, type BatchableQuery as f, type ConstraintNames as g, type CreateEdgeInput as h, type CreateNodeInput as i, type DegreeOptions as j, type DynamicEdgeAccessor as k, type DynamicEdgeCollection as l, type DynamicEdgeType as m, type DynamicFieldBuilder as n, type DynamicNodeAccessor as o, type DynamicNodeCollection as p, type DynamicNodeType as q, type DynamicSelectableEdge as r, type DynamicSelectableNode as s, type Edge as t, type EdgeAccessor as u, type EdgeCollection as v, type EdgeFindByEndpointsOptions as w, type EdgeGetOrCreateByEndpointsOptions as x, type EdgeGetOrCreateByEndpointsResult as y, type EdgeIntrospection as z };
3812
+ export { type MaterializeRemovalsOptions as $, type AliasMap as A, type BaseTraversalOptions as B, type CreateQueryBuilderOptions as C, DEFAULT_SEARCHABLE_LANGUAGE as D, type EdgeAliasMap as E, type EmbeddingSchema as F, type EmbeddingValue as G, ExecutableAggregateQuery as H, ExecutableQuery as I, type FieldAccessor as J, type FulltextSearchHit as K, type FulltextSearchOptions as L, type GetOrCreateAction as M, type GraphAlgorithms as N, type GraphEdgeCollections as O, type GraphNodeCollections as P, QueryBuilder as Q, type HookContext as R, Store as S, TraversalBuilder as T, type HybridFulltextOptions as U, type HybridSearchHit as V, type HybridSearchOptions as W, type HybridVectorOptions as X, type IfExistsMode as Y, type KindIntrospection as Z, type MaterializeRemovalsEntry as _, type AggregateResult as a, getEmbeddingDimensions as a$, type MaterializeRemovalsResult as a0, type NeighborsOptions as a1, type Node as a2, type NodeAccessor as a3, type NodeAlias as a4, type NodeCollection as a5, type NodeGetOrCreateByConstraintOptions as a6, type NodeGetOrCreateByConstraintResult as a7, type NodeIdentifier as a8, type NodeRef as a9, type StoreProjection as aA, type StoreRef as aB, StoreSearch as aC, type StreamOptions as aD, type SubgraphEdgeResult as aE, type SubgraphNodeResult as aF, type SubgraphOptions as aG, type SubgraphResult as aH, type SubsetEdge as aI, type SubsetNode as aJ, type TemporalAlgorithmOptions as aK, type TransactionContext as aL, type TraversalDirection as aM, type TypedEdgeCollection as aN, UnionableQuery as aO, type UniqueIntrospection as aP, type UpdateEdgeInput as aQ, type UpdateNodeInput as aR, type VectorSearchHit as aS, type VectorSearchOptions as aT, createStore as aU, createStoreWithSchema as aV, createVerifiedStore as aW, defineSubgraphProject as aX, embedding as aY, exists as aZ, fieldRef as a_, type OntologyIntrospection as aa, type OperationHookContext as ab, type PaginateOptions as ac, type PaginatedResult as ad, type PathNode as ae, type Predicate as af, PreparedQuery as ag, type PropsAccessor as ah, type QueryHookContext as ai, type QueryOptions as aj, type ReachableNode as ak, type ReachableOptions as al, type RebuildFulltextOptions as am, type RebuildFulltextResult as an, type RecursiveTraversalOptions as ao, type SchemaIntrospection as ap, type SearchableMetadata as aq, type SearchableOptions as ar, type SearchableSchema as as, type SelectContext as at, type SelectableEdge as au, type SelectableNode as av, type ShortestPathOptions as aw, type ShortestPathResult as ax, type StoreHooks as ay, type StoreOptions as az, type AlgorithmCyclePolicy as b, getSearchableMetadata as b0, inSubquery as b1, isEmbeddingSchema as b2, isParameterRef as b3, isSearchableSchema as b4, notExists as b5, notInSubquery as b6, param as b7, searchable as b8, type AnyEdge as c, type AnyNode as d, type BatchResults as e, type BatchableQuery as f, type ConstraintNames as g, type CreateEdgeInput as h, type CreateNodeInput as i, type DegreeOptions as j, type DynamicEdgeAccessor as k, type DynamicEdgeCollection as l, type DynamicEdgeType as m, type DynamicFieldBuilder as n, type DynamicNodeAccessor as o, type DynamicNodeCollection as p, type DynamicNodeType as q, type DynamicSelectableEdge as r, type DynamicSelectableNode as s, type Edge as t, type EdgeAccessor as u, type EdgeCollection as v, type EdgeFindByEndpointsOptions as w, type EdgeGetOrCreateByEndpointsOptions as x, type EdgeGetOrCreateByEndpointsResult as y, type EdgeIntrospection as z };