@nicia-ai/typegraph 0.36.0 → 0.37.1
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.
- package/dist/backend/postgres/index.cjs +24 -24
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +11 -11
- package/dist/backend/postgres/pglite.cjs +16 -16
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +11 -11
- package/dist/backend/sqlite/index.cjs +22 -21
- package/dist/backend/sqlite/index.d.cts +11 -9
- package/dist/backend/sqlite/index.d.ts +11 -9
- package/dist/backend/sqlite/index.js +10 -9
- package/dist/backend/sqlite/libsql.cjs +15 -14
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +11 -10
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +30 -23
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +18 -11
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-TCOCYN2P.cjs → chunk-27SSDCEP.cjs} +14 -14
- package/dist/{chunk-TCOCYN2P.cjs.map → chunk-27SSDCEP.cjs.map} +1 -1
- package/dist/{chunk-5AQIKK56.cjs → chunk-2N6EOBTH.cjs} +16 -16
- package/dist/{chunk-5AQIKK56.cjs.map → chunk-2N6EOBTH.cjs.map} +1 -1
- package/dist/{chunk-FN35DLCN.cjs → chunk-3C2RYI6L.cjs} +13 -107
- package/dist/chunk-3C2RYI6L.cjs.map +1 -0
- package/dist/{chunk-HW3LW7DH.cjs → chunk-3DS7Z4T4.cjs} +39 -39
- package/dist/{chunk-HW3LW7DH.cjs.map → chunk-3DS7Z4T4.cjs.map} +1 -1
- package/dist/{chunk-RSSQKPSZ.cjs → chunk-3GH67G4Z.cjs} +5 -5
- package/dist/{chunk-RSSQKPSZ.cjs.map → chunk-3GH67G4Z.cjs.map} +1 -1
- package/dist/{chunk-M75SUBFG.js → chunk-3RWZPJKV.js} +24 -9
- package/dist/chunk-3RWZPJKV.js.map +1 -0
- package/dist/{chunk-SKCOUWAX.js → chunk-3SLPDKHQ.js} +4 -4
- package/dist/chunk-3SLPDKHQ.js.map +1 -0
- package/dist/{chunk-5A6FNS6N.cjs → chunk-3XXGYU62.cjs} +11 -11
- package/dist/{chunk-5A6FNS6N.cjs.map → chunk-3XXGYU62.cjs.map} +1 -1
- package/dist/{chunk-IU46OHVW.js → chunk-44TA22QT.js} +58 -11
- package/dist/chunk-44TA22QT.js.map +1 -0
- package/dist/{chunk-7BQLPXK6.cjs → chunk-5AVRFNP4.cjs} +2955 -898
- package/dist/chunk-5AVRFNP4.cjs.map +1 -0
- package/dist/{chunk-2THZ3TQI.cjs → chunk-5KEQ74YU.cjs} +14 -14
- package/dist/chunk-5KEQ74YU.cjs.map +1 -0
- package/dist/{chunk-Q5TEXCTB.js → chunk-5KPNWT6X.js} +3 -3
- package/dist/{chunk-Q5TEXCTB.js.map → chunk-5KPNWT6X.js.map} +1 -1
- package/dist/{chunk-WI7ISNQF.js → chunk-5PNMDJ7J.js} +94 -5
- package/dist/chunk-5PNMDJ7J.js.map +1 -0
- package/dist/{chunk-AW4A3P5A.cjs → chunk-5VQM6VWP.cjs} +2 -2
- package/dist/{chunk-AW4A3P5A.cjs.map → chunk-5VQM6VWP.cjs.map} +1 -1
- package/dist/{chunk-A3W7QG7K.js → chunk-5WWVZMVX.js} +2 -2
- package/dist/{chunk-A3W7QG7K.js.map → chunk-5WWVZMVX.js.map} +1 -1
- package/dist/{chunk-FACJJWGF.cjs → chunk-6EEO3OVU.cjs} +7 -7
- package/dist/{chunk-FACJJWGF.cjs.map → chunk-6EEO3OVU.cjs.map} +1 -1
- package/dist/{chunk-DIK74MXX.cjs → chunk-BVRDGYXQ.cjs} +97 -4
- package/dist/chunk-BVRDGYXQ.cjs.map +1 -0
- package/dist/{chunk-4BCU6VFZ.cjs → chunk-DEFQM7JU.cjs} +7 -7
- package/dist/{chunk-4BCU6VFZ.cjs.map → chunk-DEFQM7JU.cjs.map} +1 -1
- package/dist/{chunk-456Z2U7Y.cjs → chunk-DIQ3AV5W.cjs} +574 -268
- package/dist/chunk-DIQ3AV5W.cjs.map +1 -0
- package/dist/{chunk-JFMEONLG.cjs → chunk-EJYMTO3K.cjs} +332 -188
- package/dist/chunk-EJYMTO3K.cjs.map +1 -0
- package/dist/{chunk-FPIZFYHE.js → chunk-EXU3RASM.js} +74 -15
- package/dist/chunk-EXU3RASM.js.map +1 -0
- package/dist/{chunk-5DIPR3L3.js → chunk-GA4TT3DH.js} +2338 -281
- package/dist/chunk-GA4TT3DH.js.map +1 -0
- package/dist/{chunk-H7YNSMA7.cjs → chunk-HAHNRASW.cjs} +20 -2
- package/dist/chunk-HAHNRASW.cjs.map +1 -0
- package/dist/{chunk-J3LEGNQB.cjs → chunk-IP3CGGPA.cjs} +8 -8
- package/dist/{chunk-J3LEGNQB.cjs.map → chunk-IP3CGGPA.cjs.map} +1 -1
- package/dist/{chunk-X4JBT642.cjs → chunk-IPSVVTWT.cjs} +94 -35
- package/dist/chunk-IPSVVTWT.cjs.map +1 -0
- package/dist/{chunk-VQEXF5D4.js → chunk-IXGYRP2P.js} +184 -92
- package/dist/chunk-IXGYRP2P.js.map +1 -0
- package/dist/{chunk-4GX2JJXS.js → chunk-K3Q3LJY3.js} +520 -221
- package/dist/chunk-K3Q3LJY3.js.map +1 -0
- package/dist/{chunk-OR5ZA5WP.js → chunk-K5UBVGJN.js} +4 -4
- package/dist/{chunk-OR5ZA5WP.js.map → chunk-K5UBVGJN.js.map} +1 -1
- package/dist/{chunk-UZV3AZKF.js → chunk-KQJ54OG5.js} +3 -3
- package/dist/{chunk-UZV3AZKF.js.map → chunk-KQJ54OG5.js.map} +1 -1
- package/dist/{chunk-SXGE7ITL.js → chunk-L7HQ2OSI.js} +4 -4
- package/dist/{chunk-SXGE7ITL.js.map → chunk-L7HQ2OSI.js.map} +1 -1
- package/dist/{chunk-RAXU3RMB.js → chunk-M6VES7V6.js} +4 -4
- package/dist/{chunk-RAXU3RMB.js.map → chunk-M6VES7V6.js.map} +1 -1
- package/dist/{chunk-PWGX5DF5.cjs → chunk-NUIG3BCV.cjs} +100 -85
- package/dist/chunk-NUIG3BCV.cjs.map +1 -0
- package/dist/{chunk-ZAMFOJ5P.cjs → chunk-NXQFATMF.cjs} +269 -177
- package/dist/chunk-NXQFATMF.cjs.map +1 -0
- package/dist/{chunk-KBGQIPRQ.js → chunk-PC2UBAUB.js} +20 -3
- package/dist/chunk-PC2UBAUB.js.map +1 -0
- package/dist/chunk-QARBLBXT.cjs +219 -0
- package/dist/chunk-QARBLBXT.cjs.map +1 -0
- package/dist/{chunk-6FR2MMS6.js → chunk-QERAIDRJ.js} +45 -4
- package/dist/chunk-QERAIDRJ.js.map +1 -0
- package/dist/chunk-QSXTWU4U.cjs +12 -0
- package/dist/{chunk-4BMPGT35.cjs.map → chunk-QSXTWU4U.cjs.map} +1 -1
- package/dist/{chunk-DN5VP4JC.js → chunk-RCVLFTCT.js} +9 -10
- package/dist/chunk-RCVLFTCT.js.map +1 -0
- package/dist/{chunk-ZIGXMKQQ.js → chunk-RRSNR3TP.js} +3 -3
- package/dist/{chunk-ZIGXMKQQ.js.map → chunk-RRSNR3TP.js.map} +1 -1
- package/dist/{chunk-4CAXEB2F.cjs → chunk-TGOMW4MB.cjs} +91 -92
- package/dist/chunk-TGOMW4MB.cjs.map +1 -0
- package/dist/{chunk-PZKNKG5M.js → chunk-TKT2XHED.js} +8 -8
- package/dist/{chunk-PZKNKG5M.js.map → chunk-TKT2XHED.js.map} +1 -1
- package/dist/{chunk-S5F7ZLP2.js → chunk-TPF25IG6.js} +3 -3
- package/dist/{chunk-S5F7ZLP2.js.map → chunk-TPF25IG6.js.map} +1 -1
- package/dist/{chunk-5SEGFTZX.js → chunk-UGZUAYAR.js} +3 -3
- package/dist/{chunk-5SEGFTZX.js.map → chunk-UGZUAYAR.js.map} +1 -1
- package/dist/{chunk-BJVEU3ZL.js → chunk-UV3WP5WZ.js} +265 -121
- package/dist/chunk-UV3WP5WZ.js.map +1 -0
- package/dist/{chunk-VHMPG6UL.js → chunk-UXLSNRYL.js} +11 -105
- package/dist/chunk-UXLSNRYL.js.map +1 -0
- package/dist/{chunk-FRV5Q5IO.js → chunk-UYQMBBWJ.js} +3 -3
- package/dist/{chunk-FRV5Q5IO.js.map → chunk-UYQMBBWJ.js.map} +1 -1
- package/dist/{chunk-UUT7UN2N.cjs → chunk-VGDDG3XJ.cjs} +7 -7
- package/dist/{chunk-UUT7UN2N.cjs.map → chunk-VGDDG3XJ.cjs.map} +1 -1
- package/dist/{chunk-5VTR2F2K.js → chunk-VKGKDOKR.js} +12 -10
- package/dist/chunk-VKGKDOKR.js.map +1 -0
- package/dist/{chunk-5W4L6DLF.cjs → chunk-VL2V6PEN.cjs} +11 -11
- package/dist/{chunk-5W4L6DLF.cjs.map → chunk-VL2V6PEN.cjs.map} +1 -1
- package/dist/{chunk-ZUNQ5BEP.cjs → chunk-WOJMKB3N.cjs} +82 -80
- package/dist/chunk-WOJMKB3N.cjs.map +1 -0
- package/dist/{chunk-UMDVATGY.cjs → chunk-WWFHO375.cjs} +6 -6
- package/dist/{chunk-UMDVATGY.cjs.map → chunk-WWFHO375.cjs.map} +1 -1
- package/dist/{chunk-JFUPDJXD.js → chunk-XGPUQ56G.js} +3 -3
- package/dist/{chunk-JFUPDJXD.js.map → chunk-XGPUQ56G.js.map} +1 -1
- package/dist/{chunk-D7ZEOS56.cjs → chunk-XGU7DZDA.cjs} +74 -14
- package/dist/chunk-XGU7DZDA.cjs.map +1 -0
- package/dist/{chunk-S55OV6PW.cjs → chunk-XPCZADMT.cjs} +54 -11
- package/dist/chunk-XPCZADMT.cjs.map +1 -0
- package/dist/{chunk-T2WUSPDA.js → chunk-XWV4JT34.js} +3 -3
- package/dist/{chunk-T2WUSPDA.js.map → chunk-XWV4JT34.js.map} +1 -1
- package/dist/chunk-YTSN73ND.js +212 -0
- package/dist/chunk-YTSN73ND.js.map +1 -0
- package/dist/{ddl-CZz7a0E8.d.cts → ddl-BD-ZfKeX.d.cts} +3 -3
- package/dist/{ddl-C2rZ-Aen.d.ts → ddl-CS0KUVwB.d.ts} +3 -3
- package/dist/{extension-types-ixRpJVUp.d.ts → extension-types-BM2ACfYO.d.cts} +6 -1
- package/dist/{extension-types-ixRpJVUp.d.cts → extension-types-BM2ACfYO.d.ts} +6 -1
- package/dist/{fulltext-strategy-CDkSSYhq.d.cts → fulltext-strategy-C27vXaeB.d.cts} +127 -8
- package/dist/{fulltext-strategy-B57yvC5Q.d.ts → fulltext-strategy-DebsMrqg.d.ts} +127 -8
- package/dist/graph-extension/index.cjs +19 -19
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +4 -4
- package/dist/graph-merge/index.cjs +88 -88
- package/dist/graph-merge/index.d.cts +6 -6
- package/dist/graph-merge/index.d.ts +6 -6
- package/dist/graph-merge/index.js +19 -19
- package/dist/{index-BLtQWKRj.d.cts → index-BPM59vsg.d.cts} +52 -7
- package/dist/{index-BFvdmBPV.d.ts → index-BeacbPoe.d.ts} +52 -7
- package/dist/index.cjs +224 -187
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +53 -40
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +30 -21
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +8 -7
- package/dist/interchange/index.cjs +207 -30
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +25 -8
- package/dist/interchange/index.d.ts +25 -8
- package/dist/interchange/index.js +190 -11
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-DwQi8eV0.d.cts → manager-D00_NXvT.d.ts} +11 -2
- package/dist/{manager-ejUCB52T.d.ts → manager-nU1vTJLy.d.cts} +11 -2
- package/dist/{materialize-indexes-B4e9360H.d.cts → materialize-indexes-CuR3gAZb.d.cts} +8 -2
- package/dist/{materialize-indexes-te9TPMMJ.d.ts → materialize-indexes-zK2J_flP.d.ts} +8 -2
- package/dist/{postgres-CfEqsRMp.d.cts → postgres-IaBA4RgE.d.ts} +1 -1
- package/dist/{postgres-DQ5R6rzV.d.ts → postgres-YrYmPlaU.d.cts} +1 -1
- package/dist/profiler/index.cjs +3 -3
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/profiler/index.js +2 -2
- package/dist/provenance/index.cjs +32 -33
- package/dist/provenance/index.cjs.map +1 -1
- package/dist/provenance/index.d.cts +5 -5
- package/dist/provenance/index.d.ts +5 -5
- package/dist/provenance/index.js +5 -6
- package/dist/provenance/index.js.map +1 -1
- package/dist/schema/index.cjs +35 -35
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +11 -11
- package/dist/{sqlite-DvQndLky.d.ts → sqlite-BUOHPx7p.d.ts} +1 -1
- package/dist/{sqlite-D7zBinNR.d.cts → sqlite-Pp8O19WE.d.cts} +1 -1
- package/dist/{store-view-DplHC3Nt.d.ts → store-view-ANL6mTph.d.ts} +213 -27
- package/dist/{store-view-9KDOpZzF.d.cts → store-view-X96Rd00T.d.cts} +213 -27
- package/dist/{types-Bv9DcS_E.d.cts → types-r-Zyq2Hz.d.cts} +2 -2
- package/dist/{types-CoxuV7EJ.d.ts → types-wsvuBgPK.d.ts} +2 -2
- package/dist/where-CJOpJj3a.d.ts +36 -0
- package/dist/where-K3uBP33l.d.cts +36 -0
- package/package.json +1 -1
- package/dist/chunk-2THZ3TQI.cjs.map +0 -1
- package/dist/chunk-456Z2U7Y.cjs.map +0 -1
- package/dist/chunk-4BMPGT35.cjs +0 -12
- package/dist/chunk-4CAXEB2F.cjs.map +0 -1
- package/dist/chunk-4GX2JJXS.js.map +0 -1
- package/dist/chunk-5DIPR3L3.js.map +0 -1
- package/dist/chunk-5VTR2F2K.js.map +0 -1
- package/dist/chunk-6FR2MMS6.js.map +0 -1
- package/dist/chunk-7BQLPXK6.cjs.map +0 -1
- package/dist/chunk-BJVEU3ZL.js.map +0 -1
- package/dist/chunk-D7ZEOS56.cjs.map +0 -1
- package/dist/chunk-DIK74MXX.cjs.map +0 -1
- package/dist/chunk-DN5VP4JC.js.map +0 -1
- package/dist/chunk-EOLERH7Y.cjs +0 -40
- package/dist/chunk-EOLERH7Y.cjs.map +0 -1
- package/dist/chunk-FN35DLCN.cjs.map +0 -1
- package/dist/chunk-FPIZFYHE.js.map +0 -1
- package/dist/chunk-H7YNSMA7.cjs.map +0 -1
- package/dist/chunk-IU46OHVW.js.map +0 -1
- package/dist/chunk-JFMEONLG.cjs.map +0 -1
- package/dist/chunk-KBGQIPRQ.js.map +0 -1
- package/dist/chunk-M75SUBFG.js.map +0 -1
- package/dist/chunk-PWGX5DF5.cjs.map +0 -1
- package/dist/chunk-S55OV6PW.cjs.map +0 -1
- package/dist/chunk-SKCOUWAX.js.map +0 -1
- package/dist/chunk-UT3S4SEN.js +0 -31
- package/dist/chunk-UT3S4SEN.js.map +0 -1
- package/dist/chunk-VHMPG6UL.js.map +0 -1
- package/dist/chunk-VQEXF5D4.js.map +0 -1
- package/dist/chunk-WI7ISNQF.js.map +0 -1
- package/dist/chunk-X4JBT642.cjs.map +0 -1
- package/dist/chunk-ZAMFOJ5P.cjs.map +0 -1
- package/dist/chunk-ZUNQ5BEP.cjs.map +0 -1
- package/dist/where-7RKFOsXt.d.ts +0 -11
- package/dist/where-DdMIXOtH.d.cts +0 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as TemporalMode, N as NodeType, A as AnyEdgeType, g as EdgeType, E as EdgeRegistration, d as NodeId, K as KindEntity, b as NodeRegistration, e as EdgeId, s as UniquenessScope, n as Collation, f as KindAnnotations, m as Cardinality, q as EndpointExistence, G as GraphExtension } from './extension-types-
|
|
1
|
+
import { G as GraphDef, K as KindRegistry, w as EdgeKinds, t as NodeKinds, v as AllNodeTypes, c as SchemaManagerOptions, d as SchemaValidationResult } from './manager-nU1vTJLy.cjs';
|
|
2
|
+
import { T as TemporalMode, N as NodeType, A as AnyEdgeType, g as EdgeType, E as EdgeRegistration, d as NodeId, K as KindEntity, b as NodeRegistration, e as EdgeId, s as UniquenessScope, n as Collation, f as KindAnnotations, m as Cardinality, q as EndpointExistence, G as GraphExtension } from './extension-types-BM2ACfYO.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import {
|
|
5
|
-
import { b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-
|
|
4
|
+
import { a_ as VectorSlot, be as ValueType, bf as PredicateExpression, ag as FulltextQueryMode, bg as VectorMetricType, Q as QueryAst, J as JsonPointer, P as FieldRef, aA as ParameterRef, ar as JsonPointerInput, G as GraphBackend, aT as TransactionBackend, aU as TraversalExpansion, c as SqlDialect, aP as SqlSchema, bh as Traversal, bi as NodePredicate, bj as ProjectedField, az as OrderSpec, bk as AggregateOrderSpec, bl as GroupBySpec, an as HybridFusionOptions, bm as RecursiveCyclePolicy, W as TraversalDirection$1, bn as NodeRow, aa as ExternalRecordedReadSource, bo as EdgeRow, X as AdoptedTransaction, L as AggregateExpr, aN as SortDirection, a3 as CompiledSelectSql, F as FulltextStrategy, V as VectorStrategy, bp as VectorSlotMap, bq as RecordedReadBinding, br as SelectiveField, bs as ComposableQuery, bt as SetOperationType, bu as SetOperation, bv as VectorMetric, z as JsonSchema, bw as TransactionOptions } from './fulltext-strategy-C27vXaeB.cjs';
|
|
5
|
+
import { b as MaterializeIndexesOptions, M as MaterializeIndexesResult, c as MaterializeSystemIndexesOptions } from './materialize-indexes-CuR3gAZb.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Embedding type for vector search.
|
|
@@ -145,6 +145,16 @@ declare function isEmbeddingSchema(value: unknown): value is EmbeddingSchema;
|
|
|
145
145
|
* Returns undefined if the schema is not an embedding schema.
|
|
146
146
|
*/
|
|
147
147
|
declare function getEmbeddingDimensions(schema: z.ZodType): number | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* Enumerates every embedding `(kind, field)` slot a graph declares, as a
|
|
150
|
+
* fully-resolved {@link VectorSlot}. The single source of truth for "what
|
|
151
|
+
* vector slots does this graph have?", shared by the privileged boot
|
|
152
|
+
* materializer (`materializeVectorContributions`) and the verified-attach
|
|
153
|
+
* gate (`assertVectorContributionsInitialized`) so the two can never
|
|
154
|
+
* provision and assert different sets. Walks `graph.nodes` and reuses
|
|
155
|
+
* {@link resolveEmbeddingFields} per node schema.
|
|
156
|
+
*/
|
|
157
|
+
declare function resolveGraphVectorSlots(graph: GraphDef): readonly VectorSlot[];
|
|
148
158
|
|
|
149
159
|
/**
|
|
150
160
|
* Searchable string type for fulltext search.
|
|
@@ -1296,13 +1306,19 @@ type BaseStoreOptions = Readonly<{
|
|
|
1296
1306
|
* off.
|
|
1297
1307
|
*
|
|
1298
1308
|
* Enable this for at-least-once / replay materializers. An event log that
|
|
1299
|
-
* re-delivers a byte-identical change
|
|
1300
|
-
* already-materialized log, would otherwise rewrite every row it touches:
|
|
1309
|
+
* re-delivers a byte-identical change would otherwise rewrite the row anyway:
|
|
1301
1310
|
* today an `upsertById` on an existing id calls `updateNode`
|
|
1302
1311
|
* unconditionally, allocating a fresh recorded instant and a new history row
|
|
1303
|
-
* per re-delivery.
|
|
1304
|
-
*
|
|
1305
|
-
*
|
|
1312
|
+
* per re-delivery.
|
|
1313
|
+
*
|
|
1314
|
+
* The win is scoped to re-delivery of the **current** value. A full
|
|
1315
|
+
* replay-from-zero over the current state still writes wherever the stream
|
|
1316
|
+
* superseded a value in place: re-applying an older value over the live row
|
|
1317
|
+
* is a genuine change (and restoring the current value afterwards is
|
|
1318
|
+
* another), so only streams whose rows never supersede each other replay
|
|
1319
|
+
* without churn. A rebuild that should avoid that re-walk belongs in a fresh
|
|
1320
|
+
* store — replay into it and publish it, rather than re-applying the log
|
|
1321
|
+
* over current state.
|
|
1306
1322
|
*
|
|
1307
1323
|
* When enabled, an upsert that would not change the stored value performs
|
|
1308
1324
|
* **no write at all**: no `updateNode`, no recorded-time capture, no history
|
|
@@ -3117,14 +3133,10 @@ declare function createQueryBuilder<G extends GraphDef>(graphId: string, registr
|
|
|
3117
3133
|
*/
|
|
3118
3134
|
type TraversalDirection = "out" | "in" | "both";
|
|
3119
3135
|
/**
|
|
3120
|
-
* Cycle-handling
|
|
3121
|
-
*
|
|
3122
|
-
*
|
|
3123
|
-
*
|
|
3124
|
-
* - `"allow"` — permit revisiting nodes. Only safe with a bounded `maxHops`.
|
|
3125
|
-
*
|
|
3126
|
-
* Aliased to `RecursiveCyclePolicy` so algorithms and query-builder traversals
|
|
3127
|
-
* share a single canonical union.
|
|
3136
|
+
* Cycle-handling option retained for compatibility with recursive query-builder
|
|
3137
|
+
* traversals. Store algorithms are set-based and visit each node once at its
|
|
3138
|
+
* minimum depth, so `"prevent"` and `"allow"` produce the same algorithm
|
|
3139
|
+
* result. Aliased to `RecursiveCyclePolicy` so both APIs share one union.
|
|
3128
3140
|
*/
|
|
3129
3141
|
type AlgorithmCyclePolicy = RecursiveCyclePolicy;
|
|
3130
3142
|
/**
|
|
@@ -3148,10 +3160,38 @@ type TemporalAlgorithmOptions = NoRecordedCoordinate & Readonly<{
|
|
|
3148
3160
|
type InternalTemporalAlgorithmOptions = Omit<TemporalAlgorithmOptions, "recordedAsOf"> & Readonly<{
|
|
3149
3161
|
recordedAsOf?: RecordedInstant;
|
|
3150
3162
|
}>;
|
|
3163
|
+
/**
|
|
3164
|
+
* Opt-in, transaction-scoped override of the session's working memory for
|
|
3165
|
+
* iterative graph rounds.
|
|
3166
|
+
*
|
|
3167
|
+
* When set, PostgreSQL applies it with `SET LOCAL work_mem` semantics inside
|
|
3168
|
+
* the operation's own transaction — the override ends with the transaction
|
|
3169
|
+
* and the session and server settings are never modified. When omitted (the
|
|
3170
|
+
* default), the operation inherits the server's configured `work_mem`.
|
|
3171
|
+
*
|
|
3172
|
+
* `work_mem` is a threshold each sort/hash operator (and each parallel
|
|
3173
|
+
* worker) may allocate up to, NOT a per-operation budget: a single round can
|
|
3174
|
+
* allocate several multiples of it, and concurrent algorithm calls multiply
|
|
3175
|
+
* again. Raise it deliberately — e.g. `"64MB"` for large single-tenant
|
|
3176
|
+
* analytical runs where the configured default spills whole-graph sorts to
|
|
3177
|
+
* disk — not as a blanket setting on a shared cluster.
|
|
3178
|
+
*
|
|
3179
|
+
* The value must be a plain integer with a `kB`, `MB`, or `GB` suffix within
|
|
3180
|
+
* PostgreSQL's accepted `work_mem` range (`64kB` to `2147483647kB`); both
|
|
3181
|
+
* backends reject malformed or out-of-range values identically. SQLite has
|
|
3182
|
+
* no equivalent setting and otherwise ignores the option.
|
|
3183
|
+
*/
|
|
3184
|
+
type IterativeMemoryOptions = Readonly<{
|
|
3185
|
+
/**
|
|
3186
|
+
* Transaction-scoped `work_mem` override, e.g. `"64MB"`. Omit to inherit
|
|
3187
|
+
* the server's configured setting.
|
|
3188
|
+
*/
|
|
3189
|
+
workingMemory?: string;
|
|
3190
|
+
}>;
|
|
3151
3191
|
/**
|
|
3152
3192
|
* Base options for traversal-style algorithms.
|
|
3153
3193
|
*/
|
|
3154
|
-
type BaseTraversalOptions<G extends GraphDef> = TemporalAlgorithmOptions & Readonly<{
|
|
3194
|
+
type BaseTraversalOptions<G extends GraphDef> = TemporalAlgorithmOptions & IterativeMemoryOptions & Readonly<{
|
|
3155
3195
|
/** Edge kinds to follow. At least one kind is required. */
|
|
3156
3196
|
edges: readonly EdgeKinds<G>[];
|
|
3157
3197
|
/**
|
|
@@ -3161,7 +3201,7 @@ type BaseTraversalOptions<G extends GraphDef> = TemporalAlgorithmOptions & Reado
|
|
|
3161
3201
|
maxHops?: number;
|
|
3162
3202
|
/** Direction of traversal (default: `"out"`). */
|
|
3163
3203
|
direction?: TraversalDirection;
|
|
3164
|
-
/**
|
|
3204
|
+
/** Compatibility option; set-based algorithms always visit a node once. */
|
|
3165
3205
|
cyclePolicy?: AlgorithmCyclePolicy;
|
|
3166
3206
|
}>;
|
|
3167
3207
|
type InternalBaseTraversalOptions<G extends GraphDef> = InternalTemporalAlgorithmOptions & Omit<BaseTraversalOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
@@ -3198,6 +3238,56 @@ type ShortestPathResult = Readonly<{
|
|
|
3198
3238
|
*/
|
|
3199
3239
|
type ShortestPathOptions<G extends GraphDef> = BaseTraversalOptions<G>;
|
|
3200
3240
|
type InternalShortestPathOptions<G extends GraphDef> = InternalBaseTraversalOptions<G>;
|
|
3241
|
+
/**
|
|
3242
|
+
* Options for `weightedShortestPath`.
|
|
3243
|
+
*
|
|
3244
|
+
* Each traversed edge contributes the value of `weightProperty` — a JSON
|
|
3245
|
+
* number stored on the edge — to the path's total weight. The traversal
|
|
3246
|
+
* fails fast with `InvalidEdgeWeightError` (before any rounds run) when any
|
|
3247
|
+
* visible edge of the selected kinds has a negative, non-numeric, or
|
|
3248
|
+
* out-of-range weight, or is missing the property with no `defaultWeight`
|
|
3249
|
+
* configured. Weight arithmetic uses IEEE 754 doubles on both backends:
|
|
3250
|
+
* total weights are always backend-identical, and — unless the `edges` list
|
|
3251
|
+
* is large enough to exceed the backend's bind-parameter budget (hundreds
|
|
3252
|
+
* of kinds in one call, where equal-weight predecessor ties may resolve
|
|
3253
|
+
* differently) — so is the returned node sequence.
|
|
3254
|
+
*
|
|
3255
|
+
* Unlike `shortestPath`, there is no `maxHops`: cost-ordered discovery does
|
|
3256
|
+
* not settle nodes in hop order, so a hop bound is not a natural stopping
|
|
3257
|
+
* rule. `maxIterations` caps relaxation rounds purely as a runaway backstop
|
|
3258
|
+
* — the algorithm normally converges (and prunes against the best known
|
|
3259
|
+
* target distance) long before reaching it.
|
|
3260
|
+
*/
|
|
3261
|
+
type WeightedShortestPathOptions<G extends GraphDef> = Omit<BaseTraversalOptions<G>, "maxHops" | "cyclePolicy"> & Readonly<{
|
|
3262
|
+
/**
|
|
3263
|
+
* Top-level edge property supplying each edge's non-negative numeric
|
|
3264
|
+
* weight.
|
|
3265
|
+
*/
|
|
3266
|
+
weightProperty: string;
|
|
3267
|
+
/**
|
|
3268
|
+
* Weight substituted for edges missing `weightProperty`. Must be a
|
|
3269
|
+
* non-negative number within the same upper bound the audit applies to
|
|
3270
|
+
* stored weights (~9.7e289, so accumulated path sums can never
|
|
3271
|
+
* overflow). Without it, a missing weight throws
|
|
3272
|
+
* `InvalidEdgeWeightError`.
|
|
3273
|
+
*/
|
|
3274
|
+
defaultWeight?: number;
|
|
3275
|
+
/** Maximum relaxation rounds before throwing. Defaults to 1000. */
|
|
3276
|
+
maxIterations?: number;
|
|
3277
|
+
}>;
|
|
3278
|
+
type InternalWeightedShortestPathOptions<G extends GraphDef> = InternalTemporalAlgorithmOptions & Omit<WeightedShortestPathOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
3279
|
+
/**
|
|
3280
|
+
* Result of `weightedShortestPath`: the minimum-total-weight node sequence
|
|
3281
|
+
* from source to target.
|
|
3282
|
+
*/
|
|
3283
|
+
type WeightedShortestPathResult = Readonly<{
|
|
3284
|
+
/** Ordered nodes from source to target (inclusive). */
|
|
3285
|
+
nodes: readonly PathNode[];
|
|
3286
|
+
/** Number of edges traversed. Equals `nodes.length - 1`. */
|
|
3287
|
+
depth: number;
|
|
3288
|
+
/** Sum of the traversed edges' weights. 0 for a self-path. */
|
|
3289
|
+
totalWeight: number;
|
|
3290
|
+
}>;
|
|
3201
3291
|
/**
|
|
3202
3292
|
* Options for `reachable`.
|
|
3203
3293
|
*
|
|
@@ -3217,14 +3307,14 @@ type InternalReachableOptions<G extends GraphDef> = InternalBaseTraversalOptions
|
|
|
3217
3307
|
* "2-hop neighbors" reads more naturally than "reachable with maxHops=2".
|
|
3218
3308
|
* The source is always excluded.
|
|
3219
3309
|
*/
|
|
3220
|
-
type NeighborsOptions<G extends GraphDef> = TemporalAlgorithmOptions & Readonly<{
|
|
3310
|
+
type NeighborsOptions<G extends GraphDef> = TemporalAlgorithmOptions & IterativeMemoryOptions & Readonly<{
|
|
3221
3311
|
/** Edge kinds to follow. At least one kind is required. */
|
|
3222
3312
|
edges: readonly EdgeKinds<G>[];
|
|
3223
3313
|
/** Maximum neighborhood depth (default: 1). Must be between 1 and 1000. */
|
|
3224
3314
|
depth?: number;
|
|
3225
3315
|
/** Direction of traversal (default: `"out"`). */
|
|
3226
3316
|
direction?: TraversalDirection;
|
|
3227
|
-
/**
|
|
3317
|
+
/** Compatibility option; set-based algorithms always visit a node once. */
|
|
3228
3318
|
cyclePolicy?: AlgorithmCyclePolicy;
|
|
3229
3319
|
}>;
|
|
3230
3320
|
type InternalNeighborsOptions<G extends GraphDef> = InternalTemporalAlgorithmOptions & Omit<NeighborsOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
@@ -3244,6 +3334,34 @@ type DegreeOptions<G extends GraphDef> = TemporalAlgorithmOptions & Readonly<{
|
|
|
3244
3334
|
direction?: TraversalDirection;
|
|
3245
3335
|
}>;
|
|
3246
3336
|
type InternalDegreeOptions<G extends GraphDef> = InternalTemporalAlgorithmOptions & Omit<DegreeOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
3337
|
+
/**
|
|
3338
|
+
* Options for exact weakly connected components.
|
|
3339
|
+
*
|
|
3340
|
+
* Selected edges are treated as undirected, regardless of their declared
|
|
3341
|
+
* direction. By default every visible graph node is returned; `nodeKinds`
|
|
3342
|
+
* restricts the operation to the induced subgraph over those kinds. Nodes in
|
|
3343
|
+
* scope with no selected incident edge form singleton components.
|
|
3344
|
+
*/
|
|
3345
|
+
type WeaklyConnectedComponentsOptions<G extends GraphDef> = TemporalAlgorithmOptions & IterativeMemoryOptions & Readonly<{
|
|
3346
|
+
/** Edge kinds whose undirected projection defines connectivity. */
|
|
3347
|
+
edges: readonly EdgeKinds<G>[];
|
|
3348
|
+
/** Optional node kinds defining the induced subgraph to analyze. */
|
|
3349
|
+
nodeKinds?: readonly NodeKinds<G>[];
|
|
3350
|
+
/** Maximum label-propagation rounds before throwing. Defaults to 1000. */
|
|
3351
|
+
maxIterations?: number;
|
|
3352
|
+
}>;
|
|
3353
|
+
type InternalWeaklyConnectedComponentsOptions<G extends GraphDef> = InternalTemporalAlgorithmOptions & Omit<WeaklyConnectedComponentsOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
3354
|
+
/** One node's membership in an exact weakly connected component. */
|
|
3355
|
+
type WeaklyConnectedComponentMembership = Readonly<{
|
|
3356
|
+
id: string;
|
|
3357
|
+
kind: string;
|
|
3358
|
+
/** Deterministic minimum node id in this component. */
|
|
3359
|
+
componentId: string;
|
|
3360
|
+
/** Kind paired with `componentId`; node identity is `(kind, id)`. */
|
|
3361
|
+
componentKind: string;
|
|
3362
|
+
/** Number of visible nodes in this component. */
|
|
3363
|
+
size: number;
|
|
3364
|
+
}>;
|
|
3247
3365
|
|
|
3248
3366
|
/**
|
|
3249
3367
|
* Raw node id or any object with an `id: string` field. Covers `Node`,
|
|
@@ -3278,6 +3396,27 @@ type GraphAlgorithms<G extends GraphDef> = Readonly<{
|
|
|
3278
3396
|
* ```
|
|
3279
3397
|
*/
|
|
3280
3398
|
shortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: ShortestPathOptions<G>) => Promise<ShortestPathResult | undefined>;
|
|
3399
|
+
/**
|
|
3400
|
+
* Finds the minimum-total-weight path from `from` to `to`, weighting each
|
|
3401
|
+
* traversed edge by the numeric `weightProperty` stored on it. Returns
|
|
3402
|
+
* `undefined` when no path exists. Weights must be non-negative; a
|
|
3403
|
+
* negative, non-numeric, or (without `defaultWeight`) missing weight on
|
|
3404
|
+
* any visible edge of the selected kinds throws `InvalidEdgeWeightError`
|
|
3405
|
+
* before traversal starts.
|
|
3406
|
+
*
|
|
3407
|
+
* @example
|
|
3408
|
+
* ```typescript
|
|
3409
|
+
* const path = await store.algorithms.weightedShortestPath(alice, bob, {
|
|
3410
|
+
* edges: ["knows"],
|
|
3411
|
+
* weightProperty: "interactionCost",
|
|
3412
|
+
* direction: "both",
|
|
3413
|
+
* });
|
|
3414
|
+
* if (path) {
|
|
3415
|
+
* console.log(`total weight ${path.totalWeight} over ${path.depth} hops`);
|
|
3416
|
+
* }
|
|
3417
|
+
* ```
|
|
3418
|
+
*/
|
|
3419
|
+
weightedShortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: WeightedShortestPathOptions<G>) => Promise<WeightedShortestPathResult | undefined>;
|
|
3281
3420
|
/**
|
|
3282
3421
|
* Returns every node reachable from `from` within `maxHops` edges of the
|
|
3283
3422
|
* allowed kinds. Each node carries its minimum discovered depth.
|
|
@@ -3285,7 +3424,7 @@ type GraphAlgorithms<G extends GraphDef> = Readonly<{
|
|
|
3285
3424
|
reachable: (from: NodeIdentifier, options: ReachableOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
3286
3425
|
/**
|
|
3287
3426
|
* Fast boolean check: is `to` reachable from `from` within `maxHops`
|
|
3288
|
-
* edges?
|
|
3427
|
+
* edges? Uses bidirectional BFS and stops when the frontiers meet.
|
|
3289
3428
|
*/
|
|
3290
3429
|
canReach: (from: NodeIdentifier, to: NodeIdentifier, options: BaseTraversalOptions<G>) => Promise<boolean>;
|
|
3291
3430
|
/**
|
|
@@ -3300,13 +3439,22 @@ type GraphAlgorithms<G extends GraphDef> = Readonly<{
|
|
|
3300
3439
|
* With `direction: "both"` (default), self-loops contribute once.
|
|
3301
3440
|
*/
|
|
3302
3441
|
degree: (node: NodeIdentifier, options?: DegreeOptions<G>) => Promise<number>;
|
|
3442
|
+
/**
|
|
3443
|
+
* Computes exact weakly connected components over the selected edge kinds.
|
|
3444
|
+
*
|
|
3445
|
+
* Iterative: runs multiple SQL rounds in one snapshot and requires
|
|
3446
|
+
* `backend.capabilities.graphAnalytics.supported`.
|
|
3447
|
+
*/
|
|
3448
|
+
weaklyConnectedComponents: (options: WeaklyConnectedComponentsOptions<G>) => Promise<readonly WeaklyConnectedComponentMembership[]>;
|
|
3303
3449
|
}>;
|
|
3304
3450
|
type InternalGraphAlgorithms<G extends GraphDef> = Readonly<{
|
|
3305
3451
|
shortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: InternalShortestPathOptions<G>) => Promise<ShortestPathResult | undefined>;
|
|
3452
|
+
weightedShortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: InternalWeightedShortestPathOptions<G>) => Promise<WeightedShortestPathResult | undefined>;
|
|
3306
3453
|
reachable: (from: NodeIdentifier, options: InternalReachableOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
3307
3454
|
canReach: (from: NodeIdentifier, to: NodeIdentifier, options: InternalBaseTraversalOptions<G>) => Promise<boolean>;
|
|
3308
3455
|
neighbors: (node: NodeIdentifier, options: InternalNeighborsOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
3309
3456
|
degree: (node: NodeIdentifier, options?: InternalDegreeOptions<G>) => Promise<number>;
|
|
3457
|
+
weaklyConnectedComponents: (options: InternalWeaklyConnectedComponentsOptions<G>) => Promise<readonly WeaklyConnectedComponentMembership[]>;
|
|
3310
3458
|
}>;
|
|
3311
3459
|
|
|
3312
3460
|
type RebuildFulltextOptions = Readonly<{
|
|
@@ -4043,9 +4191,11 @@ declare class Store<G extends GraphDef> {
|
|
|
4043
4191
|
* Tier 1 graph algorithms: shortest path, reachability, neighborhoods, and
|
|
4044
4192
|
* degree centrality.
|
|
4045
4193
|
*
|
|
4046
|
-
*
|
|
4047
|
-
*
|
|
4048
|
-
*
|
|
4194
|
+
* Traversal calls use the iterative graph-operation substrate: a set-based
|
|
4195
|
+
* breadth-first frontier backed by a temporary working table, or a chunked
|
|
4196
|
+
* inline relation when the backend cannot pin a transactional connection.
|
|
4197
|
+
* `degree` uses a single count query. The facade is built lazily on first
|
|
4198
|
+
* access and cached for the lifetime of the store.
|
|
4049
4199
|
*
|
|
4050
4200
|
* @example
|
|
4051
4201
|
* ```typescript
|
|
@@ -4843,6 +4993,19 @@ declare class Store<G extends GraphDef> {
|
|
|
4843
4993
|
* has no schema yet.
|
|
4844
4994
|
*/
|
|
4845
4995
|
materializeIndexes(options?: MaterializeIndexesOptions): Promise<MaterializeIndexesResult>;
|
|
4996
|
+
/**
|
|
4997
|
+
* Materializes TypeGraph's own base-relation indexes
|
|
4998
|
+
* (`SYSTEM_INDEX_DECLARATIONS`) against the live database.
|
|
4999
|
+
*
|
|
5000
|
+
* Bootstrap DDL runs only on first boot, so a system index shipped in a
|
|
5001
|
+
* newer library version never reaches an already-initialized database on
|
|
5002
|
+
* its own. `createStoreWithSchema` runs this automatically; deployments
|
|
5003
|
+
* that boot with plain `createStore` / `createVerifiedStore` (zero-DDL by
|
|
5004
|
+
* contract) adopt new system indexes by calling this once under a role
|
|
5005
|
+
* that may run DDL. Same status-table, drift-signature, and Postgres
|
|
5006
|
+
* `CREATE INDEX CONCURRENTLY` claim semantics as `materializeIndexes`.
|
|
5007
|
+
*/
|
|
5008
|
+
materializeSystemIndexes(options?: MaterializeSystemIndexesOptions): Promise<MaterializeIndexesResult>;
|
|
4846
5009
|
/**
|
|
4847
5010
|
* Recreate a vector field's per-field storage at its current declared
|
|
4848
5011
|
* dimension, then optionally re-embed existing rows.
|
|
@@ -5108,12 +5271,29 @@ type StoreViewSubgraphOptions<G extends GraphDef, EK extends EdgeKinds<G>, NK ex
|
|
|
5108
5271
|
type StoreViewReachableOptions<G extends GraphDef> = Omit<ReachableOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
5109
5272
|
/** `shortestPath` options with the temporal axis removed (the pin supplies it). */
|
|
5110
5273
|
type StoreViewShortestPathOptions<G extends GraphDef> = Omit<ShortestPathOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
5274
|
+
/**
|
|
5275
|
+
* `weightedShortestPath` options with the temporal axis removed (the pin
|
|
5276
|
+
* supplies it).
|
|
5277
|
+
*/
|
|
5278
|
+
type StoreViewWeightedShortestPathOptions<G extends GraphDef> = Omit<WeightedShortestPathOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
5111
5279
|
/** `canReach` options with the temporal axis removed (the pin supplies it). */
|
|
5112
5280
|
type StoreViewCanReachOptions<G extends GraphDef> = Omit<BaseTraversalOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
5113
5281
|
/** `neighbors` options with the temporal axis removed (the pin supplies it). */
|
|
5114
5282
|
type StoreViewNeighborsOptions<G extends GraphDef> = Omit<NeighborsOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
5115
5283
|
/** `degree` options with the temporal axis removed (the pin supplies it). */
|
|
5116
5284
|
type StoreViewDegreeOptions<G extends GraphDef> = Omit<DegreeOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
5285
|
+
/** WCC options with the temporal axis removed (the view's pin supplies it). */
|
|
5286
|
+
type StoreViewWeaklyConnectedComponentsOptions<G extends GraphDef> = Omit<WeaklyConnectedComponentsOptions<G>, keyof TemporalAlgorithmOptions>;
|
|
5287
|
+
/** Graph-algorithm facade sealed to a {@link StoreView}'s coordinate. */
|
|
5288
|
+
type StoreViewGraphAlgorithms<G extends GraphDef> = Readonly<{
|
|
5289
|
+
shortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewShortestPathOptions<G>) => Promise<ShortestPathResult | undefined>;
|
|
5290
|
+
weightedShortestPath: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewWeightedShortestPathOptions<G>) => Promise<WeightedShortestPathResult | undefined>;
|
|
5291
|
+
reachable: (from: NodeIdentifier, options: StoreViewReachableOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
5292
|
+
canReach: (from: NodeIdentifier, to: NodeIdentifier, options: StoreViewCanReachOptions<G>) => Promise<boolean>;
|
|
5293
|
+
neighbors: (node: NodeIdentifier, options: StoreViewNeighborsOptions<G>) => Promise<readonly ReachableNode[]>;
|
|
5294
|
+
degree: (node: NodeIdentifier, options?: StoreViewDegreeOptions<G>) => Promise<number>;
|
|
5295
|
+
weaklyConnectedComponents: (options: StoreViewWeaklyConnectedComponentsOptions<G>) => Promise<readonly WeaklyConnectedComponentMembership[]>;
|
|
5296
|
+
}>;
|
|
5117
5297
|
/**
|
|
5118
5298
|
* Shared base for the read-only views. Holds the pinned {@link ReadCoordinate}
|
|
5119
5299
|
* and delegates the graph algorithms, `subgraph`, and `query` to the live store
|
|
@@ -5137,11 +5317,15 @@ declare abstract class CoordinatePinnedView<G extends GraphDef> {
|
|
|
5137
5317
|
* view's coordinate cannot be overridden on a per-query basis.
|
|
5138
5318
|
*/
|
|
5139
5319
|
query(): InitialQueryBuilder<G, "sealed">;
|
|
5140
|
-
protected
|
|
5320
|
+
protected internalAlgorithms(): InternalGraphAlgorithms<G>;
|
|
5321
|
+
/** Graph algorithms pinned to this view's immutable temporal coordinate. */
|
|
5322
|
+
get algorithms(): StoreViewGraphAlgorithms<G>;
|
|
5141
5323
|
/** Extracts a subgraph at this view's pinned coordinate. */
|
|
5142
5324
|
subgraph<const EK extends EdgeKinds<G>, const NK extends NodeKinds<G> = NodeKinds<G>, const P extends SubgraphProject<G, NK, EK> | undefined = undefined>(rootId: NodeId<AllNodeTypes<G>>, options: StoreViewSubgraphOptions<G, EK, NK, P>): Promise<SubgraphResult<G, NK, EK, P>>;
|
|
5143
5325
|
/** Shortest path between two nodes at this view's pinned coordinate. */
|
|
5144
5326
|
shortestPath(from: NodeIdentifier, to: NodeIdentifier, options: StoreViewShortestPathOptions<G>): Promise<ShortestPathResult | undefined>;
|
|
5327
|
+
/** Minimum-total-weight path at this view's pinned coordinate. */
|
|
5328
|
+
weightedShortestPath(from: NodeIdentifier, to: NodeIdentifier, options: StoreViewWeightedShortestPathOptions<G>): Promise<WeightedShortestPathResult | undefined>;
|
|
5145
5329
|
/** Nodes reachable from `from` at this view's pinned coordinate. */
|
|
5146
5330
|
reachable(from: NodeIdentifier, options: StoreViewReachableOptions<G>): Promise<readonly ReachableNode[]>;
|
|
5147
5331
|
/** Whether `to` is reachable from `from` at this view's pinned coordinate. */
|
|
@@ -5150,6 +5334,8 @@ declare abstract class CoordinatePinnedView<G extends GraphDef> {
|
|
|
5150
5334
|
neighbors(node: NodeIdentifier, options: StoreViewNeighborsOptions<G>): Promise<readonly ReachableNode[]>;
|
|
5151
5335
|
/** Counts active edges incident to `node` at this view's pinned coordinate. */
|
|
5152
5336
|
degree(node: NodeIdentifier, options?: StoreViewDegreeOptions<G>): Promise<number>;
|
|
5337
|
+
/** Exact WCC memberships at this view's pinned coordinate. */
|
|
5338
|
+
weaklyConnectedComponents(options: StoreViewWeaklyConnectedComponentsOptions<G>): Promise<readonly WeaklyConnectedComponentMembership[]>;
|
|
5153
5339
|
}
|
|
5154
5340
|
/**
|
|
5155
5341
|
* A read-only `(mode, asOf)` lens over a {@link Store}. Construct one via
|
|
@@ -5201,4 +5387,4 @@ declare class RecordedStoreView<G extends GraphDef> extends CoordinatePinnedView
|
|
|
5201
5387
|
get edges(): RecordedStoreViewEdgeCollections<G>;
|
|
5202
5388
|
}
|
|
5203
5389
|
|
|
5204
|
-
export { type GetOrCreateAction as $, type AliasMap as A, type BaseTraversalOptions as B, type ConstraintNames as C, DEFAULT_SEARCHABLE_LANGUAGE as D, type EmbeddingMetric as E, type EdgeFindByEndpointsOptions as F, type EdgeGetOrCreateByEndpointsOptions as G, type HistoryStore as H, type EdgeGetOrCreateByEndpointsResult as I, type EdgeIntrospection as J, type EdgeTemporalReads as K, type EdgeWrites as L, type EmbeddingSchema as M, type Node as N, type EmbeddingValue as O, type EmptyAliasMap as P, type QueryCoordinateState as Q, type RecursiveAliasMap as R, Store as S, TraversalBuilder as T, type UniqueIntrospection as U, type EmptyEdgeAliasMap as V, ExecutableAggregateQuery as W, ExecutableQuery as X, type FieldAccessor as Y, type FulltextSearchHit as Z, type FulltextSearchOptions as _, type EmbeddingIndexType as a, type SearchScopeOptions as a$, type GraphAlgorithms as a0, type GraphEdgeCollections as a1, type GraphNodeCollections as a2, type HistorySafeBackend as a3, type HistorySafeTransactionBackend as a4, type HistoryStoreOptions as a5, type HistoryTransactionContext as a6, type HistoryWithTransactionUnavailable as a7, type HookContext as a8, type HybridFulltextOptions as a9, type OperationHookContext as aA, type PaginateOptions as aB, type PaginatedResult as aC, type PathNode as aD, type Predicate as aE, PreparedQuery as aF, type PropsAccessor as aG, type QueryHookContext as aH, type QueryOptions as aI, type ReachableNode as aJ, type ReachableOptions as aK, type RebuildFulltextOptions as aL, type RebuildFulltextResult as aM, type ReclaimedVectorFieldEntry as aN, type RecordedInstant as aO, type RecordedReadStore as aP, RecordedStoreView as aQ, type RecordedStoreViewEdgeCollection as aR, type RecordedStoreViewEdgeCollections as aS, type RecordedStoreViewNodeCollection as aT, type RecordedStoreViewNodeCollections as aU, type RecursiveTraversalOptions as aV, type ReembedFunction as aW, type ReembedVectorFieldOptions as aX, type ReembedVectorFieldResult as aY, type SchemaIntrospection as aZ, type ScopedMeasure as a_, type HybridSearchHit as aa, type HybridSearchOptions as ab, type HybridVectorOptions as ac, type IfExistsMode as ad, type InitialQueryBuilder as ae, type KindIntrospection as af, type LiveStoreOptions as ag, type MaterializeRemovalsEntry as ah, type MaterializeRemovalsOptions as ai, type MaterializeRemovalsResult as aj, type MeasurableHistoryTransactionContext as ak, type MeasurableTransactionContext as al, type NeighborsOptions as am, type NoRecordedCoordinate as an, type NodeAccessor as ao, type NodeAlias as ap, type NodeBulkFindByIndexOptions as aq, type NodeCollection as ar, type NodeCurrentReads as as, type NodeGetOrCreateByConstraintOptions as at, type NodeGetOrCreateByConstraintResult as au, type NodeIdentifier as av, type NodeRef as aw, type NodeTemporalReads as ax, type NodeWrites as ay, type OntologyIntrospection as az, type EdgeAliasMap as b,
|
|
5390
|
+
export { type GetOrCreateAction as $, type AliasMap as A, type BaseTraversalOptions as B, type ConstraintNames as C, DEFAULT_SEARCHABLE_LANGUAGE as D, type EmbeddingMetric as E, type EdgeFindByEndpointsOptions as F, type EdgeGetOrCreateByEndpointsOptions as G, type HistoryStore as H, type EdgeGetOrCreateByEndpointsResult as I, type EdgeIntrospection as J, type EdgeTemporalReads as K, type EdgeWrites as L, type EmbeddingSchema as M, type Node as N, type EmbeddingValue as O, type EmptyAliasMap as P, type QueryCoordinateState as Q, type RecursiveAliasMap as R, Store as S, TraversalBuilder as T, type UniqueIntrospection as U, type EmptyEdgeAliasMap as V, ExecutableAggregateQuery as W, ExecutableQuery as X, type FieldAccessor as Y, type FulltextSearchHit as Z, type FulltextSearchOptions as _, type EmbeddingIndexType as a, type SearchScopeOptions as a$, type GraphAlgorithms as a0, type GraphEdgeCollections as a1, type GraphNodeCollections as a2, type HistorySafeBackend as a3, type HistorySafeTransactionBackend as a4, type HistoryStoreOptions as a5, type HistoryTransactionContext as a6, type HistoryWithTransactionUnavailable as a7, type HookContext as a8, type HybridFulltextOptions as a9, type OperationHookContext as aA, type PaginateOptions as aB, type PaginatedResult as aC, type PathNode as aD, type Predicate as aE, PreparedQuery as aF, type PropsAccessor as aG, type QueryHookContext as aH, type QueryOptions as aI, type ReachableNode as aJ, type ReachableOptions as aK, type RebuildFulltextOptions as aL, type RebuildFulltextResult as aM, type ReclaimedVectorFieldEntry as aN, type RecordedInstant as aO, type RecordedReadStore as aP, RecordedStoreView as aQ, type RecordedStoreViewEdgeCollection as aR, type RecordedStoreViewEdgeCollections as aS, type RecordedStoreViewNodeCollection as aT, type RecordedStoreViewNodeCollections as aU, type RecursiveTraversalOptions as aV, type ReembedFunction as aW, type ReembedVectorFieldOptions as aX, type ReembedVectorFieldResult as aY, type SchemaIntrospection as aZ, type ScopedMeasure as a_, type HybridSearchHit as aa, type HybridSearchOptions as ab, type HybridVectorOptions as ac, type IfExistsMode as ad, type InitialQueryBuilder as ae, type KindIntrospection as af, type LiveStoreOptions as ag, type MaterializeRemovalsEntry as ah, type MaterializeRemovalsOptions as ai, type MaterializeRemovalsResult as aj, type MeasurableHistoryTransactionContext as ak, type MeasurableTransactionContext as al, type NeighborsOptions as am, type NoRecordedCoordinate as an, type NodeAccessor as ao, type NodeAlias as ap, type NodeBulkFindByIndexOptions as aq, type NodeCollection as ar, type NodeCurrentReads as as, type NodeGetOrCreateByConstraintOptions as at, type NodeGetOrCreateByConstraintResult as au, type NodeIdentifier as av, type NodeRef as aw, type NodeTemporalReads as ax, type NodeWrites as ay, type OntologyIntrospection as az, type EdgeAliasMap as b, getSearchableMetadata as b$, type SearchableMetadata as b0, type SearchableOptions as b1, type SearchableSchema as b2, type SelectContext as b3, type SelectableEdge as b4, type SelectableNode as b5, type ShortestPathOptions as b6, type ShortestPathResult as b7, type SqlAvailability as b8, type StoreHooks as b9, type TemporalAlgorithmOptions as bA, type TransactionContext as bB, type TransactionOutcome as bC, type TransactionReceipt as bD, type TraversalDirection as bE, type TypedEdgeCollection as bF, type TypedRecordedStoreViewEdgeCollection as bG, type TypedStoreViewEdgeCollection as bH, UnionableQuery as bI, type UpdateEdgeInput as bJ, type UpdateNodeInput as bK, type VectorSearchHit as bL, type VectorSearchOptions as bM, type WeaklyConnectedComponentMembership as bN, type WeaklyConnectedComponentsOptions as bO, type WeightedShortestPathOptions as bP, type WeightedShortestPathResult as bQ, asRecordedInstant as bR, createQueryBuilder as bS, createStore as bT, createStoreWithSchema as bU, createVerifiedStore as bV, defineSubgraphProject as bW, embedding as bX, exists as bY, fieldRef as bZ, getEmbeddingDimensions as b_, type StoreOptions as ba, type StoreProjection as bb, type StoreRef as bc, StoreSearch as bd, StoreView as be, type StoreViewCanReachOptions as bf, type StoreViewCoordinate as bg, type StoreViewDegreeOptions as bh, type StoreViewEdgeCollection as bi, type StoreViewEdgeCollections as bj, type StoreViewGraphAlgorithms as bk, type StoreViewNeighborsOptions as bl, type StoreViewNodeCollection as bm, type StoreViewNodeCollections as bn, type StoreViewReachableOptions as bo, type StoreViewShortestPathOptions as bp, type StoreViewSubgraphOptions as bq, type StoreViewWeaklyConnectedComponentsOptions as br, type StoreViewWeightedShortestPathOptions as bs, type StreamOptions as bt, type SubgraphEdgeResult as bu, type SubgraphNodeResult as bv, type SubgraphOptions as bw, type SubgraphResult as bx, type SubsetEdge as by, type SubsetNode as bz, QueryBuilder as c, inSubquery as c0, isEmbeddingSchema as c1, isParameterRef as c2, isSearchableSchema as c3, notExists as c4, notInSubquery as c5, param as c6, resolveGraphVectorSlots as c7, searchable as c8, type EmptyRecursiveAliasMap as d, type AggregateResult as e, type AlgorithmCyclePolicy as f, type AnyEdge as g, type AnyNode as h, type BatchResults as i, type BatchableQuery as j, type CreateEdgeInput as k, type CreateNodeInput as l, type DegreeOptions as m, type DynamicEdgeAccessor as n, type DynamicEdgeCollection as o, type DynamicEdgeType as p, type DynamicFieldBuilder as q, type DynamicNodeAccessor as r, type DynamicNodeCollection as s, type DynamicNodeType as t, type DynamicSelectableEdge as u, type DynamicSelectableNode as v, type Edge as w, type EdgeAccessor as x, type EdgeBatchReads as y, type EdgeCollection as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as KindEntity } from './extension-types-
|
|
2
|
-
import { J as JsonPointer } from './fulltext-strategy-
|
|
1
|
+
import { K as KindEntity } from './extension-types-BM2ACfYO.cjs';
|
|
2
|
+
import { J as JsonPointer } from './fulltext-strategy-C27vXaeB.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* QueryProfiler types.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as KindEntity } from './extension-types-
|
|
2
|
-
import { J as JsonPointer } from './fulltext-strategy-
|
|
1
|
+
import { K as KindEntity } from './extension-types-BM2ACfYO.js';
|
|
2
|
+
import { J as JsonPointer } from './fulltext-strategy-DebsMrqg.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* QueryProfiler types.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { A as AnyEdgeType, N as NodeType } from './extension-types-BM2ACfYO.js';
|
|
2
|
+
import { d as EdgeIndexConfig, E as EdgeIndexDeclaration, l as NodeIndexConfig, N as NodeIndexDeclaration, i as IndexWhereExpression } from './fulltext-strategy-DebsMrqg.js';
|
|
3
|
+
|
|
4
|
+
declare function defineNodeIndex<N extends NodeType>(node: N, config: NodeIndexConfig<N>): NodeIndexDeclaration;
|
|
5
|
+
declare function defineEdgeIndex<E extends AnyEdgeType>(edge: E, config: EdgeIndexConfig<E>): EdgeIndexDeclaration;
|
|
6
|
+
|
|
7
|
+
/** The TypeGraph relations that carry system indexes. */
|
|
8
|
+
type SystemIndexTable = "nodes" | "edges" | "recordedNodes" | "recordedEdges";
|
|
9
|
+
type LiveColumn = "graph_id" | "kind" | "id" | "deleted_at" | "valid_from" | "valid_to" | "created_at";
|
|
10
|
+
type LiveEdgeColumn = LiveColumn | "from_kind" | "from_id" | "to_kind" | "to_id";
|
|
11
|
+
type RecordedColumn = "graph_id" | "kind" | "id" | "valid_from" | "valid_to" | "recorded_from" | "recorded_to";
|
|
12
|
+
type RecordedEdgeColumn = RecordedColumn | "from_kind" | "from_id" | "to_kind" | "to_id";
|
|
13
|
+
type SystemIndexColumnsFor<T extends SystemIndexTable> = T extends "nodes" ? LiveColumn : T extends "edges" ? LiveEdgeColumn : T extends "recordedNodes" ? RecordedColumn : RecordedEdgeColumn;
|
|
14
|
+
type SystemIndexDeclarationFor<T extends SystemIndexTable> = Readonly<{
|
|
15
|
+
table: T;
|
|
16
|
+
/** Physical index name is `${physicalTableName}_${suffix}`. */
|
|
17
|
+
suffix: string;
|
|
18
|
+
columns: readonly [SystemIndexColumnsFor<T>, ...SystemIndexColumnsFor<T>[]];
|
|
19
|
+
}>;
|
|
20
|
+
type SystemIndexDeclaration = SystemIndexDeclarationFor<"nodes"> | SystemIndexDeclarationFor<"edges"> | SystemIndexDeclarationFor<"recordedNodes"> | SystemIndexDeclarationFor<"recordedEdges">;
|
|
21
|
+
declare const SYSTEM_INDEX_DECLARATIONS: readonly SystemIndexDeclaration[];
|
|
22
|
+
/**
|
|
23
|
+
* Runtime DDL for one system index — byte-compatible with the index the
|
|
24
|
+
* bootstrap path creates from the Drizzle schema (same name, same
|
|
25
|
+
* columns), plus `CONCURRENTLY` where the dialect supports building
|
|
26
|
+
* without blocking writes.
|
|
27
|
+
*/
|
|
28
|
+
declare function generateSystemIndexDDL(declaration: SystemIndexDeclaration, physicalTableName: string, options: Readonly<{
|
|
29
|
+
concurrent: boolean;
|
|
30
|
+
}>): string;
|
|
31
|
+
|
|
32
|
+
declare function andWhere(...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]): IndexWhereExpression;
|
|
33
|
+
declare function orWhere(...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]): IndexWhereExpression;
|
|
34
|
+
declare function notWhere(predicate: IndexWhereExpression): IndexWhereExpression;
|
|
35
|
+
|
|
36
|
+
export { SYSTEM_INDEX_DECLARATIONS as S, type SystemIndexDeclaration as a, type SystemIndexTable as b, andWhere as c, defineEdgeIndex as d, defineNodeIndex as e, generateSystemIndexDDL as g, notWhere as n, orWhere as o };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { A as AnyEdgeType, N as NodeType } from './extension-types-BM2ACfYO.cjs';
|
|
2
|
+
import { d as EdgeIndexConfig, E as EdgeIndexDeclaration, l as NodeIndexConfig, N as NodeIndexDeclaration, i as IndexWhereExpression } from './fulltext-strategy-C27vXaeB.cjs';
|
|
3
|
+
|
|
4
|
+
declare function defineNodeIndex<N extends NodeType>(node: N, config: NodeIndexConfig<N>): NodeIndexDeclaration;
|
|
5
|
+
declare function defineEdgeIndex<E extends AnyEdgeType>(edge: E, config: EdgeIndexConfig<E>): EdgeIndexDeclaration;
|
|
6
|
+
|
|
7
|
+
/** The TypeGraph relations that carry system indexes. */
|
|
8
|
+
type SystemIndexTable = "nodes" | "edges" | "recordedNodes" | "recordedEdges";
|
|
9
|
+
type LiveColumn = "graph_id" | "kind" | "id" | "deleted_at" | "valid_from" | "valid_to" | "created_at";
|
|
10
|
+
type LiveEdgeColumn = LiveColumn | "from_kind" | "from_id" | "to_kind" | "to_id";
|
|
11
|
+
type RecordedColumn = "graph_id" | "kind" | "id" | "valid_from" | "valid_to" | "recorded_from" | "recorded_to";
|
|
12
|
+
type RecordedEdgeColumn = RecordedColumn | "from_kind" | "from_id" | "to_kind" | "to_id";
|
|
13
|
+
type SystemIndexColumnsFor<T extends SystemIndexTable> = T extends "nodes" ? LiveColumn : T extends "edges" ? LiveEdgeColumn : T extends "recordedNodes" ? RecordedColumn : RecordedEdgeColumn;
|
|
14
|
+
type SystemIndexDeclarationFor<T extends SystemIndexTable> = Readonly<{
|
|
15
|
+
table: T;
|
|
16
|
+
/** Physical index name is `${physicalTableName}_${suffix}`. */
|
|
17
|
+
suffix: string;
|
|
18
|
+
columns: readonly [SystemIndexColumnsFor<T>, ...SystemIndexColumnsFor<T>[]];
|
|
19
|
+
}>;
|
|
20
|
+
type SystemIndexDeclaration = SystemIndexDeclarationFor<"nodes"> | SystemIndexDeclarationFor<"edges"> | SystemIndexDeclarationFor<"recordedNodes"> | SystemIndexDeclarationFor<"recordedEdges">;
|
|
21
|
+
declare const SYSTEM_INDEX_DECLARATIONS: readonly SystemIndexDeclaration[];
|
|
22
|
+
/**
|
|
23
|
+
* Runtime DDL for one system index — byte-compatible with the index the
|
|
24
|
+
* bootstrap path creates from the Drizzle schema (same name, same
|
|
25
|
+
* columns), plus `CONCURRENTLY` where the dialect supports building
|
|
26
|
+
* without blocking writes.
|
|
27
|
+
*/
|
|
28
|
+
declare function generateSystemIndexDDL(declaration: SystemIndexDeclaration, physicalTableName: string, options: Readonly<{
|
|
29
|
+
concurrent: boolean;
|
|
30
|
+
}>): string;
|
|
31
|
+
|
|
32
|
+
declare function andWhere(...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]): IndexWhereExpression;
|
|
33
|
+
declare function orWhere(...predicates: [IndexWhereExpression, ...IndexWhereExpression[]]): IndexWhereExpression;
|
|
34
|
+
declare function notWhere(predicate: IndexWhereExpression): IndexWhereExpression;
|
|
35
|
+
|
|
36
|
+
export { SYSTEM_INDEX_DECLARATIONS as S, type SystemIndexDeclaration as a, type SystemIndexTable as b, andWhere as c, defineEdgeIndex as d, defineNodeIndex as e, generateSystemIndexDDL as g, notWhere as n, orWhere as o };
|