@nicia-ai/typegraph 0.13.0 → 0.15.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 (81) hide show
  1. package/dist/backend/postgres/index.cjs +34 -28
  2. package/dist/backend/postgres/index.cjs.map +1 -1
  3. package/dist/backend/postgres/index.d.cts +5 -5
  4. package/dist/backend/postgres/index.d.ts +5 -5
  5. package/dist/backend/postgres/index.js +16 -10
  6. package/dist/backend/postgres/index.js.map +1 -1
  7. package/dist/backend/sqlite/index.cjs +14 -14
  8. package/dist/backend/sqlite/index.d.cts +5 -5
  9. package/dist/backend/sqlite/index.d.ts +5 -5
  10. package/dist/backend/sqlite/index.js +4 -4
  11. package/dist/backend/sqlite/local.cjs +7 -7
  12. package/dist/backend/sqlite/local.cjs.map +1 -1
  13. package/dist/backend/sqlite/local.d.cts +3 -3
  14. package/dist/backend/sqlite/local.d.ts +3 -3
  15. package/dist/backend/sqlite/local.js +7 -7
  16. package/dist/backend/sqlite/local.js.map +1 -1
  17. package/dist/{chunk-7VITUTRA.cjs → chunk-3HQLOKS5.cjs} +163 -13
  18. package/dist/chunk-3HQLOKS5.cjs.map +1 -0
  19. package/dist/{chunk-NZMKJHE2.cjs → chunk-56RQFK7U.cjs} +22 -15
  20. package/dist/chunk-56RQFK7U.cjs.map +1 -0
  21. package/dist/{chunk-U3452TEU.js → chunk-6GWJH6AR.js} +15 -27
  22. package/dist/chunk-6GWJH6AR.js.map +1 -0
  23. package/dist/{chunk-2XPKLHHH.cjs → chunk-CRMN2NOM.cjs} +247 -208
  24. package/dist/chunk-CRMN2NOM.cjs.map +1 -0
  25. package/dist/{chunk-54WJF3DW.js → chunk-GNIYZKBI.js} +29 -3
  26. package/dist/chunk-GNIYZKBI.js.map +1 -0
  27. package/dist/{chunk-52WSY6G5.js → chunk-HWWF3FOP.js} +158 -119
  28. package/dist/chunk-HWWF3FOP.js.map +1 -0
  29. package/dist/{chunk-PYV4ADC6.js → chunk-L4ON6RJF.js} +164 -14
  30. package/dist/chunk-L4ON6RJF.js.map +1 -0
  31. package/dist/{chunk-JQDWEX6V.cjs → chunk-LELLOHJK.cjs} +22 -34
  32. package/dist/chunk-LELLOHJK.cjs.map +1 -0
  33. package/dist/{chunk-2WVFEIHR.cjs → chunk-MME3H4ZF.cjs} +40 -2
  34. package/dist/chunk-MME3H4ZF.cjs.map +1 -0
  35. package/dist/{chunk-J4SICP3X.js → chunk-XZBAGJJH.js} +15 -8
  36. package/dist/chunk-XZBAGJJH.js.map +1 -0
  37. package/dist/{ddl-BJg93HDN.d.cts → ddl-BBo2EcFc.d.cts} +2 -2
  38. package/dist/{ddl-CsfWcl_B.d.ts → ddl-D4jlcOH_.d.ts} +2 -2
  39. package/dist/index.cjs +473 -625
  40. package/dist/index.cjs.map +1 -1
  41. package/dist/index.d.cts +12 -9
  42. package/dist/index.d.ts +12 -9
  43. package/dist/index.js +434 -586
  44. package/dist/index.js.map +1 -1
  45. package/dist/indexes/index.cjs +16 -16
  46. package/dist/indexes/index.d.cts +2 -2
  47. package/dist/indexes/index.d.ts +2 -2
  48. package/dist/indexes/index.js +2 -2
  49. package/dist/interchange/index.d.cts +3 -3
  50. package/dist/interchange/index.d.ts +3 -3
  51. package/dist/{manager-DGSnJa1v.d.cts → manager-Bj1UEnhE.d.cts} +2 -2
  52. package/dist/{manager-BCLhWysp.d.ts → manager-Chhrq1vl.d.ts} +2 -2
  53. package/dist/profiler/index.cjs +6 -6
  54. package/dist/profiler/index.cjs.map +1 -1
  55. package/dist/profiler/index.d.cts +3 -3
  56. package/dist/profiler/index.d.ts +3 -3
  57. package/dist/profiler/index.js +6 -6
  58. package/dist/profiler/index.js.map +1 -1
  59. package/dist/schema/index.cjs +20 -20
  60. package/dist/schema/index.d.cts +4 -4
  61. package/dist/schema/index.d.ts +4 -4
  62. package/dist/schema/index.js +2 -2
  63. package/dist/{sqlite-H01wIXvB.d.ts → sqlite-Blq-AhmK.d.ts} +1 -1
  64. package/dist/{sqlite-DVca_IIy.d.cts → sqlite-DE-6NWtC.d.cts} +1 -1
  65. package/dist/{store-Bmdt_dS6.d.cts → store-BNercm8P.d.cts} +86 -31
  66. package/dist/{store-6-vH0ZIj.d.ts → store-CD_0yf2s.d.ts} +86 -31
  67. package/dist/{types-GLkwvQvS.d.cts → types-B3mmOMJV.d.cts} +20 -6
  68. package/dist/{types-C8Ra3ROE.d.cts → types-CZd2PEOc.d.cts} +8 -2
  69. package/dist/{types-CC8eB0PB.d.ts → types-Ceb01czq.d.ts} +8 -2
  70. package/dist/{types-1YJKodRv.d.ts → types-ThB4cFLp.d.ts} +20 -6
  71. package/package.json +1 -1
  72. package/dist/chunk-2WVFEIHR.cjs.map +0 -1
  73. package/dist/chunk-2XPKLHHH.cjs.map +0 -1
  74. package/dist/chunk-52WSY6G5.js.map +0 -1
  75. package/dist/chunk-54WJF3DW.js.map +0 -1
  76. package/dist/chunk-7VITUTRA.cjs.map +0 -1
  77. package/dist/chunk-J4SICP3X.js.map +0 -1
  78. package/dist/chunk-JQDWEX6V.cjs.map +0 -1
  79. package/dist/chunk-NZMKJHE2.cjs.map +0 -1
  80. package/dist/chunk-PYV4ADC6.js.map +0 -1
  81. package/dist/chunk-U3452TEU.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { N as NodeType, E as EdgeType } from './types-DMzKq0d5.cjs';
