@nicia-ai/typegraph 0.28.1 → 0.30.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 (178) hide show
  1. package/dist/backend/postgres/index.cjs +24 -762
  2. package/dist/backend/postgres/index.cjs.map +1 -1
  3. package/dist/backend/postgres/index.d.cts +24 -5
  4. package/dist/backend/postgres/index.d.ts +24 -5
  5. package/dist/backend/postgres/index.js +11 -753
  6. package/dist/backend/postgres/index.js.map +1 -1
  7. package/dist/backend/postgres/pglite.cjs +52 -0
  8. package/dist/backend/postgres/pglite.cjs.map +1 -0
  9. package/dist/backend/postgres/pglite.d.cts +116 -0
  10. package/dist/backend/postgres/pglite.d.ts +116 -0
  11. package/dist/backend/postgres/pglite.js +50 -0
  12. package/dist/backend/postgres/pglite.js.map +1 -0
  13. package/dist/backend/sqlite/index.cjs +23 -27
  14. package/dist/backend/sqlite/index.d.cts +22 -15
  15. package/dist/backend/sqlite/index.d.ts +22 -15
  16. package/dist/backend/sqlite/index.js +10 -10
  17. package/dist/backend/sqlite/libsql.cjs +18 -14
  18. package/dist/backend/sqlite/libsql.cjs.map +1 -1
  19. package/dist/backend/sqlite/libsql.d.cts +3 -3
  20. package/dist/backend/sqlite/libsql.d.ts +3 -3
  21. package/dist/backend/sqlite/libsql.js +17 -13
  22. package/dist/backend/sqlite/libsql.js.map +1 -1
  23. package/dist/backend/sqlite/local.cjs +19 -17
  24. package/dist/backend/sqlite/local.cjs.map +1 -1
  25. package/dist/backend/sqlite/local.d.cts +9 -3
  26. package/dist/backend/sqlite/local.d.ts +9 -3
  27. package/dist/backend/sqlite/local.js +17 -15
  28. package/dist/backend/sqlite/local.js.map +1 -1
  29. package/dist/chunk-26HWIIVS.cjs +740 -0
  30. package/dist/chunk-26HWIIVS.cjs.map +1 -0
  31. package/dist/chunk-2QA5EHEN.js +181 -0
  32. package/dist/chunk-2QA5EHEN.js.map +1 -0
  33. package/dist/chunk-3IRMLJEK.js +206 -0
  34. package/dist/chunk-3IRMLJEK.js.map +1 -0
  35. package/dist/{chunk-5MTOKWDA.js → chunk-3JLRHQ67.js} +9 -9
  36. package/dist/{chunk-5MTOKWDA.js.map → chunk-3JLRHQ67.js.map} +1 -1
  37. package/dist/{chunk-WVQXAFP3.js → chunk-454I6GDF.js} +46 -5
  38. package/dist/chunk-454I6GDF.js.map +1 -0
  39. package/dist/{chunk-CTHNVU6K.cjs → chunk-4BXHVEFB.cjs} +16 -16
  40. package/dist/{chunk-CTHNVU6K.cjs.map → chunk-4BXHVEFB.cjs.map} +1 -1
  41. package/dist/{chunk-NMOE2ZEU.cjs → chunk-4LBO6KIF.cjs} +139 -128
  42. package/dist/chunk-4LBO6KIF.cjs.map +1 -0
  43. package/dist/chunk-633N7DSE.js +258 -0
  44. package/dist/chunk-633N7DSE.js.map +1 -0
  45. package/dist/{chunk-WFUN6DCM.cjs → chunk-7JGLPAFV.cjs} +11 -11
  46. package/dist/chunk-7JGLPAFV.cjs.map +1 -0
  47. package/dist/{chunk-ZTREJOGB.js → chunk-AI3RNREM.js} +140 -69
  48. package/dist/chunk-AI3RNREM.js.map +1 -0
  49. package/dist/{chunk-TSGBRPNE.js → chunk-ENDUY2CD.js} +46 -46
  50. package/dist/chunk-ENDUY2CD.js.map +1 -0
  51. package/dist/{chunk-7V335GHG.cjs → chunk-FLRCVI2G.cjs} +12 -2
  52. package/dist/chunk-FLRCVI2G.cjs.map +1 -0
  53. package/dist/chunk-FVIGJTS7.js +305 -0
  54. package/dist/chunk-FVIGJTS7.js.map +1 -0
  55. package/dist/chunk-FWBVPATK.cjs +208 -0
  56. package/dist/chunk-FWBVPATK.cjs.map +1 -0
  57. package/dist/chunk-IE6GN7L3.cjs +319 -0
  58. package/dist/chunk-IE6GN7L3.cjs.map +1 -0
  59. package/dist/{chunk-PGU2XKMA.js → chunk-IUIJJYPI.js} +117 -106
  60. package/dist/chunk-IUIJJYPI.js.map +1 -0
  61. package/dist/{chunk-E5ROA3MN.js → chunk-IX7RE7CG.js} +3 -3
  62. package/dist/{chunk-E5ROA3MN.js.map → chunk-IX7RE7CG.js.map} +1 -1
  63. package/dist/{chunk-YEDQLNVE.cjs → chunk-JIEJCTDS.cjs} +30 -2
  64. package/dist/chunk-JIEJCTDS.cjs.map +1 -0
  65. package/dist/{chunk-WZH2MKHW.cjs → chunk-K4N35E7B.cjs} +101 -101
  66. package/dist/{chunk-WZH2MKHW.cjs.map → chunk-K4N35E7B.cjs.map} +1 -1
  67. package/dist/{chunk-NZ5PMBTG.js → chunk-K5P5OZXS.js} +12 -3
  68. package/dist/chunk-K5P5OZXS.js.map +1 -0
  69. package/dist/chunk-K5VREXMZ.js +738 -0
  70. package/dist/chunk-K5VREXMZ.js.map +1 -0
  71. package/dist/chunk-LUHU4T2F.cjs +12 -0
  72. package/dist/{chunk-4FJVSF3K.cjs.map → chunk-LUHU4T2F.cjs.map} +1 -1
  73. package/dist/{chunk-O57GYGYK.js → chunk-M6OC455F.js} +32 -18
  74. package/dist/chunk-M6OC455F.js.map +1 -0
  75. package/dist/{chunk-OYLF3IC7.js → chunk-MAQJYNJR.js} +4 -4
  76. package/dist/chunk-MAQJYNJR.js.map +1 -0
  77. package/dist/{chunk-OOS2RKRH.js → chunk-MXE2U3EX.js} +4 -4
  78. package/dist/{chunk-OOS2RKRH.js.map → chunk-MXE2U3EX.js.map} +1 -1
  79. package/dist/{chunk-TKM2WDT4.js → chunk-N2OEOGBB.js} +386 -1093
  80. package/dist/chunk-N2OEOGBB.js.map +1 -0
  81. package/dist/{chunk-EJCDOA37.js → chunk-R4JOBEJU.js} +5 -5
  82. package/dist/{chunk-EJCDOA37.js.map → chunk-R4JOBEJU.js.map} +1 -1
  83. package/dist/{chunk-FFHW2JEK.cjs → chunk-RP7YITHX.cjs} +32 -17
  84. package/dist/chunk-RP7YITHX.cjs.map +1 -0
  85. package/dist/{chunk-PYJOBZR3.cjs → chunk-SGPXKJ4A.cjs} +60 -60
  86. package/dist/chunk-SGPXKJ4A.cjs.map +1 -0
  87. package/dist/{chunk-U5ROKVRF.js → chunk-TQOYM4LN.js} +29 -3
  88. package/dist/chunk-TQOYM4LN.js.map +1 -0
  89. package/dist/{chunk-PN37HVAV.cjs → chunk-UESTHN47.cjs} +153 -71
  90. package/dist/chunk-UESTHN47.cjs.map +1 -0
  91. package/dist/chunk-VFX3LC76.cjs +183 -0
  92. package/dist/chunk-VFX3LC76.cjs.map +1 -0
  93. package/dist/chunk-WEMZM7J7.cjs +270 -0
  94. package/dist/chunk-WEMZM7J7.cjs.map +1 -0
  95. package/dist/{chunk-NYQFPGYP.cjs → chunk-WFCECD6Q.cjs} +423 -1139
  96. package/dist/chunk-WFCECD6Q.cjs.map +1 -0
  97. package/dist/{chunk-EK6RJ373.cjs → chunk-YQGLVWB2.cjs} +7 -7
  98. package/dist/{chunk-EK6RJ373.cjs.map → chunk-YQGLVWB2.cjs.map} +1 -1
  99. package/dist/{chunk-X3244EKP.cjs → chunk-ZFWNO3GE.cjs} +48 -4
  100. package/dist/chunk-ZFWNO3GE.cjs.map +1 -0
  101. package/dist/ddl-BSFlbGQF.d.cts +38 -0
  102. package/dist/ddl-EdkIiFVU.d.ts +38 -0
  103. package/dist/{extension-types-B78CZfA5.d.cts → extension-types-CwHV-Uk4.d.cts} +4 -4
  104. package/dist/{extension-types-B78CZfA5.d.ts → extension-types-CwHV-Uk4.d.ts} +4 -4
  105. package/dist/graph-extension/index.cjs +19 -19
  106. package/dist/graph-extension/index.d.cts +4 -4
  107. package/dist/graph-extension/index.d.ts +4 -4
  108. package/dist/graph-extension/index.js +4 -4
  109. package/dist/{index-CWdBFWbI.d.ts → index-DzeIiMO3.d.ts} +30 -3
  110. package/dist/{index-Bilw0pYm.d.cts → index-Ln_KHTGA.d.cts} +30 -3
  111. package/dist/index.cjs +1542 -1011
  112. package/dist/index.cjs.map +1 -1
  113. package/dist/index.d.cts +142 -12
  114. package/dist/index.d.ts +142 -12
  115. package/dist/index.js +1138 -643
  116. package/dist/index.js.map +1 -1
  117. package/dist/indexes/index.cjs +19 -19
  118. package/dist/indexes/index.d.cts +9 -9
  119. package/dist/indexes/index.d.ts +9 -9
  120. package/dist/indexes/index.js +5 -5
  121. package/dist/interchange/index.cjs +8 -14
  122. package/dist/interchange/index.cjs.map +1 -1
  123. package/dist/interchange/index.d.cts +5 -16
  124. package/dist/interchange/index.d.ts +5 -16
  125. package/dist/interchange/index.js +3 -9
  126. package/dist/interchange/index.js.map +1 -1
  127. package/dist/{manager-ehLTTNq0.d.ts → manager-BbdyNhkv.d.ts} +2 -2
  128. package/dist/{manager-c1MGaVVR.d.cts → manager-wTDgjoXG.d.cts} +2 -2
  129. package/dist/{materialize-indexes-DFavFQah.d.ts → materialize-indexes-lkawaDor.d.ts} +1 -1
  130. package/dist/{materialize-indexes-BQfaAZKA.d.cts → materialize-indexes-oanE3RU0.d.cts} +1 -1
  131. package/dist/{ddl-0Ooc2dpL.d.ts → postgres-CK2ByP1q.d.cts} +2 -471
  132. package/dist/{ddl-Dza3kDrI.d.cts → postgres-ymXYC6Rr.d.ts} +2 -471
  133. package/dist/profiler/index.cjs +10 -10
  134. package/dist/profiler/index.d.cts +7 -7
  135. package/dist/profiler/index.d.ts +7 -7
  136. package/dist/profiler/index.js +3 -3
  137. package/dist/schema/index.cjs +33 -33
  138. package/dist/schema/index.d.cts +7 -7
  139. package/dist/schema/index.d.ts +7 -7
  140. package/dist/schema/index.js +10 -10
  141. package/dist/{sqlite-BxZUPbyD.d.ts → sqlite-DxH1lrwD.d.cts} +2 -468
  142. package/dist/{sqlite-mvpXjEeB.d.cts → sqlite-R8YGOqVQ.d.ts} +2 -468
  143. package/dist/{store-Ufc1Eoey.d.ts → store--z1Tmk7U.d.cts} +124 -5
  144. package/dist/{store-D7YEMg2v.d.cts → store-CNKM334w.d.ts} +124 -5
  145. package/dist/{types-CMQymcwk.d.cts → types-BBiDqJCU.d.ts} +252 -46
  146. package/dist/{types-B-sJJ4GQ.d.ts → types-CMvxx2kd.d.ts} +2 -2
  147. package/dist/{types-CmUA9sal.d.cts → types-D5B6Be5c.d.cts} +2 -2
  148. package/dist/{types-CQ7xXJMP.d.ts → types-dL-clxO3.d.cts} +252 -46
  149. package/dist/{where-CtrLu1Zf.d.ts → where-CAo6wsBZ.d.ts} +2 -2
  150. package/dist/{where-5zf15aFZ.d.cts → where-bJjuOCeV.d.cts} +2 -2
  151. package/package.json +20 -5
  152. package/dist/chunk-3EUKJEQ3.js +0 -77
  153. package/dist/chunk-3EUKJEQ3.js.map +0 -1
  154. package/dist/chunk-4FJVSF3K.cjs +0 -12
  155. package/dist/chunk-7V335GHG.cjs.map +0 -1
  156. package/dist/chunk-FFHW2JEK.cjs.map +0 -1
  157. package/dist/chunk-HTGDWIDE.cjs +0 -89
  158. package/dist/chunk-HTGDWIDE.cjs.map +0 -1
  159. package/dist/chunk-LYRUNG6E.cjs +0 -52
  160. package/dist/chunk-LYRUNG6E.cjs.map +0 -1
  161. package/dist/chunk-NMOE2ZEU.cjs.map +0 -1
  162. package/dist/chunk-NYQFPGYP.cjs.map +0 -1
  163. package/dist/chunk-NZ5PMBTG.js.map +0 -1
  164. package/dist/chunk-O57GYGYK.js.map +0 -1
  165. package/dist/chunk-OYLF3IC7.js.map +0 -1
  166. package/dist/chunk-PCHTTG42.js +0 -47
  167. package/dist/chunk-PCHTTG42.js.map +0 -1
  168. package/dist/chunk-PGU2XKMA.js.map +0 -1
  169. package/dist/chunk-PN37HVAV.cjs.map +0 -1
  170. package/dist/chunk-PYJOBZR3.cjs.map +0 -1
  171. package/dist/chunk-TKM2WDT4.js.map +0 -1
  172. package/dist/chunk-TSGBRPNE.js.map +0 -1
  173. package/dist/chunk-U5ROKVRF.js.map +0 -1
  174. package/dist/chunk-WFUN6DCM.cjs.map +0 -1
  175. package/dist/chunk-WVQXAFP3.js.map +0 -1
  176. package/dist/chunk-X3244EKP.cjs.map +0 -1
  177. package/dist/chunk-YEDQLNVE.cjs.map +0 -1
  178. package/dist/chunk-ZTREJOGB.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { K as KindEntity } from './extension-types-B78CZfA5.js';
