@nicia-ai/typegraph 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/drizzle/indexes.d.cts +1 -1
- package/dist/backend/drizzle/indexes.d.ts +1 -1
- package/dist/backend/index.d.cts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/postgres/index.d.cts +5 -5
- package/dist/backend/postgres/index.d.ts +5 -5
- package/dist/backend/postgres/pglite-store.cjs +3 -3
- package/dist/backend/postgres/pglite-store.d.cts +5 -5
- package/dist/backend/postgres/pglite-store.d.ts +5 -5
- package/dist/backend/postgres/pglite-store.js +2 -2
- package/dist/backend/postgres/pglite.d.cts +2 -2
- package/dist/backend/postgres/pglite.d.ts +2 -2
- package/dist/backend/sqlite/index.d.cts +5 -5
- package/dist/backend/sqlite/index.d.ts +5 -5
- package/dist/backend/sqlite/libsql.d.cts +2 -2
- package/dist/backend/sqlite/libsql.d.ts +2 -2
- package/dist/backend/sqlite/local-store.cjs +3 -3
- package/dist/backend/sqlite/local-store.d.cts +5 -5
- package/dist/backend/sqlite/local-store.d.ts +5 -5
- package/dist/backend/sqlite/local-store.js +2 -2
- package/dist/backend/sqlite/local.d.cts +2 -2
- package/dist/backend/sqlite/local.d.ts +2 -2
- package/dist/{chunk-K4FB2RMO.cjs → chunk-JP5EICR6.cjs} +7 -2
- package/dist/chunk-JP5EICR6.cjs.map +1 -0
- package/dist/chunk-KOI7UEI5.js +81 -0
- package/dist/chunk-KOI7UEI5.js.map +1 -0
- package/dist/{chunk-H6I36MGT.cjs → chunk-LOKG3KQV.cjs} +114 -37
- package/dist/chunk-LOKG3KQV.cjs.map +1 -0
- package/dist/{chunk-3BL3JFHL.js → chunk-MQBF3XGY.js} +82 -5
- package/dist/chunk-MQBF3XGY.js.map +1 -0
- package/dist/chunk-QCKD3RCI.cjs +83 -0
- package/dist/chunk-QCKD3RCI.cjs.map +1 -0
- package/dist/{chunk-CU3LPYNB.js → chunk-V3S74J44.js} +7 -3
- package/dist/chunk-V3S74J44.js.map +1 -0
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/{ddl-KnCdF_le.d.cts → ddl-BCXFRLWg.d.cts} +3 -3
- package/dist/{ddl-BLEzHw6j.d.ts → ddl-ByLmGgn9.d.ts} +3 -3
- package/dist/{define-graph-DQnj3fNH.d.ts → define-graph-BSviZubs.d.ts} +1 -1
- package/dist/{define-graph-Cv3CFwKm.d.cts → define-graph-XyJheaFm.d.cts} +1 -1
- package/dist/graph-merge/index.cjs +5 -5
- package/dist/graph-merge/index.d.cts +5 -5
- package/dist/graph-merge/index.d.ts +5 -5
- package/dist/graph-merge/index.js +2 -2
- package/dist/index.cjs +58 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/interchange/index.d.cts +5 -5
- package/dist/interchange/index.d.ts +5 -5
- package/dist/{manager-DjE6Mhag.d.ts → manager-C7iC5bk_.d.ts} +27 -3
- package/dist/{manager-mqee5MVB.d.cts → manager-Dm6MCYO7.d.cts} +27 -3
- package/dist/{postgres-Bm4DyFQU.d.cts → postgres-Cb6ceh4-.d.ts} +1 -1
- package/dist/{postgres-DtaVALOZ.d.ts → postgres-DZxwzCQ8.d.cts} +1 -1
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/provenance/index.d.cts +5 -5
- package/dist/provenance/index.d.ts +5 -5
- package/dist/schema/index.cjs +29 -95
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +55 -55
- package/dist/schema/index.d.ts +55 -55
- package/dist/schema/index.js +2 -80
- package/dist/schema/index.js.map +1 -1
- package/dist/{searchable-ChJ29MCd.d.ts → searchable-Cet4Oztt.d.ts} +2 -2
- package/dist/{searchable-BxlJQVFw.d.cts → searchable-aUaKh3_r.d.cts} +2 -2
- package/dist/{sqlite-m9Izphk_.d.ts → sqlite-Cb3Ilj9_.d.ts} +1 -1
- package/dist/{sqlite-DT6tTHOG.d.cts → sqlite-Dxklpizv.d.cts} +1 -1
- package/dist/{store-view-CagdeyNn.d.ts → store-view-BDjGFjpN.d.ts} +64 -13
- package/dist/{store-view-C-buB8Q8.d.cts → store-view-PCT7vTKH.d.cts} +64 -13
- package/dist/{types-CYdXzZef.d.ts → types-CFZiEEPh.d.ts} +1 -1
- package/dist/{types-CqSfMRW3.d.cts → types-CsaG00wS.d.cts} +1 -1
- package/dist/{types-D8szWDUo.d.ts → types-D-vOo_pM.d.ts} +1 -1
- package/dist/{types-C5pZeKTl.d.cts → types-ho4DJJb_.d.cts} +1 -1
- package/dist/{where-sQL4u5h-.d.ts → where-DLYaXa4L.d.ts} +1 -1
- package/dist/{where-C3-HRgUq.d.cts → where-udes1WRA.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-3BL3JFHL.js.map +0 -1
- package/dist/chunk-CU3LPYNB.js.map +0 -1
- package/dist/chunk-H6I36MGT.cjs.map +0 -1
- package/dist/chunk-K4FB2RMO.cjs.map +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { KindRegistry, validateImpliesEndpointCompatibility } from './chunk-V3S74J44.js';
|
|
2
|
+
|
|
3
|
+
// src/schema/deserializer.ts
|
|
4
|
+
function deserializeSchema(schema) {
|
|
5
|
+
const nodeNames = Object.keys(schema.nodes);
|
|
6
|
+
const edgeNames = Object.keys(schema.edges);
|
|
7
|
+
const metaEdgeNames = Object.keys(schema.ontology.metaEdges);
|
|
8
|
+
return {
|
|
9
|
+
graphId: schema.graphId,
|
|
10
|
+
version: schema.version,
|
|
11
|
+
generatedAt: schema.generatedAt,
|
|
12
|
+
getNode: (name) => schema.nodes[name],
|
|
13
|
+
getNodeNames: () => nodeNames,
|
|
14
|
+
getEdge: (name) => schema.edges[name],
|
|
15
|
+
getEdgeNames: () => edgeNames,
|
|
16
|
+
getMetaEdge: (name) => schema.ontology.metaEdges[name],
|
|
17
|
+
getMetaEdgeNames: () => metaEdgeNames,
|
|
18
|
+
getRelations: () => schema.ontology.relations,
|
|
19
|
+
getClosures: () => schema.ontology.closures,
|
|
20
|
+
getDefaults: () => schema.defaults,
|
|
21
|
+
getRaw: () => schema,
|
|
22
|
+
buildRegistry: () => buildRegistryFromClosures(schema)
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function buildRegistryFromClosures(schema) {
|
|
26
|
+
const { closures } = schema.ontology;
|
|
27
|
+
const subClassAncestors = recordToMap(closures.subClassAncestors);
|
|
28
|
+
const subClassDescendants = recordToMap(closures.subClassDescendants);
|
|
29
|
+
const broaderClosure = recordToMap(closures.broaderClosure);
|
|
30
|
+
const narrowerClosure = recordToMap(closures.narrowerClosure);
|
|
31
|
+
const equivalenceSets = recordToMap(closures.equivalenceSets);
|
|
32
|
+
const partOfClosure = recordToMap(closures.partOfClosure);
|
|
33
|
+
const hasPartClosure = recordToMap(closures.hasPartClosure);
|
|
34
|
+
const iriToKind = simpleRecordToMap(closures.iriToKind);
|
|
35
|
+
const disjointPairs = new Set(closures.disjointPairs);
|
|
36
|
+
const edgeInverses = simpleRecordToMap(closures.edgeInverses);
|
|
37
|
+
const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);
|
|
38
|
+
const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);
|
|
39
|
+
const nodeKinds = /* @__PURE__ */ new Map();
|
|
40
|
+
const edgeKinds = /* @__PURE__ */ new Map();
|
|
41
|
+
const registry = new KindRegistry(nodeKinds, edgeKinds, {
|
|
42
|
+
subClassAncestors,
|
|
43
|
+
subClassDescendants,
|
|
44
|
+
broaderClosure,
|
|
45
|
+
narrowerClosure,
|
|
46
|
+
equivalenceSets,
|
|
47
|
+
iriToKind,
|
|
48
|
+
disjointPairs,
|
|
49
|
+
partOfClosure,
|
|
50
|
+
hasPartClosure,
|
|
51
|
+
edgeInverses,
|
|
52
|
+
edgeImplicationsClosure,
|
|
53
|
+
edgeImplyingClosure
|
|
54
|
+
});
|
|
55
|
+
validateImpliesEndpointCompatibility(
|
|
56
|
+
buildEdgeEndpointKinds(schema.edges),
|
|
57
|
+
registry
|
|
58
|
+
);
|
|
59
|
+
return registry;
|
|
60
|
+
}
|
|
61
|
+
function buildEdgeEndpointKinds(edges) {
|
|
62
|
+
const result = /* @__PURE__ */ new Map();
|
|
63
|
+
for (const [kind, def] of Object.entries(edges)) {
|
|
64
|
+
result.set(kind, { from: def.fromKinds, to: def.toKinds });
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
function recordToMap(record) {
|
|
69
|
+
const result = /* @__PURE__ */ new Map();
|
|
70
|
+
for (const [key, values] of Object.entries(record)) {
|
|
71
|
+
result.set(key, new Set(values));
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
function simpleRecordToMap(record) {
|
|
76
|
+
return new Map(Object.entries(record));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { deserializeSchema };
|
|
80
|
+
//# sourceMappingURL=chunk-KOI7UEI5.js.map
|
|
81
|
+
//# sourceMappingURL=chunk-KOI7UEI5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schema/deserializer.ts"],"names":[],"mappings":"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","file":"chunk-KOI7UEI5.js","sourcesContent":["/**\n * Schema deserializer for loading stored schemas.\n *\n * Reconstructs runtime objects from SerializedSchema.\n * Note: Zod schemas cannot be fully reconstructed from JSON Schema,\n * so this provides access to the serialized data for introspection.\n */\nimport { KindRegistry } from \"../registry/kind-registry\";\nimport {\n type EdgeEndpointKinds,\n validateImpliesEndpointCompatibility,\n} from \"../registry/validate-implies\";\nimport {\n type SerializedClosures,\n type SerializedEdgeDef,\n type SerializedMetaEdge,\n type SerializedNodeDef,\n type SerializedOntologyRelation,\n type SerializedSchema,\n} from \"./types\";\n\n// ============================================================\n// Deserialized Schema\n// ============================================================\n\n/**\n * A deserialized schema provides read-only access to schema metadata.\n *\n * Note: Unlike the original GraphDef, this does not include Zod schemas\n * since those cannot be reconstructed from JSON Schema. Use this for\n * introspection and metadata access only.\n */\nexport type DeserializedSchema = Readonly<{\n graphId: string;\n version: number;\n generatedAt: string;\n\n /** Get node definition by name */\n getNode: (name: string) => SerializedNodeDef | undefined;\n\n /** Get all node names */\n getNodeNames: () => readonly string[];\n\n /** Get edge definition by name */\n getEdge: (name: string) => SerializedEdgeDef | undefined;\n\n /** Get all edge names */\n getEdgeNames: () => readonly string[];\n\n /** Get meta-edge definition by name */\n getMetaEdge: (name: string) => SerializedMetaEdge | undefined;\n\n /** Get all meta-edge names */\n getMetaEdgeNames: () => readonly string[];\n\n /** Get all ontology relations */\n getRelations: () => readonly SerializedOntologyRelation[];\n\n /** Get precomputed closures */\n getClosures: () => SerializedClosures;\n\n /** Get graph defaults */\n getDefaults: () => SerializedSchema[\"defaults\"];\n\n /** Get the raw serialized schema */\n getRaw: () => SerializedSchema;\n\n /** Build a KindRegistry from the closures */\n buildRegistry: () => KindRegistry;\n}>;\n\n// ============================================================\n// Deserialization\n// ============================================================\n\n/**\n * Deserializes a SerializedSchema into a DeserializedSchema.\n *\n * @param schema - The serialized schema to deserialize\n * @returns A deserialized schema with accessor methods\n */\nexport function deserializeSchema(\n schema: SerializedSchema,\n): DeserializedSchema {\n const nodeNames = Object.keys(schema.nodes);\n const edgeNames = Object.keys(schema.edges);\n const metaEdgeNames = Object.keys(schema.ontology.metaEdges);\n\n return {\n graphId: schema.graphId,\n version: schema.version,\n generatedAt: schema.generatedAt,\n\n getNode: (name) => schema.nodes[name],\n getNodeNames: () => nodeNames,\n\n getEdge: (name) => schema.edges[name],\n getEdgeNames: () => edgeNames,\n\n getMetaEdge: (name) => schema.ontology.metaEdges[name],\n getMetaEdgeNames: () => metaEdgeNames,\n\n getRelations: () => schema.ontology.relations,\n getClosures: () => schema.ontology.closures,\n\n getDefaults: () => schema.defaults,\n getRaw: () => schema,\n\n buildRegistry: () => buildRegistryFromClosures(schema),\n };\n}\n\n// ============================================================\n// Registry Building\n// ============================================================\n\n/**\n * Builds a KindRegistry from serialized closures.\n *\n * This allows query execution without recomputing closures.\n */\nfunction buildRegistryFromClosures(schema: SerializedSchema): KindRegistry {\n const { closures } = schema.ontology;\n\n // Convert Record<string, string[]> back to Map<string, Set<string>>\n const subClassAncestors = recordToMap(closures.subClassAncestors);\n const subClassDescendants = recordToMap(closures.subClassDescendants);\n const broaderClosure = recordToMap(closures.broaderClosure);\n const narrowerClosure = recordToMap(closures.narrowerClosure);\n const equivalenceSets = recordToMap(closures.equivalenceSets);\n const partOfClosure = recordToMap(closures.partOfClosure);\n const hasPartClosure = recordToMap(closures.hasPartClosure);\n const iriToKind = simpleRecordToMap(closures.iriToKind);\n const disjointPairs = new Set(closures.disjointPairs);\n const edgeInverses = simpleRecordToMap(closures.edgeInverses);\n const edgeImplicationsClosure = recordToMap(closures.edgeImplicationsClosure);\n const edgeImplyingClosure = recordToMap(closures.edgeImplyingClosure);\n\n // Build empty node/edge kind maps (we don't have the actual Zod schemas)\n const nodeKinds = new Map();\n const edgeKinds = new Map();\n\n const registry = new KindRegistry(nodeKinds, edgeKinds, {\n subClassAncestors,\n subClassDescendants,\n broaderClosure,\n narrowerClosure,\n equivalenceSets,\n iriToKind,\n disjointPairs,\n partOfClosure,\n hasPartClosure,\n edgeInverses,\n edgeImplicationsClosure,\n edgeImplyingClosure,\n });\n\n validateImpliesEndpointCompatibility(\n buildEdgeEndpointKinds(schema.edges),\n registry,\n );\n\n return registry;\n}\n\n/**\n * Maps each edge kind's serialized definition to its domain/range kind\n * names, for `validateImpliesEndpointCompatibility`. A `Map` (rather than\n * the plain `schema.edges` object) so a lookup for an edge kind literally\n * named \"toString\" or another `Object.prototype` member can't resolve to\n * an inherited member instead of `undefined`.\n */\nfunction buildEdgeEndpointKinds(\n edges: Record<string, SerializedEdgeDef>,\n): ReadonlyMap<string, EdgeEndpointKinds> {\n const result = new Map<string, EdgeEndpointKinds>();\n for (const [kind, def] of Object.entries(edges)) {\n result.set(kind, { from: def.fromKinds, to: def.toKinds });\n }\n return result;\n}\n\n/**\n * Converts Record<string, string[]> to Map<string, Set<string>>.\n */\nfunction recordToMap(\n record: Record<string, readonly string[]>,\n): ReadonlyMap<string, ReadonlySet<string>> {\n const result = new Map<string, Set<string>>();\n for (const [key, values] of Object.entries(record)) {\n result.set(key, new Set(values));\n }\n return result;\n}\n\n/**\n * Converts Record<string, string> to Map<string, string>.\n */\nfunction simpleRecordToMap(\n record: Record<string, string>,\n): ReadonlyMap<string, string> {\n return new Map(Object.entries(record));\n}\n"]}
|
|
@@ -8,7 +8,7 @@ var chunkZDH3DX3C_cjs = require('./chunk-ZDH3DX3C.cjs');
|
|
|
8
8
|
var chunkJZYMOHHM_cjs = require('./chunk-JZYMOHHM.cjs');
|
|
9
9
|
var chunkQYDUCWD2_cjs = require('./chunk-QYDUCWD2.cjs');
|
|
10
10
|
var chunkLL5D5T5W_cjs = require('./chunk-LL5D5T5W.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkJP5EICR6_cjs = require('./chunk-JP5EICR6.cjs');
|
|
12
12
|
var chunkRW24SAHI_cjs = require('./chunk-RW24SAHI.cjs');
|
|
13
13
|
var chunkX4PVHAZ6_cjs = require('./chunk-X4PVHAZ6.cjs');
|
|
14
14
|
var chunkACSVZPK7_cjs = require('./chunk-ACSVZPK7.cjs');
|
|
@@ -10710,7 +10710,7 @@ function planRemovals(graph, names) {
|
|
|
10710
10710
|
if (namesSet.size === 0) {
|
|
10711
10711
|
return { document, removedNodeKinds: [], removedEdgeKinds: [] };
|
|
10712
10712
|
}
|
|
10713
|
-
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } =
|
|
10713
|
+
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkJP5EICR6_cjs.extensionKindNames(document);
|
|
10714
10714
|
const compileTimeNodeNames = new Set(
|
|
10715
10715
|
Object.keys(graph.nodes).filter((name) => !runtimeNodeNames.has(name))
|
|
10716
10716
|
);
|
|
@@ -10810,8 +10810,8 @@ function planRemovals(graph, names) {
|
|
|
10810
10810
|
function stripGraphExtension(graph) {
|
|
10811
10811
|
const document = graph.extension;
|
|
10812
10812
|
if (document === void 0) return graph;
|
|
10813
|
-
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } =
|
|
10814
|
-
const runtimeOntologyKeys =
|
|
10813
|
+
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkJP5EICR6_cjs.extensionKindNames(document);
|
|
10814
|
+
const runtimeOntologyKeys = chunkJP5EICR6_cjs.buildGraphExtensionOntologyKeySet(document);
|
|
10815
10815
|
const compileNodes = {};
|
|
10816
10816
|
for (const [name, registration] of Object.entries(graph.nodes)) {
|
|
10817
10817
|
if (runtimeNodeNames.has(name)) continue;
|
|
@@ -10823,7 +10823,7 @@ function stripGraphExtension(graph) {
|
|
|
10823
10823
|
compileEdges[name] = registration;
|
|
10824
10824
|
}
|
|
10825
10825
|
const compileOntology = graph.ontology.filter(
|
|
10826
|
-
(relation) => !runtimeOntologyKeys.has(
|
|
10826
|
+
(relation) => !runtimeOntologyKeys.has(chunkJP5EICR6_cjs.compileTimeOntologyKey(relation))
|
|
10827
10827
|
);
|
|
10828
10828
|
const compileIndexes = (graph.indexes ?? []).filter(
|
|
10829
10829
|
(index) => index.origin !== "runtime"
|
|
@@ -10863,11 +10863,11 @@ function buildCompileTimeReferentIndex(graph, runtimeEdgeNames) {
|
|
|
10863
10863
|
append(endpoint.kind, referent);
|
|
10864
10864
|
}
|
|
10865
10865
|
}
|
|
10866
|
-
const runtimeOntologyKeys =
|
|
10866
|
+
const runtimeOntologyKeys = chunkJP5EICR6_cjs.buildGraphExtensionOntologyKeySet(
|
|
10867
10867
|
graph.extension
|
|
10868
10868
|
);
|
|
10869
10869
|
for (const relation of graph.ontology) {
|
|
10870
|
-
if (runtimeOntologyKeys.has(
|
|
10870
|
+
if (runtimeOntologyKeys.has(chunkJP5EICR6_cjs.compileTimeOntologyKey(relation))) continue;
|
|
10871
10871
|
const fromName = chunkRW24SAHI_cjs.getTypeName(relation.from);
|
|
10872
10872
|
const toName = chunkRW24SAHI_cjs.getTypeName(relation.to);
|
|
10873
10873
|
const referent = {
|
|
@@ -14400,7 +14400,7 @@ function createHistoryStoreBackendProjection(backend) {
|
|
|
14400
14400
|
// src/store/introspect.ts
|
|
14401
14401
|
function introspectSchema(graph, context) {
|
|
14402
14402
|
const extension = graph.extension;
|
|
14403
|
-
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } =
|
|
14403
|
+
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunkJP5EICR6_cjs.extensionKindNames(extension);
|
|
14404
14404
|
const deprecated = graph.deprecatedKinds;
|
|
14405
14405
|
const kinds = [];
|
|
14406
14406
|
for (const [name, registration] of Object.entries(graph.nodes)) {
|
|
@@ -14411,7 +14411,7 @@ function introspectSchema(graph, context) {
|
|
|
14411
14411
|
description: reg.type.description,
|
|
14412
14412
|
annotations: reg.type.annotations,
|
|
14413
14413
|
deprecated: deprecated.has(name),
|
|
14414
|
-
properties:
|
|
14414
|
+
properties: chunkJP5EICR6_cjs.serializeSchemaProperties(reg.type.schema),
|
|
14415
14415
|
unique: (reg.unique ?? []).map((constraint) => ({
|
|
14416
14416
|
name: constraint.name,
|
|
14417
14417
|
fields: [...constraint.fields],
|
|
@@ -14432,17 +14432,17 @@ function introspectSchema(graph, context) {
|
|
|
14432
14432
|
to: reg.to.map((entry2) => entry2.kind),
|
|
14433
14433
|
cardinality: reg.cardinality ?? "many",
|
|
14434
14434
|
endpointExistence: reg.endpointExistence ?? "notDeleted",
|
|
14435
|
-
properties:
|
|
14435
|
+
properties: chunkJP5EICR6_cjs.serializeSchemaProperties(edgeType.schema),
|
|
14436
14436
|
annotations: edgeType.annotations,
|
|
14437
14437
|
deprecated: deprecated.has(name)
|
|
14438
14438
|
});
|
|
14439
14439
|
}
|
|
14440
|
-
const runtimeOntologyKeys =
|
|
14440
|
+
const runtimeOntologyKeys = chunkJP5EICR6_cjs.buildGraphExtensionOntologyKeySet(extension);
|
|
14441
14441
|
const ontology = graph.ontology.map((relation) => ({
|
|
14442
14442
|
metaEdge: relation.metaEdge.name,
|
|
14443
14443
|
from: chunkRW24SAHI_cjs.getTypeName(relation.from),
|
|
14444
14444
|
to: chunkRW24SAHI_cjs.getTypeName(relation.to),
|
|
14445
|
-
origin: runtimeOntologyKeys.has(
|
|
14445
|
+
origin: runtimeOntologyKeys.has(chunkJP5EICR6_cjs.compileTimeOntologyKey(relation)) ? "runtime" : "compile-time"
|
|
14446
14446
|
}));
|
|
14447
14447
|
return {
|
|
14448
14448
|
graphId: context.graphId,
|
|
@@ -15193,7 +15193,7 @@ async function computeIndexSignature(dialect, targetTableName, declaration) {
|
|
|
15193
15193
|
const hashable = {
|
|
15194
15194
|
dialect,
|
|
15195
15195
|
targetTableName,
|
|
15196
|
-
declaration:
|
|
15196
|
+
declaration: chunkJP5EICR6_cjs.serializeIndexDeclaration(declaration)
|
|
15197
15197
|
};
|
|
15198
15198
|
const json = JSON.stringify(hashable, chunkACSVZPK7_cjs.sortedReplacer);
|
|
15199
15199
|
return chunkZY4GXIVN_cjs.sha256Hex(json, 16);
|
|
@@ -15266,14 +15266,14 @@ async function reconcilePendingRemovals(context) {
|
|
|
15266
15266
|
const reconciliations = [];
|
|
15267
15267
|
const stopAtVersion = marker ?? 1;
|
|
15268
15268
|
let currentRow = activeRow;
|
|
15269
|
-
let currentSchema =
|
|
15269
|
+
let currentSchema = chunkJP5EICR6_cjs.parseSerializedSchema(activeRow.schema_doc);
|
|
15270
15270
|
while (currentRow.version > stopAtVersion) {
|
|
15271
15271
|
const priorRow = await backend.getSchemaVersion(
|
|
15272
15272
|
graphId,
|
|
15273
15273
|
currentRow.version - 1
|
|
15274
15274
|
);
|
|
15275
15275
|
if (priorRow === void 0) break;
|
|
15276
|
-
const priorSchema =
|
|
15276
|
+
const priorSchema = chunkJP5EICR6_cjs.parseSerializedSchema(priorRow.schema_doc);
|
|
15277
15277
|
for (const entity of ENTITY_KINDS) {
|
|
15278
15278
|
const priorEntries = priorSchema[entity === "node" ? "nodes" : "edges"];
|
|
15279
15279
|
const currentEntries = currentSchema[entity === "node" ? "nodes" : "edges"];
|
|
@@ -15442,7 +15442,7 @@ async function resolveRemovedKindEmbeddingSlots(backend, row) {
|
|
|
15442
15442
|
if (priorVersion < 1) return [];
|
|
15443
15443
|
const priorRow = await backend.getSchemaVersion(row.graphId, priorVersion);
|
|
15444
15444
|
if (priorRow === void 0) return [];
|
|
15445
|
-
const priorSchema =
|
|
15445
|
+
const priorSchema = chunkJP5EICR6_cjs.parseSerializedSchema(priorRow.schema_doc);
|
|
15446
15446
|
const slots = /* @__PURE__ */ new Map();
|
|
15447
15447
|
for (const declaration of priorSchema.indexes ?? []) {
|
|
15448
15448
|
if (declaration.entity === "vector" && declaration.kind === row.kindName) {
|
|
@@ -15472,7 +15472,7 @@ async function reclaimRemovedVectorFieldTables(context) {
|
|
|
15472
15472
|
let perBackend = reclaimCache.get(backend);
|
|
15473
15473
|
const cached = perBackend?.get(cacheKey);
|
|
15474
15474
|
if (cached !== void 0) return cached;
|
|
15475
|
-
const activeSchema =
|
|
15475
|
+
const activeSchema = chunkJP5EICR6_cjs.parseSerializedSchema(activeRow.schema_doc);
|
|
15476
15476
|
const activeVectorFields = /* @__PURE__ */ new Set();
|
|
15477
15477
|
for (const declaration of activeSchema.indexes ?? []) {
|
|
15478
15478
|
if (declaration.entity === "vector") {
|
|
@@ -15486,7 +15486,7 @@ async function reclaimRemovedVectorFieldTables(context) {
|
|
|
15486
15486
|
for (let version = activeRow.version - 1; version >= 1; version -= 1) {
|
|
15487
15487
|
const priorRow = await backend.getSchemaVersion(graphId, version);
|
|
15488
15488
|
if (priorRow === void 0) continue;
|
|
15489
|
-
const priorSchema =
|
|
15489
|
+
const priorSchema = chunkJP5EICR6_cjs.parseSerializedSchema(priorRow.schema_doc);
|
|
15490
15490
|
for (const declaration of priorSchema.indexes ?? []) {
|
|
15491
15491
|
if (declaration.entity !== "vector") continue;
|
|
15492
15492
|
const key = vectorFieldKey(declaration.kind, declaration.fieldPath);
|
|
@@ -16933,7 +16933,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
16933
16933
|
mapRecordedNodeRow: chunk7UTUKH4E_cjs.createNodeRowMapper(rowMapperConfig),
|
|
16934
16934
|
mapRecordedEdgeRow: chunk7UTUKH4E_cjs.createEdgeRowMapper(rowMapperConfig)
|
|
16935
16935
|
});
|
|
16936
|
-
this.#registry =
|
|
16936
|
+
this.#registry = chunkJP5EICR6_cjs.buildKindRegistry(graph);
|
|
16937
16937
|
this.#hooks = options?.hooks ?? {};
|
|
16938
16938
|
this.#defaultTraversalExpansion = options?.queryDefaults?.traversalExpansion ?? "inverse";
|
|
16939
16939
|
this.#options = options;
|
|
@@ -16973,6 +16973,37 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
16973
16973
|
get registry() {
|
|
16974
16974
|
return this.#registry;
|
|
16975
16975
|
}
|
|
16976
|
+
/**
|
|
16977
|
+
* An opaque, in-memory snapshot of this store's reconciled schema — the
|
|
16978
|
+
* merged compile-time + runtime-committed graph plus the committed version
|
|
16979
|
+
* it reflects. Cache it after a verified open and hand it to
|
|
16980
|
+
* {@link createAdapterStore} via `{ reconciled }` (or call
|
|
16981
|
+
* {@link AdapterStoreImplementation.withBackend}) to build request-scoped
|
|
16982
|
+
* stores against fresh connections with zero database round-trips. Refresh
|
|
16983
|
+
* it when {@link getCommittedSchemaVersion} reports a moved version.
|
|
16984
|
+
*/
|
|
16985
|
+
get reconciledSchema() {
|
|
16986
|
+
return Object.freeze({
|
|
16987
|
+
graph: this.#graph,
|
|
16988
|
+
version: this.#schemaMetadata.schemaVersion,
|
|
16989
|
+
hash: this.#schemaMetadata.schemaHash
|
|
16990
|
+
});
|
|
16991
|
+
}
|
|
16992
|
+
/**
|
|
16993
|
+
* Reconstruction inputs for a connection rebind: the merged graph, the
|
|
16994
|
+
* verbatim construction options, and the reconciled schema metadata. Lets an
|
|
16995
|
+
* adapter subclass rebuild an equivalent store against a fresh backend
|
|
16996
|
+
* without a verify round-trip.
|
|
16997
|
+
*
|
|
16998
|
+
* @internal
|
|
16999
|
+
*/
|
|
17000
|
+
reconstructionState() {
|
|
17001
|
+
return {
|
|
17002
|
+
graph: this.#graph,
|
|
17003
|
+
options: this.#options,
|
|
17004
|
+
schemaMetadata: this.#schemaMetadata
|
|
17005
|
+
};
|
|
17006
|
+
}
|
|
16976
17007
|
/**
|
|
16977
17008
|
* Whether recorded-time capture is enabled for this store.
|
|
16978
17009
|
*
|
|
@@ -18266,7 +18297,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18266
18297
|
*/
|
|
18267
18298
|
async evolve(extension, options) {
|
|
18268
18299
|
const { activeRow, baseline } = await this.#loadCaughtUp("evolve");
|
|
18269
|
-
const merged =
|
|
18300
|
+
const merged = chunkJP5EICR6_cjs.mergeGraphExtension(baseline, extension);
|
|
18270
18301
|
if (merged === baseline) {
|
|
18271
18302
|
if (baseline === this.#graph) {
|
|
18272
18303
|
syncStoreReplacementRef(options?.ref, this);
|
|
@@ -18302,7 +18333,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18302
18333
|
);
|
|
18303
18334
|
if (error !== void 0) throw error;
|
|
18304
18335
|
}
|
|
18305
|
-
const committed = await
|
|
18336
|
+
const committed = await chunkJP5EICR6_cjs.commitNewSchemaVersion(
|
|
18306
18337
|
this.#backend,
|
|
18307
18338
|
merged,
|
|
18308
18339
|
activeRow.version
|
|
@@ -18626,9 +18657,9 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18626
18657
|
);
|
|
18627
18658
|
}
|
|
18628
18659
|
const compileTimeGraph = stripGraphExtension(this.#graph);
|
|
18629
|
-
const merged = plan.document === void 0 ? compileTimeGraph :
|
|
18630
|
-
const finalGraph =
|
|
18631
|
-
const committedRow = await
|
|
18660
|
+
const merged = plan.document === void 0 ? compileTimeGraph : chunkJP5EICR6_cjs.mergeGraphExtension(compileTimeGraph, plan.document);
|
|
18661
|
+
const finalGraph = chunkJP5EICR6_cjs.applyDeprecatedKinds(merged, baseline.deprecatedKinds);
|
|
18662
|
+
const committedRow = await chunkJP5EICR6_cjs.commitNewSchemaVersion(
|
|
18632
18663
|
this.#backend,
|
|
18633
18664
|
finalGraph,
|
|
18634
18665
|
activeRow.version
|
|
@@ -18716,8 +18747,8 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18716
18747
|
schemaMetadataFromRow(activeRow)
|
|
18717
18748
|
);
|
|
18718
18749
|
}
|
|
18719
|
-
const merged =
|
|
18720
|
-
const result = await
|
|
18750
|
+
const merged = chunkJP5EICR6_cjs.applyDeprecatedKinds(baseline, nextSet);
|
|
18751
|
+
const result = await chunkJP5EICR6_cjs.ensureSchema(this.#backend, merged, {
|
|
18721
18752
|
preloaded: { activeRow, storedSchema },
|
|
18722
18753
|
autoMigrate: true
|
|
18723
18754
|
});
|
|
@@ -18726,8 +18757,8 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18726
18757
|
}
|
|
18727
18758
|
#catchUpToStored(storedSchema) {
|
|
18728
18759
|
const compileTimeGraph = stripGraphExtension(this.#graph);
|
|
18729
|
-
const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph :
|
|
18730
|
-
return
|
|
18760
|
+
const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph : chunkJP5EICR6_cjs.mergeGraphExtension(compileTimeGraph, storedSchema.extension);
|
|
18761
|
+
return chunkJP5EICR6_cjs.applyDeprecatedKinds(
|
|
18731
18762
|
withGraphExtension,
|
|
18732
18763
|
storedSchema.deprecatedKinds
|
|
18733
18764
|
);
|
|
@@ -18745,7 +18776,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18745
18776
|
* serializes the actual commit.
|
|
18746
18777
|
*/
|
|
18747
18778
|
async #loadCaughtUp(verb) {
|
|
18748
|
-
const activeRow = await
|
|
18779
|
+
const activeRow = await chunkJP5EICR6_cjs.loadActiveSchemaWithBootstrap(
|
|
18749
18780
|
this.#backend,
|
|
18750
18781
|
this.graphId
|
|
18751
18782
|
);
|
|
@@ -18756,7 +18787,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18756
18787
|
{ code }
|
|
18757
18788
|
);
|
|
18758
18789
|
}
|
|
18759
|
-
const storedSchema =
|
|
18790
|
+
const storedSchema = chunkJP5EICR6_cjs.parseSerializedSchema(activeRow.schema_doc);
|
|
18760
18791
|
const baseline = this.#catchUpToStored(storedSchema);
|
|
18761
18792
|
return { activeRow, storedSchema, baseline };
|
|
18762
18793
|
}
|
|
@@ -18952,7 +18983,7 @@ var StoreImplementation = class _StoreImplementation {
|
|
|
18952
18983
|
);
|
|
18953
18984
|
}
|
|
18954
18985
|
};
|
|
18955
|
-
var AdapterStoreImplementation = class extends StoreImplementation {
|
|
18986
|
+
var AdapterStoreImplementation = class _AdapterStoreImplementation extends StoreImplementation {
|
|
18956
18987
|
backend;
|
|
18957
18988
|
constructor(graph, backend, options, schemaMetadata) {
|
|
18958
18989
|
super(graph, backend, options, schemaMetadata, backend);
|
|
@@ -18960,6 +18991,23 @@ var AdapterStoreImplementation = class extends StoreImplementation {
|
|
|
18960
18991
|
chunkUCHW2MGP_cjs.createGraphBackendProjection(this[chunkUCHW2MGP_cjs.STORE_RUNTIME].backend)
|
|
18961
18992
|
);
|
|
18962
18993
|
}
|
|
18994
|
+
/**
|
|
18995
|
+
* Rebind this store's already-reconciled schema onto a fresh backend/
|
|
18996
|
+
* connection, returning a new equivalent store with **no** verify round-trip.
|
|
18997
|
+
* The connection is captured at construction and never mutated, so this
|
|
18998
|
+
* returns a new instance rather than rebinding in place — the serverless
|
|
18999
|
+
* per-request primitive: verify once per isolate, then `withBackend` the
|
|
19000
|
+
* per-request connection.
|
|
19001
|
+
*/
|
|
19002
|
+
withBackend(backend) {
|
|
19003
|
+
const state = this.reconstructionState();
|
|
19004
|
+
return new _AdapterStoreImplementation(
|
|
19005
|
+
state.graph,
|
|
19006
|
+
backend,
|
|
19007
|
+
state.options,
|
|
19008
|
+
state.schemaMetadata
|
|
19009
|
+
);
|
|
19010
|
+
}
|
|
18963
19011
|
async evolve(extension, options) {
|
|
18964
19012
|
return this.#withAdapterReplacement(
|
|
18965
19013
|
options?.ref,
|
|
@@ -19043,8 +19091,26 @@ function createStore(graph, backend, options) {
|
|
|
19043
19091
|
return new StoreImplementation(graph, backend, options);
|
|
19044
19092
|
}
|
|
19045
19093
|
function createAdapterStore(graph, backend, options) {
|
|
19094
|
+
const reconciled = options?.reconciled;
|
|
19095
|
+
if (reconciled !== void 0 && reconciled.graph.id !== graph.id) {
|
|
19096
|
+
throw new chunkSAFZ6JTI_cjs.ConfigurationError(
|
|
19097
|
+
`Reconciled snapshot is for graph "${reconciled.graph.id}", not "${graph.id}".`,
|
|
19098
|
+
{ code: "RECONCILED_GRAPH_MISMATCH" },
|
|
19099
|
+
{
|
|
19100
|
+
suggestion: "Pass the ReconciledSchema produced from the same graph you are building the store with; snapshots are not interchangeable across graphs."
|
|
19101
|
+
}
|
|
19102
|
+
);
|
|
19103
|
+
}
|
|
19104
|
+
const storeOptions = stripReconciledOption(options);
|
|
19105
|
+
const resolvedGraph = reconciled?.graph ?? graph;
|
|
19106
|
+
const schemaMetadata = reconciled === void 0 ? void 0 : reconciledSchemaMetadata(reconciled);
|
|
19046
19107
|
return asAdapterStoreSurface(
|
|
19047
|
-
new AdapterStoreImplementation(
|
|
19108
|
+
new AdapterStoreImplementation(
|
|
19109
|
+
resolvedGraph,
|
|
19110
|
+
backend,
|
|
19111
|
+
storeOptions,
|
|
19112
|
+
schemaMetadata
|
|
19113
|
+
)
|
|
19048
19114
|
);
|
|
19049
19115
|
}
|
|
19050
19116
|
function isKnownEdgeKind(graph, name) {
|
|
@@ -19062,6 +19128,17 @@ function schemaMetadataFromRow(row) {
|
|
|
19062
19128
|
schemaHash: row.schema_hash
|
|
19063
19129
|
});
|
|
19064
19130
|
}
|
|
19131
|
+
function reconciledSchemaMetadata(reconciled) {
|
|
19132
|
+
return Object.freeze({
|
|
19133
|
+
schemaVersion: reconciled.version,
|
|
19134
|
+
schemaHash: reconciled.hash
|
|
19135
|
+
});
|
|
19136
|
+
}
|
|
19137
|
+
function stripReconciledOption(options) {
|
|
19138
|
+
if (options === void 0 || !("reconciled" in options)) return options;
|
|
19139
|
+
const { reconciled: _reconciled, ...rest } = options;
|
|
19140
|
+
return rest;
|
|
19141
|
+
}
|
|
19065
19142
|
function schemaMetadataForResult(activeRow, result) {
|
|
19066
19143
|
if (result.status === "initialized" || result.status === "migrated") {
|
|
19067
19144
|
return schemaMetadataFromRow(result.committedRow);
|
|
@@ -19111,8 +19188,8 @@ async function prepareStoreWithSchema(graph, backend, options) {
|
|
|
19111
19188
|
graph: merged,
|
|
19112
19189
|
activeRow,
|
|
19113
19190
|
storedSchema
|
|
19114
|
-
} = await
|
|
19115
|
-
const result = await
|
|
19191
|
+
} = await chunkJP5EICR6_cjs.loadAndMergeGraphExtensionDocument(backend, graph);
|
|
19192
|
+
const result = await chunkJP5EICR6_cjs.ensureSchema(backend, merged, {
|
|
19116
19193
|
...options,
|
|
19117
19194
|
preloaded: { activeRow, storedSchema }
|
|
19118
19195
|
});
|
|
@@ -19183,7 +19260,7 @@ async function prepareVerifiedStore(graph, backend, options) {
|
|
|
19183
19260
|
graph: merged,
|
|
19184
19261
|
activeRow,
|
|
19185
19262
|
result
|
|
19186
|
-
} = await
|
|
19263
|
+
} = await chunkJP5EICR6_cjs.loadAndVerifyGraph(backend, graph);
|
|
19187
19264
|
await assertHistorySchemaOnOpen(backend, options);
|
|
19188
19265
|
return {
|
|
19189
19266
|
graph: merged,
|
|
@@ -19244,5 +19321,5 @@ exports.min = min;
|
|
|
19244
19321
|
exports.offsetFragment = offsetFragment;
|
|
19245
19322
|
exports.orderByFragment = orderByFragment;
|
|
19246
19323
|
exports.sum = sum;
|
|
19247
|
-
//# sourceMappingURL=chunk-
|
|
19248
|
-
//# sourceMappingURL=chunk-
|
|
19324
|
+
//# sourceMappingURL=chunk-LOKG3KQV.cjs.map
|
|
19325
|
+
//# sourceMappingURL=chunk-LOKG3KQV.cjs.map
|