3
3
  export { A as AnyEdgeType, C as Cardinality, a as Collation, D as DeleteBehavior, b as EdgeId, c as EdgeProps, d as EdgeRegistration, e as EdgeTypeWithEndpoints, f as EndpointExistence, G as GraphDefaults, g as NodeId, h as NodeProps, i as NodeRegistration, S as SqlDialect, T as TemporalMode, U as UniqueConstraint, j as UniquenessScope, k as isEdgeType, l as isEdgeTypeWithEndpoints, m as isNodeType } from './types-DMzKq0d5.cjs';
4
- import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-GLkwvQvS.cjs';
5
- export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-GLkwvQvS.cjs';
6
- import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-Bmdt_dS6.cjs';
7
- export { a as AggregateResult, b as AnyEdge, c as AnyNode, B as BatchResults, d as BatchableQuery, e as ConstraintNames, f as CreateEdgeInput, g as CreateNodeInput, h as Edge, i as EdgeAccessor, j as EdgeCollection, k as EdgeFindByEndpointsOptions, l as EdgeGetOrCreateByEndpointsOptions, m as EdgeGetOrCreateByEndpointsResult, n as EmbeddingSchema, o as EmbeddingValue, p as ExecutableAggregateQuery, q as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, H as HookContext, I as IfExistsMode, N as Node, r as NodeAccessor, s as NodeAlias, t as NodeCollection, u as NodeGetOrCreateByConstraintOptions, v as NodeGetOrCreateByConstraintResult, w as NodeRef, O as OperationHookContext, P as PaginateOptions, x as PaginatedResult, y as Predicate, z as PreparedQuery, D as PropsAccessor, J as QueryHookContext, K as QueryOptions, R as RecursiveTraversalOptions, S as SelectContext, L as SelectableEdge, M as SelectableNode, U as Store, V as StoreHooks, W as StoreOptions, X as StreamOptions, Y as SubgraphOptions, Z as SubgraphResult, _ as SubsetEdge, $ as SubsetNode, a0 as TransactionContext, a1 as TypedEdgeCollection, a2 as UnionableQuery, a3 as UpdateEdgeInput, a4 as UpdateNodeInput, a5 as createStore, a6 as createStoreWithSchema, a7 as defineSubgraphProject, a8 as embedding, a9 as exists, aa as fieldRef, ab as getEmbeddingDimensions, ac as inSubquery, ad as isEmbeddingSchema, ae as isParameterRef, af as notExists, ag as notInSubquery, ah as param } from './store-Bmdt_dS6.cjs';
8
- import { G as GraphDef, K as KindRegistry } from './manager-DGSnJa1v.cjs';
9
- export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, d as defineGraph, g as getEdgeKinds, e as getNodeKinds, i as isGraphDef } from './manager-DGSnJa1v.cjs';
4
+ import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-B3mmOMJV.cjs';
5
+ export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-B3mmOMJV.cjs';
6
+ import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-BNercm8P.cjs';
7
+ export { a as AggregateResult, b as AnyEdge, c as AnyNode, B as BatchResults, d as BatchableQuery, e as ConstraintNames, f as CreateEdgeInput, g as CreateNodeInput, h as Edge, i as EdgeAccessor, j as EdgeCollection, k as EdgeFindByEndpointsOptions, l as EdgeGetOrCreateByEndpointsOptions, m as EdgeGetOrCreateByEndpointsResult, n as EmbeddingSchema, o as EmbeddingValue, p as ExecutableAggregateQuery, q as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, r as GraphEdgeCollections, s as GraphNodeCollections, H as HookContext, I as IfExistsMode, N as Node, t as NodeAccessor, u as NodeAlias, v as NodeCollection, w as NodeGetOrCreateByConstraintOptions, x as NodeGetOrCreateByConstraintResult, y as NodeRef, O as OperationHookContext, P as PaginateOptions, z as PaginatedResult, D as Predicate, J as PreparedQuery, K as PropsAccessor, L as QueryHookContext, M as QueryOptions, R as RecursiveTraversalOptions, S as SelectContext, U as SelectableEdge, V as SelectableNode, W as Store, X as StoreHooks, Y as StoreOptions, Z as StoreProjection, _ as StreamOptions, $ as SubgraphOptions, a0 as SubgraphResult, a1 as SubsetEdge, a2 as SubsetNode, a3 as TransactionContext, a4 as TypedEdgeCollection, a5 as UnionableQuery, a6 as UpdateEdgeInput, a7 as UpdateNodeInput, a8 as createStore, a9 as createStoreWithSchema, aa as defineSubgraphProject, ab as embedding, ac as exists, ad as fieldRef, ae as getEmbeddingDimensions, af as inSubquery, ag as isEmbeddingSchema, ah as isParameterRef, ai as notExists, aj as notInSubquery, ak as param } from './store-BNercm8P.cjs';
8
+ import { G as GraphDef, K as KindRegistry } from './manager-Bj1UEnhE.cjs';
9
+ export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, S as SchemaManagerOptions, d as SchemaValidationResult, e as defineGraph, g as getEdgeKinds, f as getNodeKinds, i as isGraphDef } from './manager-Bj1UEnhE.cjs';
10
10
  export { C as CardinalityError, a as CompilerInvariantError, b as ConfigurationError, D as DatabaseOperationError, c as DisjointError, E as EdgeNotFoundError, d as EndpointError, e as EndpointNotFoundError, f as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, g as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaMismatchError, T as TypeGraphError, h as TypeGraphErrorOptions, U as UniquenessError, i as UnsupportedPredicateError, V as ValidationError, j as ValidationErrorDetails, k as ValidationIssue, l as VersionConflictError, m as getErrorSuggestion, n as isConstraintError, o as isSystemError, p as isTypeGraphError, q as isUserRecoverable } from './index-QTnQwakS.cjs';