2
- import { M as MaterializeIndexesResult } from './materialize-indexes-DFavFQah.js';
1
+ import { K as KindEntity } from './extension-types-CwHV-Uk4.js';
2
+ import { M as MaterializeIndexesResult } from './materialize-indexes-lkawaDor.js';
3
3
 
4
4
  /**
5
5
  * TypeGraph Error Hierarchy
@@ -172,6 +172,14 @@ declare class NodeConstraintNotFoundError extends TypeGraphError {
172
172
  cause?: unknown;
173
173
  });
174
174
  }
175
+ /**
176
+ * Thrown when a declared node index name is not found on a node kind.
177
+ */
178
+ declare class NodeIndexNotFoundError extends TypeGraphError {
179
+ constructor(indexName: string, kind: string, options?: {
180
+ cause?: unknown;
181
+ });
182
+ }
175
183
  /**
176
184
  * Thrown when edge endpoint node does not exist or is deleted.
177
185
  */
@@ -447,6 +455,25 @@ declare class DatabaseOperationError extends TypeGraphError {
447
455
  cause?: unknown;
448
456
  });
449
457
  }
458
+ /**
459
+ * Thrown when an embedding field's declared dimension no longer matches the
460
+ * dimension of its materialized per-field storage — i.e. a field's
461
+ * `embedding(N)` was changed to `embedding(M)`. The stored vectors are invalid
462
+ * under the new dimension and cannot be converted, only recomputed, so this is
463
+ * a deliberate app-driven migration: call
464
+ * `store.reembedVectorField(kind, fieldPath, ...)` to recreate the storage at
465
+ * the new dimension and re-embed existing rows.
466
+ */
467
+ declare class EmbeddingDimensionChangedError extends TypeGraphError {
468
+ constructor(message: string, details: Readonly<{
469
+ kind: string;
470
+ fieldPath: string;
471
+ declaredDimensions?: number;
472
+ storedDimensions?: number;
473
+ }>, options?: {
474
+ cause?: unknown;
475
+ });
476
+ }
450
477
  /**
451
478
  * Thrown when a query predicate cannot be compiled for the target database.
452
479
  */
