export { DefineEdgeOptions, DefineNodeOptions, EndpointPair, ExternalRefSchema, ExternalRefValue, MetaEdgeOptions, createExternalRef, defineEdge, defineNode, externalRef, getExternalRefTable, isEdgeTargetMap, isExternalRefSchema, metaEdge } from './core/index.cjs'; import { E as EmbeddingMetric, a as EmbeddingIndexType } from './searchable-C7Xt6g45.cjs'; export { D as DEFAULT_SEARCHABLE_LANGUAGE, b as EmbeddingSchema, c as EmbeddingValue, S as SearchableMetadata, d as SearchableOptions, e as SearchableSchema, f as embedding, g as getEmbeddingDimensions, h as getSearchableMetadata, i as isEmbeddingSchema, j as isSearchableSchema, r as resolveGraphVectorSlots, s as searchable } from './searchable-C7Xt6g45.cjs'; import { e as GraphDef, e$ as TraversalDirection, f0 as AggregateExpr, f1 as FieldRef, f2 as ComparisonOp, f3 as AggregateComparisonPredicate, G as GraphIdentityConfig, V as VectorStrategy, g as GraphBackend, a5 as NodeType, f4 as OntologyRelation, cX as InferenceType, a4 as AnyEdgeType } from './types-BynPp5kU.cjs'; export { A as AdapterBackend, aR as AdapterBackendTransactions, h as AdoptedSchemaWriteTransaction, f5 as AllEdgeTypes, f6 as AllNodeTypes, a2 as BackendCapabilities, f7 as BackendDisposedError, aU as BackendExecutionCapabilities, aV as BackendIdentity, aW as BackendLifecycle, aX as BackendMaintenance, aY as BackendTransactions, f8 as BaseSchemaMigrationError, f9 as BaseSchemaMigrationErrorDetails, fa as CURRENT_GRAPH_EXTENSION_VERSION, aZ as Cardinality, fb as CardinalityError, fc as CardinalityErrorDetails, b4 as Collation, fd as CollectOptions, fe as CollectOrder, ff as CollectRecordFields, fg as CollectRecordOperand, fh as CollectedRecord, b5 as CommitSchemaVersionExpected, b6 as CommitSchemaVersionIfKindsEmptyResult, b7 as CommitSchemaVersionParams, b8 as CompareAndSetNodeParams, b9 as CompiledRowsSql, ba as CompiledSelectSql, bb as CompiledStatementSql, fi as CompilerInvariantError, fj as ConfigurationError, bg as ContributionCapabilities, C as ContributionDiagnostic, a as ContributionDiagnosticState, bh as ContributionMaterializationBackend, bk as ContributionProbeContribution, bl as ContributionProbeEntry, bm as ContributionProbeResult, bn as ContributionProbeState, fk as ContributionRebuildRefusal, bo as ContributionRebuildResult, bp as ContributionRebuildScope, fl as ContributionRebuildUnsupportedError, b as ContributionRepairEntry, c as ContributionRepairResult, bq as ContributionRepopulationStats, br as ContributionScope, fm as ContributionUnavailableError, fn as ContributionUnavailableErrorDetails, fo as DEFAULT_SQL_SCHEMA, by as DEPLOYMENT_CONTRIBUTION_GRAPH_ID, fp as DatabaseExpression, fq as DatabaseOperationError, fr as DatabaseOperationErrorDetails, bB as DeleteBehavior, bF as DeleteFulltextBatchParams, fs as DisjointError, ft as DisjointErrorDetails, bR as DurableEdgeBatchMembers, fu as EDGE_IDENTITY_MISMATCH_CODE, fv as ENTITY_ALREADY_EXISTS_CODE, fw as EagerMaterializationError, fx as EagerMaterializationErrorDetails, aH as EdgeConvergeCreateCommand, aI as EdgeConvergeCreateCommandResult, E as EdgeConvergenceMatch, aF as EdgeCreateCommand, aG as EdgeCreateCommandResult, bU as EdgeEntityReadBackend, bV as EdgeEntityWriteBackend, fy as EdgeId, v as EdgeIndexConfig, r as EdgeIndexDeclaration, w as EdgeIndexDirection, x as EdgeIndexWhereBuilder, fz as EdgeKinds, fA as EdgeMatchIdentity, fB as EdgeMatchIdentityConflictError, fC as EdgeNotFoundError, fD as EdgeNotFoundErrorDetails, fE as EdgeProps, fF as EdgeRegistration, fG as EdgeTargetMap, fH as EdgeTargets, fI as EdgeType, fJ as EdgeTypeWithEndpoints, fK as EmbeddingDimensionChangedError, fL as EmbeddingDimensionChangedErrorDetails, fM as EndpointError, fN as EndpointErrorDetails, bX as EndpointExistence, fO as EndpointNotFoundError, fP as EndpointNotFoundErrorDetails, fQ as EndpointPairError, fR as EndpointPairErrorDetails, fS as ErrorCategory, fT as ExportStreamCancelledError, fU as ExportStreamIdleTimeoutError, fV as ExternalRecordedReadSource, cm as FilteredApproximateSearch, cn as FilteredApproximateSearchMode, co as FindEdgesByHeterogeneousEndpointSetParams, cs as FulltextBatchRow, ct as FulltextCapabilities, cu as FulltextOperationBackend, cv as FulltextQueryMode, cw as FulltextSearchParams, cx as FulltextSearchResult, d as FulltextStrategy, fW as GetEdgeType, fX as GetNodeType, fY as GraphAlgorithmConvergenceError, cy as GraphAnalyticsCapabilities, fZ as GraphAnnotations, al as GraphAnnotationsChange, aJ as GraphCommand, aB as GraphCommandCoordination, aC as GraphCommandExecutionContext, aM as GraphCommandIsolation, aA as GraphCommandPort, aK as GraphCommandResult, aL as GraphCommandSession, f_ as GraphDefaults, cz as GraphEntityReadBackend, cA as GraphEntityWriteBackend, cB as GraphExtension, cC as GraphExtensionVersion, cD as GraphLifecycleBackend, cH as HardDeleteUniquesByConcreteKindParams, cI as HardDeleteUniquesByNodeIdsParams, f$ as HybridFusionOptions, g0 as IMMUTABLE_VALIDITY_LOWER_BOUND_CODE, g1 as INVERTED_VALIDITY_WINDOW_CODE, am as IdentityChange, g2 as IdentityContradictionError, g3 as IdentityContradictionErrorDetails, g4 as IdentityEndpointValidityError, g5 as IdentityEndpointValidityErrorDetails, g6 as IdentitySeparationViolationError, g7 as IdentitySeparationViolationErrorDetails, g8 as IdentityValidityWindowError, g9 as IdentityValidityWindowErrorDetails, I as IndexDeclaration, cR as IndexMaterializationBackend, y as IndexOrigin, z as IndexScope, D as IndexWhereExpression, H as IndexWhereFieldBuilder, L as IndexWhereInput, c_ as IntentSql, ga as InvalidEdgeWeightError, gb as InvalidEdgeWeightErrorDetails, gc as InvalidEdgeWeightReason, J as JsonPointer, gd as JsonPointerFor, ge as JsonPointerInput, gf as JsonPointerSegment, gg as JsonPointerSegments, gh as JsonPointerSegmentsFor, c$ as JsonScalar, d0 as JsonValue, d1 as KindAnnotations, gi as KindNotFoundError, gj as KindNotFoundErrorDetails, gk as LEGACY_GRAPH_EXTENSION_VERSION, d8 as LockSchemaVersionForWriteParams, gl as MAX_JSON_POINTER_DEPTH, gm as MIGRATION_FAILURE_REASONS, da as ManagedEdgeCreatePlan, db as ManagedNodeCreateMode, dc as ManagedNodeCreatePlan, gn as MaterializeIndexesEntry, go as MaterializeIndexesOptions, gp as MaterializeIndexesResult, gq as MaterializeSystemIndexesOptions, gr as MetaEdge, gs as MetaEdgeProperties, gt as MigrationError, gu as MigrationErrorDetails, gv as MigrationFailureReason, M as NODE_SYSTEM_COLUMN_NAMES, gw as NodeConstraintNotFoundError, gx as NodeConstraintNotFoundErrorDetails, aD as NodeCreateCommand, aE as NodeCreateCommandResult, de as NodeEntityReadBackend, df as NodeEntityWriteBackend, gy as NodeId, O as NodeIndexConfig, u as NodeIndexDeclaration, P as NodeIndexKey, U as NodeIndexKeyInput, gz as NodeIndexNotFoundError, gA as NodeIndexNotFoundErrorDetails, X as NodeIndexWhereBuilder, N as NodeInsertClaim, dg as NodeInsertClaimVerdict, k as NodeInsertProjection, gB as NodeKinds, gC as NodeNotFoundError, gD as NodeNotFoundErrorDetails, dh as NodePropertyExpectation, gE as NodeProps, gF as NodeRegistration, Y as NodeSystemColumnName, gG as OrderSpec, gH as ParameterRef, dl as Placeholder, dm as PopulatedSchemaKind, dp as QueryExecutionBackend, gI as RECORDED_CAPTURE_GUARD_CODES, dq as RawQueryExecutionBackend, dr as RawStatementExecutionBackend, gJ as RecordedCaptureGuardCode, gK as RecordedCaptureGuardError, R as RecordedInstant, gL as RecordedReadSource, gM as RecordedRelationOptions, dx as RecordedSourceTable, dB as RecursiveTraversalCapability, dC as RecursiveTraversalVerdict, dF as RemovalMaterializationBackend, dG as RenderedSql, gN as ResolveJsonPointer, gO as ResolveJsonPointerSegments, dH as ResolvedNodeUpdateBatchEntry, dI as ResolvedNodeUpdateBatchParams, dJ as ResolvedSqlTableNames, gP as RestrictedDeleteError, gQ as RestrictedDeleteErrorDetails, dK as RowProps, gR as RuntimeKindTokenError, gS as RuntimeKindTokenFailure, gT as SchemaChangedError, gU as SchemaChangedErrorDetails, dN as SchemaCommitBackend, gV as SchemaContentConflictError, gW as SchemaContentConflictErrorDetails, gX as SchemaFencePhase, gY as SchemaFenceTimeoutError, gZ as SchemaFenceTimeoutErrorDetails, ac as SchemaHash, at as SchemaIdentity, dP as SchemaKindEmptinessProbe, g_ as SchemaMismatchError, g$ as SchemaMismatchErrorDetails, S as SchemaProvisioning, dQ as SchemaReadBackend, f as SchemaVersionRow, dR as SchemaWriteFenceBackend, ab as SerializedSchema, dS as SetActiveVersionParams, h0 as SortDirection, dT as SqlChunk, s as SqlDialect, dV as SqlFragment, dW as SqlIdentifierChunk, dX as SqlIntent, dY as SqlParameterChunk, dZ as SqlPlaceholderChunk, h1 as SqlSchema, q as SqlTableNames, d_ as SqlTag, d$ as SqlTextChunk, h2 as StaleVersionError, h3 as StaleVersionErrorDetails, h4 as StoreNotInitializedError, h5 as StoreNotInitializedErrorDetails, h6 as StoreNotInitializedReason, e0 as StrategyTableContribution, e1 as TableContribution, e3 as TemporalMode, T as TransactionBackend, h7 as TransactionClosedError, h8 as TransactionConflictError, h9 as TransactionConflictErrorDetails, e5 as TransactionOptions, e6 as TransactionReadBackend, ha as TraversalExpansion, hb as TrustedImportError, hc as TrustedImportErrorReason, e7 as TrustedImportOptions, e8 as TrustedImportSession, aN as TypeGraphError, hd as TypeGraphErrorOptions, he as UniqueConstraint, e9 as UniqueConstraintBackend, hf as UniquenessError, hg as UniquenessErrorDetails, eb as UniquenessScope, hh as UnsupportedBackendCapabilityError, hi as UnsupportedPredicateError, ee as UpdateNodeSetParams, ef as UpdateNodeSetResult, ej as UpsertFulltextBatchParams, af as ValidationError, hj as ValidationErrorDetails, ae as ValidationIssue, en as VectorCapabilities, eq as VectorOperationBackend, er as VectorSearchFrontierTuning, a3 as VectorSlot, hk as VersionConflictError, hl as VersionConflictErrorDetails, hm as asEdgeId, hn as asNodeId, ho as asRecordedInstant, eB as buildVectorCapabilities, hp as compareRecordedInstants, hq as createSqlSchema, hr as defineGraph, hs as expr, eC as fts5Strategy, ht as getEdgeKinds, hu as getErrorSuggestion, hv as getNodeKinds, hw as isConstraintError, hx as isEdgeType, hy as isEdgeTypeWithEndpoints, hz as isGraphDef, hA as isMetaEdge, hB as isNodeType, hC as isRecordedCaptureGuardError, eE as isSqlFragment, hD as isSystemError, hE as isTypeGraphError, hF as isUserRecoverable, hG as joinJsonPointers, hH as jsonPointer, hI as normalizeJsonPointer, hJ as parseJsonPointer, hK as recordedInstantRevision, hL as recordedInstantWallTime, hM as recordedRelation, eK as renderPostgres, eL as renderSql, eM as renderSqlInline, eN as renderSqlite, eR as rowPropsToJsonText, eS as rowPropsToObject, eU as sql, eV as supportsInteractiveTransactions, eW as supportsRootAtomicBatch, eX as tsvectorStrategy } from './types-BynPp5kU.cjs'; import { O as AliasMap, P as EmptyAliasMap, Q as EdgeAliasMap, T as EmptyEdgeAliasMap, V as RecursiveAliasMap, W as QueryCoordinateState, X as QueryBuilder, Y as EmptyRecursiveAliasMap, Z as TraversalBuilder, b as Store } from './store-3nfPQK5j.cjs'; export { _ as AdapterHistoryStore, $ as AdapterHistoryTransactionContext, a0 as AdapterRecordedReadStore, a1 as AdapterStore, a2 as AdapterTransactionContext, a3 as AggregateResult, a4 as AlgorithmCyclePolicy, a5 as AnyEdge, a6 as AnyNode, a7 as BaseStoreOptions, a8 as BaseTraversalOptions, a9 as BatchOnceOptions, B as BatchReadBuilder, aa as BatchResults, ab as BatchableQuery, ac as BulkEdgeSourceGroup, ad as BulkFindEdgesFromParams, ae as BulkFindEdgesFromResult, af as BulkFindEdgesToParams, ag as BulkFindEdgesToResult, ah as BulkFindRuntimeEdgesFromParams, ai as BulkFindRuntimeEdgesFromResult, aj as BulkOperationHookContext, ak as CheckedReadScope, al as ClaimOwner, am as ClaimTarget, an as CommonPropertyKeys, ao as CompareAndSetAbsent, ap as CompareAndSetExpected, C as CompiledOneStatementRead, aq as ConstraintFenceViolation, ar as ConstraintNames, as as CreateEdgeInput, at as CreateNodeInput, au as DatabaseProjection, av as DegreeOptions, aw as DynamicEdgeAccessor, ax as DynamicEdgeCollection, ay as DynamicEdgeType, az as DynamicFieldBuilder, aA as DynamicNode, aB as DynamicNodeAccessor, aC as DynamicNodeCollection, aD as DynamicNodeKind, aE as DynamicNodeReference, aF as DynamicNodeType, aG as DynamicSelectableEdge, aH as DynamicSelectableNode, aI as DynamicStoreViewEdgeCollection, aJ as Edge, aK as EdgeAccessor, aL as EdgeBatchReads, aM as EdgeBulkFindEndpointOptions, aN as EdgeBulkFindOptions, aO as EdgeCollection, aP as EdgeCollectionLookup, aQ as EdgeFindByEndpointsOptions, aR as EdgeGetOrCreateByEndpointsOptions, aS as EdgeGetOrCreateByEndpointsResult, aT as EdgeIntrospection, aU as EdgeReadWindow, aV as EdgeTemporalReads, aW as EdgeWrites, aX as EmbeddableOneStatementRead, E as EvolutionPlan, o as EvolutionRequirement, p as EvolutionRequirements, aY as EvolvedTransactionOptions, aZ as EvolvedTransactionOutcome, a_ as ExecutableAggregateQuery, a$ as ExecutableOneStatementRead, b0 as ExecutableProjectionQuery, b1 as ExecutableQuery, b2 as ExecutableRelationQuery, b3 as ExpressionAliasContext, b4 as ExpressionValue, b5 as FieldAccessor, b6 as FulltextSearchHit, b7 as FulltextSearchOptions, b8 as GetOrCreateAction, b9 as GraphAlgorithms, ba as GraphEdgeCollections, bb as GraphEdgeForKinds, bc as GraphNodeCollections, bd as GraphNodeReference, be as HeterogeneousNodeUpsertInput, bf as HeterogeneousNodeUpsertResult, c as HistoryStore, bg as HistoryStoreBackend, H as HistoryStoreOptions, bh as HistoryTransactionContext, bi as HookContext, bj as HybridFulltextOptions, bk as HybridSearchHit, bl as HybridSearchOptions, bm as HybridVectorOptions, I as IdentityAssertion, e as IdentityAssertionId, f as IdentityAssertionResult, bn as IdentityAssertionWriteFacade, g as IdentityFacade, h as IdentityNode, i as IdentityNodeRefInput, bo as IdentityNodeReference, j as IdentityPair, k as IdentityReadFacade, l as IdentityRelation, bp as IdentityTraversalOption, bq as IdentityValidityWindow, m as IdentityWriteSummary, br as IfExistsMode, bs as InitialQueryBuilder, bt as KindIntrospection, bu as KindPopulationStatistics, bv as LabelPropagationMembership, bw as LabelPropagationOptions, L as LiveStoreOptions, bx as MaterializeRemovalsEntry, by as MaterializeRemovalsOptions, bz as MaterializeRemovalsResult, bA as MeasurableAdapterHistoryTransactionContext, bB as MeasurableAdapterTransactionContext, bC as MeasurableHistoryTransactionContext, bD as MeasurableTransactionContext, bE as NeighborNodeOrderField, bF as NeighborOrder, bG as NeighborOrderField, bH as NeighborReadOptions, bI as NeighborResult, bJ as NeighborsOptions, bK as NoRecordedCoordinate, bL as Node, bM as NodeAccessor, bN as NodeAlias, bO as NodeBulkFindByIndexOptions, bP as NodeCandidateQuery, bQ as NodeCandidateSelection, bR as NodeCollection, bS as NodeCollectionLookup, bT as NodeCurrentReads, bU as NodeGetOrCreateByConstraintOptions, bV as NodeGetOrCreateByConstraintResult, bW as NodeIdentifier, bX as NodePropsFor, bY as NodeRef, bZ as NodeTemporalReads, b_ as NodeWrites, b$ as OneStatementBatchResults, c0 as OneStatementBatchableQuery, c1 as OntologyIntrospection, c2 as OperationHookContext, c3 as PageRankOptions, c4 as PageRankScore, c5 as PaginateOptions, c6 as PaginatedResult, c7 as PathNode, c8 as PersonalizedPageRankOptions, c9 as PersonalizedPageRankSeed, ca as PlanEvolutionOptions, cb as Predicate, cc as PreparedBindings, cd as PreparedParameterDeclaration, ce as PreparedQuery, cf as ProjectionResult, cg as PropertyPopulationStatistics, ch as PropsAccessor, ci as QualifiedRecursivePath, cj as QualifiedRecursivePathEdge, ck as QualifiedRecursivePathElement, cl as QualifiedRecursivePathNode, cm as QualifiedRecursivePathOption, cn as QueryExpressionContext, co as QueryHookContext, cp as QueryOptions, cq as ReachableNode, cr as ReachableOptions, cs as RebuildContributionOptions, ct as RebuildFulltextOptions, cu as RebuildFulltextResult, cv as ReclaimedVectorFieldEntry, n as ReconciledSchema, cw as RecordedHeterogeneousNodeWriteBatch, d as RecordedReadStore, R as RecordedReadStoreOptions, cx as RecordedRevisionRequest, cy as RecordedScanOptions, cz as RecordedScanPage, cA as RecordedStoreView, cB as RecordedStoreViewEdgeCollection, cC as RecordedStoreViewEdgeCollections, cD as RecordedStoreViewNodeCollection, cE as RecordedStoreViewNodeCollections, cF as RecursiveTraversalOptions, cG as ReembedFunction, cH as ReembedVectorFieldOptions, cI as ReembedVectorFieldResult, cJ as RefreshSchemaOptions, cK as RelationColumnContext, cL as RelationProjection, cM as RelationProjectionResult, cN as RequiredEdgeCollectionLookup, cO as RequiredNodeCollectionLookup, cP as RuntimeBulkEdgeSourceGroup, cQ as RuntimeEdgeCollection, cR as RuntimeEdgeFor, cS as RuntimeEdgeKind, cT as RuntimeEdgeTypeFor, cU as RuntimeNodeCollection, cV as RuntimeNodeKind, cW as RuntimeNodeReferenceFor, cX as RuntimeNodeTypeFor, cY as SchemaIntrospection, a as SchemaManagerOptions, r as SchemaValidationResult, cZ as ScopedMeasure, c_ as SearchScopeOptions, c$ as SelectContext, d0 as SelectableEdge, d1 as SelectableNode, d2 as ShortestPathOptions, d3 as ShortestPathResult, d4 as SqlAvailability, d5 as StoreAnalysisCursorStaleError, d6 as StoreAnalysisCursorStaleErrorDetails, d7 as StoreAnalysisSchemaCoordinate, d8 as StoreDescription, d9 as StoreEvolution, da as StoreHooks, S as StoreOptions, db as StorePopulationStatistics, dc as StoreProjection, dd as StoreRef, de as StoreSearch, df as StoreTransactionOptions, dg as StoreValidationFailure, dh as StoreValidationPage, di as StoreView, dj as StoreViewCanReachOptions, dk as StoreViewCoordinate, dl as StoreViewDegreeOptions, dm as StoreViewEdgeCollection, dn as StoreViewEdgeCollections, dp as StoreViewGraphAlgorithms, dq as StoreViewLabelPropagationOptions, dr as StoreViewNeighborsOptions, ds as StoreViewNodeCollection, dt as StoreViewNodeCollections, du as StoreViewPageRankOptions, dv as StoreViewPersonalizedPageRankOptions, dw as StoreViewReachableOptions, dx as StoreViewShortestPathOptions, dy as StoreViewSubgraphOptions, dz as StoreViewWeaklyConnectedComponentsOptions, dA as StoreViewWeightedShortestPathOptions, dB as StreamOptions, dC as SubgraphEdgeResult, dD as SubgraphNodeResult, dE as SubgraphOptions, dF as SubgraphResult, dG as SubsetEdge, dH as SubsetNode, dI as TemporalAlgorithmOptions, dJ as TopPerPartitionOptions, dK as TopPerPartitionOrder, dL as TransactionContext, dM as TransactionOutcome, dN as TransactionReceipt, dO as TraversalDirection, dP as TypedEdgeCollection, dQ as TypedRecordedStoreViewEdgeCollection, dR as TypedStoreViewEdgeCollection, U as UnboundLiveStoreOptions, dS as UnionableQuery, dT as UniqueIntrospection, dU as UpdateEdgeInput, dV as UpdateNodeInput, dW as ValidateStoreOptions, dX as ValidityEndMutation, dY as VectorSearchHit, dZ as VectorSearchOptions, d_ as WeaklyConnectedComponentMembership, d$ as WeaklyConnectedComponentsOptions, e0 as WeightedShortestPathOptions, e1 as WeightedShortestPathResult, e2 as WorkingCopyOptions, e3 as asIdentityAssertionId, e4 as compareAndSetAbsent, e5 as createAdapterStore, e6 as createAdapterStoreWithSchema, e7 as createQueryBuilder, e8 as createStore, e9 as createStoreWithSchema, ea as createVerifiedAdapterStore, eb as createVerifiedStore, ec as defineSubgraphProject, ed as exists, ee as fieldRef, v as getActiveSchema, w as getCommittedSchemaVersion, ef as inSubquery, eg as isParameterRef, z as isSchemaInitialized, eh as notExists, ei as notInSubquery, ej as param } from './store-3nfPQK5j.cjs'; export { D as DeleteLegacyRecordedAnchorMapOptions, M as MigrateLegacyRecordedTimeOptions, a as MigrateLegacyRecordedTimeResult, b as MigrateRecordedAnchorOptions, R as RepairInvertedWindowsOptions, c as RepairInvertedWindowsReport, d as RepairRelation, e as RepairRelationScope, f as deleteLegacyRecordedAnchorMap, m as migrateLegacyRecordedTime, g as migrateRecordedAnchor, r as repairInvertedValidityWindows } from './repair-validity-windows-CpP_GpIx.cjs'; export { G as GraphTemplate, I as InstantiateGraphTemplateResult, i as instantiateGraph, a as instantiateGraphTemplate, r as registerGraphTemplate } from './graph-templates-B5Q7oYAA.cjs'; export { S as SYSTEM_INDEX_DECLARATIONS, a as SystemIndexDeclaration, b as SystemIndexTable, c as andWhere, d as defineEdgeIndex, e as defineNodeIndex, n as notWhere, o as orWhere } from './where-D1gBDqQ_.cjs'; export { GraphExtensionError, GraphExtensionIssue, GraphExtensionIssueCode, GraphExtensionUnresolvedEndpointError, GraphExtensionUnresolvedOntologyEndpointError, GraphExtensionValidationError, GraphExtensionVersionUnsupportedError, IncompatibleChange, IncompatibleChangeError, KindCollisionError, KindHasReferentsError, KindReferent, RemoveCompileTimeKindError, defineGraphExtension, validateGraphExtension } from './graph-extension/index.cjs'; import 'zod'; import './resolve-CoYqHqno.cjs'; import './result-DWo6mUVz.cjs'; /** * Maximum depth for recursive CTE queries when maxDepth is unlimited (-1). * * Graphs with branching factor B produce O(B^depth) rows before cycle * detection can prune them. A default of 10 covers typical neighborhood, * shortest-path, and hierarchy use-cases without risking exponential blowup * on dense graphs. Users who need deeper traversals should pass * `.recursive({ maxHops: N })` explicitly (up to MAX_EXPLICIT_RECURSIVE_DEPTH). */ declare const MAX_RECURSIVE_DEPTH = 10; /** * Maximum depth for explicit maxDepth traversals. * * Explicit traversal bounds are opt-in and safe to allow at a higher ceiling * for stress testing and long-path workloads. */ declare const MAX_EXPLICIT_RECURSIVE_DEPTH = 1000; /** * Query Fragment Composition * * Provides types and utilities for creating reusable query fragments * that can be composed together using the pipe() method. * * @example * ```typescript * // Define a reusable fragment * const activeUsers = createFragment()((q) => * q.whereNode("u", ({ status }) => status.eq("active")) * ); * * // Use in queries * const results = await query() * .from("User", "u") * .pipe(activeUsers) * .select((ctx) => ctx.u) * .execute(); * ``` */ type MergeAliasMaps = keyof Added extends never ? Existing : Existing & Added; type MergeEdgeAliasMaps = keyof Added extends never ? Existing : Existing & Added; /** * A query fragment that transforms a QueryBuilder. * * Fragments are functions that take a builder and return a modified builder. * They can add predicates, traversals, ordering, and other query operations. * * @typeParam G - The graph definition * @typeParam InAliases - Input alias map (what the fragment requires) * @typeParam OutAliases - Output alias map (what the fragment produces) * @typeParam InEdgeAliases - Input edge alias map * @typeParam OutEdgeAliases - Output edge alias map * @typeParam InRecursiveAliases - Input recursive alias map * @typeParam OutRecursiveAliases - Output recursive alias map */ type QueryFragment = (builder: QueryBuilder) => QueryBuilder; /** * A flexible query fragment that works with any compatible builder. * * Use this when you want a fragment that only requires certain aliases * to exist, but doesn't care about other aliases that may be present. */ type FlexibleQueryFragment = (builder: QueryBuilder) => QueryBuilder, MergeEdgeAliasMaps, RecursiveAliases, CoordinateState>; /** * A traversal fragment that transforms a TraversalBuilder. * * Use this for reusable traversal patterns including edge filtering, * recursive traversals, and path collection. */ type TraversalFragment = (builder: TraversalBuilder) => unknown; declare function createFragment(): (fn: QueryFragment) => QueryFragment; /** * Combines multiple fragments into a single fragment. * * Fragments are applied in order from left to right. * * @example * ```typescript * const combinedFragment = composeFragments( * activeOnly, * withManager, * recentlyUpdated * ); * * query() * .from("User", "u") * .pipe(combinedFragment) * .select(...) * ``` */ declare function composeFragments(f1: QueryFragment): QueryFragment; declare function composeFragments(f1: QueryFragment, f2: QueryFragment): QueryFragment; declare function composeFragments(f1: QueryFragment, f2: QueryFragment, f3: QueryFragment): QueryFragment; declare function composeFragments(f1: QueryFragment, f2: QueryFragment, f3: QueryFragment, f4: QueryFragment): QueryFragment; /** * Creates a fragment that adds ordering. * * @example * ```typescript * const byCreatedAt = orderByFragment("u", "createdAt", "desc"); * ``` */ declare function orderByFragment(alias: A, field: string, direction?: "asc" | "desc"): FlexibleQueryFragment; /** * Creates a fragment that adds a limit. * * @example * ```typescript * const first10 = limitFragment(10); * ``` */ declare function limitFragment(n: number): FlexibleQueryFragment; /** * Creates a fragment that adds an offset. * * @example * ```typescript * const skip10 = offsetFragment(10); * ``` */ declare function offsetFragment(n: number): FlexibleQueryFragment; /** * Aggregate and HAVING Helper Functions * * Provides factory functions for creating aggregate expressions (COUNT, SUM, etc.) * and HAVING clause predicates for use in GROUP BY queries. */ /** * Creates a COUNT aggregate expression. * * @param alias - The node alias to count * @param field - Optional field to count (defaults to counting nodes by ID) * * @example * ```typescript * // COUNT all persons * count("p") * * // COUNT persons with email field * count("p", "email") * ``` */ declare function count(alias: Alias, field?: Property): AggregateExpr<"count", FieldRef>; /** * Creates a COUNT DISTINCT aggregate expression. * * @param alias - The node alias to count * @param field - Optional field to count distinct values of */ declare function countDistinct(alias: Alias, field?: Property): AggregateExpr<"countDistinct", FieldRef>; /** * Creates a COUNT aggregate expression over an edge alias. * * Counts edges directly, without joining back to the target node table. * This has different semantics from `count(targetAlias)`: * * - `countEdges(edgeAlias)` — counts live edges, regardless of target-node * temporal state. If a target node's `validTo` is in the past while its * incident edges are still live, those edges are still counted. * - `count(targetAlias)` — counts edges whose target node is currently * valid under the query's temporal mode. * * For the common case ("how many follow relationships does this user * have?") the edge-count semantics is what you want, and the compiler * can skip the target-node join entirely — measurably faster on * full-graph aggregates where the join dominates cost. * * @example * ```typescript * store * .query() * .from("User", "u") * .optionalTraverse("follows", "e", { expand: "none" }) * .to("User", "target") * .groupByNode("u") * .aggregate({ * name: field("u", "name"), * // counts edges — skips the target-node join * followCount: countEdges("e"), * }) * .execute(); * ``` */ declare function countEdges(edgeAlias: Alias): AggregateExpr<"count", FieldRef>; /** * Creates a COUNT DISTINCT aggregate expression over an edge alias. * See {@link countEdges} for semantics. * * Distinct-on-edge-id is equivalent to `countEdges` when the query * surface produces each edge exactly once, but stays meaningful under * polymorphic expansions and ontology-driven edge fan-outs where the * same edge can appear multiple times in the join output. */ declare function countDistinctEdges(edgeAlias: Alias): AggregateExpr<"countDistinct", FieldRef>; /** * Creates a SUM aggregate expression. * * @param alias - The node alias * @param field - The numeric field to sum */ declare function sum(alias: Alias, field: Property): AggregateExpr<"sum", FieldRef>; /** * Creates an AVG aggregate expression. * * @param alias - The node alias * @param field - The numeric field to average */ declare function avg(alias: Alias, field: Property): AggregateExpr<"avg", FieldRef>; /** * Creates a MIN aggregate expression. * * @param alias - The node alias * @param field - The field to find minimum of */ declare function min(alias: Alias, field: Property): AggregateExpr<"min", FieldRef>; /** * Creates a MAX aggregate expression. * * @param alias - The node alias * @param field - The field to find maximum of */ declare function max(alias: Alias, field: Property): AggregateExpr<"max", FieldRef>; /** * Creates a field reference for use in aggregate. * * @param alias - The node alias * @param path - Path to the field. Use "id" for node ID, "kind" for node kind, * or the property name directly (e.g., "title", "year"). * * @example * ```typescript * field("p", "id") // Node ID * field("p", "kind") // Node kind * field("p", "title") // Property field * field("p", "nested", "field") // Nested property * ``` */ declare function field(alias: Alias, ...path: PropertyPath): FieldRef; /** * Creates a HAVING predicate that compares an aggregate to a value. * * @param aggregate - The aggregate expression (count, sum, avg, etc.) * @param op - The comparison operator * @param value - The value to compare against * * @example * ```typescript * // HAVING COUNT(*) > 10 * having(count("p"), "gt", 10) * * // HAVING AVG(salary) >= 50000 * having(avg("p", "salary"), "gte", 50000) * ``` */ declare function having(aggregate: AggregateExpr, op: ComparisonOp, value: number | string | boolean): AggregateComparisonPredicate; /** * Creates a HAVING predicate: aggregate > value */ declare function havingGt(aggregate: AggregateExpr, value: number): AggregateComparisonPredicate; /** * Creates a HAVING predicate: aggregate >= value */ declare function havingGte(aggregate: AggregateExpr, value: number): AggregateComparisonPredicate; /** * Creates a HAVING predicate: aggregate < value */ declare function havingLt(aggregate: AggregateExpr, value: number): AggregateComparisonPredicate; /** * Creates a HAVING predicate: aggregate <= value */ declare function havingLte(aggregate: AggregateExpr, value: number): AggregateComparisonPredicate; /** * Creates a HAVING predicate: aggregate = value */ declare function havingEq(aggregate: AggregateExpr, value: number): AggregateComparisonPredicate; /** * Rebuilds the derived current identity closure for an identity-enabled store. * This is a repair operation: it does not change graph revision or assertions. */ declare function rebuildIdentityClosure>(store: Store): Promise; declare const libsqlVectorStrategy: VectorStrategy; declare const pgvectorStrategy: VectorStrategy; declare const sqliteVecStrategy: VectorStrategy; /** * One-time offline migration: legacy shared embeddings table → per-field * strategy storage. * * ## What this is for * * The cross-backend vector cutover (#157) dropped the single shared * `typegraph_node_embeddings` table. Each * `VectorStrategy` now OWNS one typed, fixed-dimension structure per * `(nodeKind, fieldPath)` — the only layout that can be ANN-indexed on * libSQL and sqlite-vec, not just pgvector. * * Deployments that wrote embeddings under the old shared table before * upgrading still hold those rows. This utility drains them into the new * per-field storage **once**, during the upgrade, so existing embedded * data survives the cutover without re-embedding from source. * * It is an explicitly-run, offline step — not wired into `materializeIndexes` * or any boot path. Run it once after deploying the new version and before * (or alongside) the first `materializeIndexes()`, then drop the legacy * table at your leisure. * * ## How it works * * - Skips cleanly (returns a zero summary) when the legacy table is absent — * a fresh install, or a re-run after the table was dropped. * - Reads rows in keyset-paginated batches (never the whole table at once), * decoding the engine-native embedding column to a numeric array at the SQL * level: sqlite-vec stored a `vec_f32` blob (`vec_to_json` decodes it); * pgvector stored a native `vector` (`::text` yields a `[…]` literal). * - Re-inserts each row through `backend.upsertEmbedding`, which routes the * active strategy's `buildUpsert` and idempotently provisions the per-field * storage (the same `(nodeKind, fieldPath)` slot a fresh store write uses). * The migration stays graph-agnostic and execution-correct on both the * sync (better-sqlite3) and async (libsql / Postgres) backends — it does * not re-implement the backend's statement-execution glue. * * Idempotent and resumable: a partial run followed by a full run converges * to the same per-field tables, because every write is an upsert keyed by * `(graph_id, node_id)` in the strategy's owned storage. */ /** * The resolved storage config for one `(nodeKind, fieldPath)` slot that the * legacy table did not record. The legacy shared table stored only the * vector and its dimension count — not the metric or index type — so a * caller that wants migrated fields to match a specific graph's `embedding()` * declarations supplies this resolver. */ type LegacyEmbeddingSlotConfig = Readonly<{ metric: EmbeddingMetric; indexType: EmbeddingIndexType; }>; /** * Options for {@link migrateLegacyEmbeddings}. */ type MigrateLegacyEmbeddingsOptions = Readonly<{ /** * The backend to migrate, wired with the destination `VectorStrategy` * (i.e. the post-cutover backend). Its `vectorStrategy` owns the per-field * storage rows are written into and its `upsertEmbedding` performs the * writes. */ backend: GraphBackend; /** * Restrict the migration to a single graph. When omitted, every graph's * rows in the legacy table are migrated (the table is graph-scoped by its * `graph_id` column). */ graphId?: string; /** * Resolves the metric / index type for a `(nodeKind, fieldPath)` slot the * legacy table didn't persist. Return `undefined` to fall back to the * cosine / hnsw defaults. Supply this (typically reading the graph's * `embedding()` declarations) when migrated fields must match a specific * metric — e.g. an `l2` field, which scores incorrectly under the cosine * default. */ resolveSlotConfig?: (nodeKind: string, fieldPath: string) => LegacyEmbeddingSlotConfig | undefined; /** Rows read per round-trip. Defaults to {@link DEFAULT_BATCH_SIZE}. */ batchSize?: number; /** * Physical name of the legacy table to drain. Defaults to * {@link LEGACY_EMBEDDINGS_TABLE_NAME}. Override only for a non-default * deployment that renamed the embeddings table. */ legacyTableName?: string; }>; /** * Summary of a {@link migrateLegacyEmbeddings} run. */ type MigrateLegacyEmbeddingsResult = Readonly<{ /** Total embedding rows re-inserted into per-field storage. */ migrated: number; /** * Per-`(nodeKind, fieldPath)` counts, keyed `"."` * (the strategy's logical-slot key form). Empty when the legacy table was * absent or held no rows for the requested scope. */ perField: Readonly>; /** * Rows skipped because their vector length didn't match the per-field * table's fixed dimension. The legacy shared column allowed mixed * dimensions for one `(nodeKind, fieldPath)` (e.g. an unmigrated model * change); the first migrated row fixes the typed table's dimension and * any differently-sized rows for that slot are skipped rather than aborting * the whole migration. Keyed `"."`. Non-empty here * means those fields need a deliberate re-embed at a single dimension. */ skippedDimensionMismatch: Readonly>; /** * Rows skipped because their legacy embedding could not be decoded into a * finite-number array — a corrupt value (e.g. a pgvector `vector` column * permits `NaN`/`Infinity`, which is not valid JSON). Keyed * `"."`. Skipping + reporting keeps one bad row from * aborting the whole migration; non-empty here means those rows need manual * repair. */ skippedDecodeError: Readonly>; /** * Whether the legacy table existed. `false` means the run was a clean * no-op (fresh install, or already-dropped table on a re-run). */ legacyTablePresent: boolean; }>; /** * Re-inserts every embedding from the legacy shared * `typegraph_node_embeddings` table into the active * `backend.vectorStrategy`'s per-`(nodeKind, fieldPath)` storage. * * One-time, explicitly-run upgrade step for the shared-table → per-field * cutover (#157). Idempotent, batched, and a clean no-op when the legacy * table is absent. See the module doc comment for the full contract. * * @throws Error when the backend exposes no `vectorStrategy` / * `upsertEmbedding` (nothing to migrate *into*) — a configuration * error the caller must fix by wiring the destination strategy * before migrating. */ declare function migrateLegacyEmbeddings(options: MigrateLegacyEmbeddingsOptions): Promise; /** * Creates a subClassOf ontology relation. */ declare function subClassOf(child: NodeType, parent: NodeType): OntologyRelation; /** * Creates a broader ontology relation. */ declare function broader(narrowerConcept: NodeType, broaderConcept: NodeType): OntologyRelation; /** * Creates a narrower ontology relation. */ declare function narrower(broaderConcept: NodeType, narrowerConcept: NodeType): OntologyRelation; /** * Creates a relatedTo ontology relation. */ declare function relatedTo(conceptA: NodeType, conceptB: NodeType): OntologyRelation; /** * Creates an equivalentTo ontology relation. * Can be used with external IRIs for cross-system mapping. */ declare function equivalentTo(kindA: NodeType, kindBOrIri: NodeType | string): OntologyRelation; /** * Creates the deprecated type-level `sameAs` alias of `equivalentTo`. * * @deprecated Enable `identity: { sameIdAcrossKinds: "fold" }` and use the * TypeGraph Identity Profile's runtime `store.identity` ledger. The ledger * does not perform OWL property substitution or automatic query expansion. */ declare function sameAs(kindA: NodeType, kindBOrIri: NodeType | string): OntologyRelation; /** * Creates the deprecated decorative type-level `differentFrom` relation. * * @deprecated Enable `identity: { sameIdAcrossKinds: "fold" }` and use the * TypeGraph Identity Profile's runtime `store.identity` ledger. The ledger * does not perform OWL property substitution or automatic query expansion. */ declare function differentFrom(kindA: NodeType, kindB: NodeType): OntologyRelation; /** * Creates a disjointWith ontology relation. */ declare function disjointWith(kindA: NodeType, kindB: NodeType): OntologyRelation; /** * Creates a partOf ontology relation. */ declare function partOf(part: NodeType, whole: NodeType): OntologyRelation; /** * Creates a hasPart ontology relation. */ declare function hasPart(whole: NodeType, part: NodeType): OntologyRelation; /** * Creates an inverseOf ontology relation. * Edge A inverseOf edge B means traversing A is equivalent to traversing B backwards. */ declare function inverseOf(edgeA: AnyEdgeType, edgeB: AnyEdgeType): OntologyRelation; /** * Creates an implies ontology relation. * Edge A implies edge B means if A exists between two nodes, B should also exist. */ declare function implies(edgeA: AnyEdgeType, edgeB: AnyEdgeType): OntologyRelation; /** * The core ontology module containing all built-in meta-edges * and their relation factory functions. */ declare const core: { readonly subClassOfMetaEdge: Readonly<{ name: "subClassOf"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly broaderMetaEdge: Readonly<{ name: "broader"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly narrowerMetaEdge: Readonly<{ name: "narrower"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly relatedToMetaEdge: Readonly<{ name: "relatedTo"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly equivalentToMetaEdge: Readonly<{ name: "equivalentTo"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly sameAsMetaEdge: Readonly<{ name: "sameAs"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly differentFromMetaEdge: Readonly<{ name: "differentFrom"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly disjointWithMetaEdge: Readonly<{ name: "disjointWith"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly partOfMetaEdge: Readonly<{ name: "partOf"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly hasPartMetaEdge: Readonly<{ name: "hasPart"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly inverseOfMetaEdge: Readonly<{ name: "inverseOf"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly impliesMetaEdge: Readonly<{ name: "implies"; properties: Readonly<{ transitive: boolean; symmetric: boolean; reflexive: boolean; inverse: string | undefined; inference: InferenceType; description: string | undefined; }>; __metaEdge: true; }>; readonly subClassOf: typeof subClassOf; readonly broader: typeof broader; readonly narrower: typeof narrower; readonly relatedTo: typeof relatedTo; readonly equivalentTo: typeof equivalentTo; readonly sameAs: typeof sameAs; readonly differentFrom: typeof differentFrom; readonly disjointWith: typeof disjointWith; readonly partOf: typeof partOf; readonly hasPart: typeof hasPart; readonly inverseOf: typeof inverseOf; readonly implies: typeof implies; }; /** * Transitive closure computation for ontology relationships. * * Uses Warshall's algorithm for efficient closure computation. */ /** * Computes the transitive closure of a set of directed relations. * * Given relations like [A→B, B→C], computes all transitive paths [A→B, A→C, B→C]. * * @param relations - Array of [from, to] pairs representing direct relationships * @returns Map from each 'from' to the set of all reachable 'to' values */ declare function computeTransitiveClosure(relations: readonly (readonly [string, string])[]): ReadonlyMap>; /** * Computes the inverse of a transitive closure map. * * Given A→{B, C}, returns B→{A}, C→{A}. */ declare function invertClosure(closure: ReadonlyMap>): ReadonlyMap>; /** * Checks if there's a path from source to target in the closure. */ declare function isReachable(closure: ReadonlyMap>, source: string, target: string): boolean; /** * ID generation utilities. * * Default implementation uses nanoid. * Benefits: * - URL-safe * - Compact (21 characters by default) * - Secure random generation */ /** * Generates a new unique ID. */ declare function generateId(): string; /** * ID generator function type. */ type IdGenerator = () => string; /** * Default ID generator configuration. */ type IdConfig = Readonly<{ /** Generator for node IDs */ nodeIdGenerator: IdGenerator; /** Generator for edge IDs */ edgeIdGenerator: IdGenerator; }>; export { AliasMap, AnyEdgeType, EmptyAliasMap, EmptyEdgeAliasMap, EmptyRecursiveAliasMap, FieldRef, type FlexibleQueryFragment, GraphBackend, GraphDef, GraphIdentityConfig, type IdConfig, type IdGenerator, InferenceType, type LegacyEmbeddingSlotConfig, MAX_EXPLICIT_RECURSIVE_DEPTH, MAX_RECURSIVE_DEPTH, type MigrateLegacyEmbeddingsOptions, type MigrateLegacyEmbeddingsResult, NodeType, OntologyRelation, QueryBuilder, QueryCoordinateState, type QueryFragment, Store, type TraversalFragment, VectorStrategy, avg, broader, composeFragments, computeTransitiveClosure, core, count, countDistinct, countDistinctEdges, countEdges, createFragment, differentFrom, disjointWith, equivalentTo, field, generateId, hasPart, having, havingEq, havingGt, havingGte, havingLt, havingLte, implies, inverseOf, invertClosure, isReachable, libsqlVectorStrategy, limitFragment, max, migrateLegacyEmbeddings, min, narrower, offsetFragment, orderByFragment, partOf, pgvectorStrategy, rebuildIdentityClosure, relatedTo, sameAs, sqliteVecStrategy, subClassOf, sum };