11
11
  import { A as AggregateExpr, F as FieldRef, C as ComparisonOp, a as AggregateComparisonPredicate } from './ast-Bh2NDeaK.cjs';
12
12
  export { J as JsonPointer, b as JsonPointerFor, c as JsonPointerInput, d as JsonPointerSegment, e as JsonPointerSegments, f as JsonPointerSegmentsFor, M as MAX_JSON_POINTER_DEPTH, O as OrderSpec, P as ParameterRef, R as ResolveJsonPointer, g as ResolveJsonPointerSegments, S as SortDirection, T as TraversalExpansion, j as joinJsonPointers, h as jsonPointer, n as normalizeJsonPointer, p as parseJsonPointer } from './ast-Bh2NDeaK.cjs';
@@ -437,10 +437,13 @@ declare const core: {
437
437
  /**
438
438
  * Maximum depth for recursive CTE queries when maxDepth is unlimited (-1).
439
439
  *
440
- * This default limit prevents runaway recursion for unbounded traversals while
441
- * still supporting typical neighborhood/path use-cases.
440
+ * Graphs with branching factor B produce O(B^depth) rows before cycle
441
+ * detection can prune them. A default of 10 covers typical neighborhood,
442
+ * shortest-path, and hierarchy use-cases without risking exponential blowup
443
+ * on dense graphs. Users who need deeper traversals should call .maxHops(N)
444
+ * explicitly (up to MAX_EXPLICIT_RECURSIVE_DEPTH).
442
445
  */
443
- declare const MAX_RECURSIVE_DEPTH = 100;
446
+ declare const MAX_RECURSIVE_DEPTH = 10;
444
447
  /**
445
448
  * Maximum depth for explicit maxDepth traversals.
446
449
  *
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { N as NodeType, E as EdgeType } from './types-DMzKq0d5.js';
3
3
  export { A as AnyEdgeType, C as Cardinality, a as Collation, D as DeleteBehavior, b as EdgeId, c as EdgeProps, d as EdgeRegistration, e as EdgeTypeWithEndpoints, f as EndpointExistence, G as GraphDefaults, g as NodeId, h as NodeProps, i as NodeRegistration, S as SqlDialect, T as TemporalMode, U as UniqueConstraint, j as UniquenessScope, k as isEdgeType, l as isEdgeTypeWithEndpoints, m as isNodeType } from './types-DMzKq0d5.js';
4
- import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-1YJKodRv.js';
5
- export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-1YJKodRv.js';
6
- import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-6-vH0ZIj.js';
7
- export { a as AggregateResult, b as AnyEdge, c as AnyNode, B as BatchResults, d as BatchableQuery, e as ConstraintNames, f as CreateEdgeInput, g as CreateNodeInput, h as Edge, i as EdgeAccessor, j as EdgeCollection, k as EdgeFindByEndpointsOptions, l as EdgeGetOrCreateByEndpointsOptions, m as EdgeGetOrCreateByEndpointsResult, n as EmbeddingSchema, o as EmbeddingValue, p as ExecutableAggregateQuery, q as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, H as HookContext, I as IfExistsMode, N as Node, r as NodeAccessor, s as NodeAlias, t as NodeCollection, u as NodeGetOrCreateByConstraintOptions, v as NodeGetOrCreateByConstraintResult, w as NodeRef, O as OperationHookContext, P as PaginateOptions, x as PaginatedResult, y as Predicate, z as PreparedQuery, D as PropsAccessor, J as QueryHookContext, K as QueryOptions, R as RecursiveTraversalOptions, S as SelectContext, L as SelectableEdge, M as SelectableNode, U as Store, V as StoreHooks, W as StoreOptions, X as StreamOptions, Y as SubgraphOptions, Z as SubgraphResult, _ as SubsetEdge, $ as SubsetNode, a0 as TransactionContext, a1 as TypedEdgeCollection, a2 as UnionableQuery, a3 as UpdateEdgeInput, a4 as UpdateNodeInput, a5 as createStore, a6 as createStoreWithSchema, a7 as defineSubgraphProject, a8 as embedding, a9 as exists, aa as fieldRef, ab as getEmbeddingDimensions, ac as inSubquery, ad as isEmbeddingSchema, ae as isParameterRef, af as notExists, ag as notInSubquery, ah as param } from './store-6-vH0ZIj.js';
8
- import { G as GraphDef, K as KindRegistry } from './manager-BCLhWysp.js';
9
- export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, d as defineGraph, g as getEdgeKinds, e as getNodeKinds, i as isGraphDef } from './manager-BCLhWysp.js';
4
+ import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-ThB4cFLp.js';
5
+ export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-ThB4cFLp.js';
6
+ import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-CD_0yf2s.js';
7
+ export { a as AggregateResult, b as AnyEdge, c as AnyNode, B as BatchResults, d as BatchableQuery, e as ConstraintNames, f as CreateEdgeInput, g as CreateNodeInput, h as Edge, i as EdgeAccessor, j as EdgeCollection, k as EdgeFindByEndpointsOptions, l as EdgeGetOrCreateByEndpointsOptions, m as EdgeGetOrCreateByEndpointsResult, n as EmbeddingSchema, o as EmbeddingValue, p as ExecutableAggregateQuery, q as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, r as GraphEdgeCollections, s as GraphNodeCollections, H as HookContext, I as IfExistsMode, N as Node, t as NodeAccessor, u as NodeAlias, v as NodeCollection, w as NodeGetOrCreateByConstraintOptions, x as NodeGetOrCreateByConstraintResult, y as NodeRef, O as OperationHookContext, P as PaginateOptions, z as PaginatedResult, D as Predicate, J as PreparedQuery, K as PropsAccessor, L as QueryHookContext, M as QueryOptions, R as RecursiveTraversalOptions, S as SelectContext, U as SelectableEdge, V as SelectableNode, W as Store, X as StoreHooks, Y as StoreOptions, Z as StoreProjection, _ as StreamOptions, $ as SubgraphOptions, a0 as SubgraphResult, a1 as SubsetEdge, a2 as SubsetNode, a3 as TransactionContext, a4 as TypedEdgeCollection, a5 as UnionableQuery, a6 as UpdateEdgeInput, a7 as UpdateNodeInput, a8 as createStore, a9 as createStoreWithSchema, aa as defineSubgraphProject, ab as embedding, ac as exists, ad as fieldRef, ae as getEmbeddingDimensions, af as inSubquery, ag as isEmbeddingSchema, ah as isParameterRef, ai as notExists, aj as notInSubquery, ak as param } from './store-CD_0yf2s.js';
8
+ import { G as GraphDef, K as KindRegistry } from './manager-Chhrq1vl.js';
9
+ export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, S as SchemaManagerOptions, d as SchemaValidationResult, e as defineGraph, g as getEdgeKinds, f as getNodeKinds, i as isGraphDef } from './manager-Chhrq1vl.js';
10
10
  export { C as CardinalityError, a as CompilerInvariantError, b as ConfigurationError, D as DatabaseOperationError, c as DisjointError, E as EdgeNotFoundError, d as EndpointError, e as EndpointNotFoundError, f as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, g as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaMismatchError, T as TypeGraphError, h as TypeGraphErrorOptions, U as UniquenessError, i as UnsupportedPredicateError, V as ValidationError, j as ValidationErrorDetails, k as ValidationIssue, l as VersionConflictError, m as getErrorSuggestion, n as isConstraintError, o as isSystemError, p as isTypeGraphError, q as isUserRecoverable } from './index-QTnQwakS.js';
11
11
  import { A as AggregateExpr, F as FieldRef, C as ComparisonOp, a as AggregateComparisonPredicate } from './ast-COMyNeMn.js';
12
12
  export { J as JsonPointer, b as JsonPointerFor, c as JsonPointerInput, d as JsonPointerSegment, e as JsonPointerSegments, f as JsonPointerSegmentsFor, M as MAX_JSON_POINTER_DEPTH, O as OrderSpec, P as ParameterRef, R as ResolveJsonPointer, g as ResolveJsonPointerSegments, S as SortDirection, T as TraversalExpansion, j as joinJsonPointers, h as jsonPointer, n as normalizeJsonPointer, p as parseJsonPointer } from './ast-COMyNeMn.js';
@@ -437,10 +437,13 @@ declare const core: {
437
437
  /**
438
438
  * Maximum depth for recursive CTE queries when maxDepth is unlimited (-1).
439
439
  *
440
- * This default limit prevents runaway recursion for unbounded traversals while
441
- * still supporting typical neighborhood/path use-cases.
440
+ * Graphs with branching factor B produce O(B^depth) rows before cycle
441
+ * detection can prune them. A default of 10 covers typical neighborhood,
442
+ * shortest-path, and hierarchy use-cases without risking exponential blowup
443
+ * on dense graphs. Users who need deeper traversals should call .maxHops(N)
444
+ * explicitly (up to MAX_EXPLICIT_RECURSIVE_DEPTH).
442
445
  */
443
- declare const MAX_RECURSIVE_DEPTH = 100;
446
+ declare const MAX_RECURSIVE_DEPTH = 10;
444
447
  /**
445
448
  * Maximum depth for explicit maxDepth traversals.
446
449
  *