@@ -530,4 +557,4 @@ declare function isConstraintError(error: unknown): boolean;
530
557
  */
531
558
  declare function getErrorSuggestion(error: unknown): string | undefined;
532
559
 
533
- export { BackendDisposedError as B, CardinalityError as C, DatabaseOperationError as D, EagerMaterializationError as E, KindNotFoundError as K, MigrationError as M, NodeConstraintNotFoundError as N, RestrictedDeleteError as R, SchemaContentConflictError as S, TypeGraphError as T, UniquenessError as U, type ValidationIssue as V, ValidationError as a, CompilerInvariantError as b, ConfigurationError as c, DisjointError as d, EdgeNotFoundError as e, EndpointError as f, EndpointNotFoundError as g, type ErrorCategory as h, NodeNotFoundError as i, SchemaMismatchError as j, StaleVersionError as k, StoreNotInitializedError as l, type StoreNotInitializedReason as m, type TypeGraphErrorOptions as n, UnsupportedPredicateError as o, type ValidationErrorDetails as p, VersionConflictError as q, getErrorSuggestion as r, isConstraintError as s, isSystemError as t, isTypeGraphError as u, isUserRecoverable as v };
560
+ export { BackendDisposedError as B, CardinalityError as C, DatabaseOperationError as D, EagerMaterializationError as E, KindNotFoundError as K, MigrationError as M, NodeConstraintNotFoundError as N, RestrictedDeleteError as R, SchemaContentConflictError as S, TypeGraphError as T, UniquenessError as U, type ValidationIssue as V, ValidationError as a, CompilerInvariantError as b, ConfigurationError as c, DisjointError as d, EdgeNotFoundError as e, EmbeddingDimensionChangedError as f, EndpointError as g, EndpointNotFoundError as h, type ErrorCategory as i, NodeIndexNotFoundError as j, NodeNotFoundError as k, SchemaMismatchError as l, StaleVersionError as m, StoreNotInitializedError as n, type StoreNotInitializedReason as o, type TypeGraphErrorOptions as p, UnsupportedPredicateError as q, type ValidationErrorDetails as r, VersionConflictError as s, getErrorSuggestion as t, isConstraintError as u, isSystemError as v, isTypeGraphError as w, isUserRecoverable as x };
@@ -1,5 +1,5 @@
1
- import { K as KindEntity } from './extension-types-B78CZfA5.cjs';
2
- import { M as MaterializeIndexesResult } from './materialize-indexes-BQfaAZKA.cjs';
1
+ import { K as KindEntity } from './extension-types-CwHV-Uk4.cjs';
2
+ import { M as MaterializeIndexesResult } from './materialize-indexes-oanE3RU0.cjs';
3
3
 
4
4
  /**
5
5
  * TypeGraph Error Hierarchy
@@ -172,6 +172,14 @@ declare class NodeConstraintNotFoundError extends TypeGraphError {
172
172
  cause?: unknown;
173
173
  });
174
174
  }
175
+ /**
176
+ * Thrown when a declared node index name is not found on a node kind.
177
+ */
178
+ declare class NodeIndexNotFoundError extends TypeGraphError {
179
+ constructor(indexName: string, kind: string, options?: {
180
+ cause?: unknown;
181
+ });
182
+ }
175
183
  /**
176
184
  * Thrown when edge endpoint node does not exist or is deleted.
177
185
  */
@@ -447,6 +455,25 @@ declare class DatabaseOperationError extends TypeGraphError {
447
455
  cause?: unknown;
448
456
  });
449
457
  }
458
+ /**
459
+ * Thrown when an embedding field's declared dimension no longer matches the
460
+ * dimension of its materialized per-field storage — i.e. a field's
461
+ * `embedding(N)` was changed to `embedding(M)`. The stored vectors are invalid
462
+ * under the new dimension and cannot be converted, only recomputed, so this is
463
+ * a deliberate app-driven migration: call
464
+ * `store.reembedVectorField(kind, fieldPath, ...)` to recreate the storage at
465
+ * the new dimension and re-embed existing rows.
466
+ */
467
+ declare class EmbeddingDimensionChangedError extends TypeGraphError {
468
+ constructor(message: string, details: Readonly<{
469
+ kind: string;
470
+ fieldPath: string;
471
+ declaredDimensions?: number;
472
+ storedDimensions?: number;
473
+ }>, options?: {
474
+ cause?: unknown;
475
+ });
476
+ }
450
477
  /**
451
478
  * Thrown when a query predicate cannot be compiled for the target database.
452
479
  */
@@ -530,4 +557,4 @@ declare function isConstraintError(error: unknown): boolean;
530
557
  */
531
558
  declare function getErrorSuggestion(error: unknown): string | undefined;
532
559
 
533
- export { BackendDisposedError as B, CardinalityError as C, DatabaseOperationError as D, EagerMaterializationError as E, KindNotFoundError as K, MigrationError as M, NodeConstraintNotFoundError as N, RestrictedDeleteError as R, SchemaContentConflictError as S, TypeGraphError as T, UniquenessError as U, type ValidationIssue as V, ValidationError as a, CompilerInvariantError as b, ConfigurationError as c, DisjointError as d, EdgeNotFoundError as e, EndpointError as f, EndpointNotFoundError as g, type ErrorCategory as h, NodeNotFoundError as i, SchemaMismatchError as j, StaleVersionError as k, StoreNotInitializedError as l, type StoreNotInitializedReason as m, type TypeGraphErrorOptions as n, UnsupportedPredicateError as o, type ValidationErrorDetails as p, VersionConflictError as q, getErrorSuggestion as r, isConstraintError as s, isSystemError as t, isTypeGraphError as u, isUserRecoverable as v };
560
+ export { BackendDisposedError as B, CardinalityError as C, DatabaseOperationError as D, EagerMaterializationError as E, KindNotFoundError as K, MigrationError as M, NodeConstraintNotFoundError as N, RestrictedDeleteError as R, SchemaContentConflictError as S, TypeGraphError as T, UniquenessError as U, type ValidationIssue as V, ValidationError as a, CompilerInvariantError as b, ConfigurationError as c, DisjointError as d, EdgeNotFoundError as e, EmbeddingDimensionChangedError as f, EndpointError as g, EndpointNotFoundError as h, type ErrorCategory as i, NodeIndexNotFoundError as j, NodeNotFoundError as k, SchemaMismatchError as l, StaleVersionError as m, StoreNotInitializedError as n, type StoreNotInitializedReason as o, type TypeGraphErrorOptions as p, UnsupportedPredicateError as q, type ValidationErrorDetails as r, VersionConflictError as s, getErrorSuggestion as t, isConstraintError as u, isSystemError as v, isTypeGraphError as w, isUserRecoverable as x };