@nicia-ai/typegraph 0.9.2 → 0.11.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/index.cjs +279 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +279 -114
- package/dist/index.js.map +1 -1
- package/dist/interchange/index.d.cts +1 -1
- package/dist/interchange/index.d.ts +1 -1
- package/dist/profiler/index.d.cts +1 -1
- package/dist/profiler/index.d.ts +1 -1
- package/dist/{store-DgzIgrmn.d.cts → store-DyGdpDFr.d.cts} +103 -3
- package/dist/{store-wqOO3GSy.d.ts → store-nQ1ATBlN.d.ts} +103 -3
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { G as GraphDef } from '../manager-DGSnJa1v.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { L as Store } from '../store-DyGdpDFr.cjs';
|
|
4
4
|
import '../types-DMzKq0d5.cjs';
|
|
5
5
|
import '../types-GLkwvQvS.cjs';
|
|
6
6
|
import 'drizzle-orm';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { G as GraphDef } from '../manager-BCLhWysp.js';
|
|
3
|
-
import {
|
|
3
|
+
import { L as Store } from '../store-nQ1ATBlN.js';
|
|
4
4
|
import '../types-DMzKq0d5.js';
|
|
5
5
|
import '../types-1YJKodRv.js';
|
|
6
6
|
import 'drizzle-orm';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { G as GraphDef } from '../manager-DGSnJa1v.cjs';
|
|
2
2
|
import { Q as QueryAst } from '../ast-Bh2NDeaK.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { L as Store } from '../store-DyGdpDFr.cjs';
|
|
4
4
|
import { P as ProfilerOptions, a as ProfileReport } from '../types-CVtGFpB9.cjs';
|
|
5
5
|
export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-CVtGFpB9.cjs';
|
|
6
6
|
import '../types-DMzKq0d5.cjs';
|
package/dist/profiler/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { G as GraphDef } from '../manager-BCLhWysp.js';
|
|
2
2
|
import { Q as QueryAst } from '../ast-COMyNeMn.js';
|
|
3
|
-
import {
|
|
3
|
+
import { L as Store } from '../store-nQ1ATBlN.js';
|
|
4
4
|
import { P as ProfilerOptions, a as ProfileReport } from '../types-COPePE8_.js';
|
|
5
5
|
export { D as DeclaredIndex, I as IndexRecommendation, b as ProfileSummary, c as PropertyAccessStats, d as PropertyPath, R as RecommendationPriority, U as UsageContext } from '../types-COPePE8_.js';
|
|
6
6
|
import '../types-DMzKq0d5.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as SqlSchema, G as GraphBackend } from './types-GLkwvQvS.cjs';
|
|
2
|
-
import { K as KindRegistry, G as GraphDef, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-DGSnJa1v.cjs';
|
|
3
|
-
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, d as EdgeRegistration,
|
|
2
|
+
import { K as KindRegistry, G as GraphDef, E as EdgeKinds, N as NodeKinds, a as AllNodeTypes, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-DGSnJa1v.cjs';
|
|
3
|
+
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, d as EdgeRegistration, b as EdgeId, g as NodeId, i as NodeRegistration } from './types-DMzKq0d5.cjs';
|
|
4
4
|
import { V as ValueType, i as PredicateExpression, k as VectorMetricType, Q as QueryAst, J as JsonPointer, F as FieldRef, P as ParameterRef, c as JsonPointerInput, T as TraversalExpansion, l as Traversal, N as NodePredicate, m as ProjectedField, O as OrderSpec, G as GroupBySpec, o as RecursiveCyclePolicy, q as TraversalDirection, A as AggregateExpr, r as SelectiveField, s as ComposableQuery, t as SetOperationType, u as SetOperation, S as SortDirection } from './ast-Bh2NDeaK.cjs';
|
|
5
5
|
import { SQL } from 'drizzle-orm';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -877,6 +877,18 @@ type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
|
877
877
|
}>) => Promise<Node<N>[]>;
|
|
878
878
|
/** Count nodes matching criteria */
|
|
879
879
|
count: (options?: QueryOptions) => Promise<number>;
|
|
880
|
+
/**
|
|
881
|
+
* Create a node from untyped data, relying on runtime Zod validation.
|
|
882
|
+
*
|
|
883
|
+
* Use this for dynamic dispatch (changesets, migrations, imports) where
|
|
884
|
+
* the data shape is determined at runtime, not compile time.
|
|
885
|
+
* The return type is fully typed — only the input gate is relaxed.
|
|
886
|
+
*/
|
|
887
|
+
createFromRecord: (data: Record<string, unknown>, options?: Readonly<{
|
|
888
|
+
id?: string;
|
|
889
|
+
validFrom?: string;
|
|
890
|
+
validTo?: string;
|
|
891
|
+
}>) => Promise<Node<N>>;
|
|
880
892
|
/**
|
|
881
893
|
* Create or update a node.
|
|
882
894
|
*
|
|
@@ -887,6 +899,17 @@ type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
|
887
899
|
validFrom?: string;
|
|
888
900
|
validTo?: string;
|
|
889
901
|
}>) => Promise<Node<N>>;
|
|
902
|
+
/**
|
|
903
|
+
* Upsert a node from untyped data, relying on runtime Zod validation.
|
|
904
|
+
*
|
|
905
|
+
* Use this for dynamic dispatch (changesets, migrations, imports) where
|
|
906
|
+
* the data shape is determined at runtime, not compile time.
|
|
907
|
+
* The return type is fully typed — only the input gate is relaxed.
|
|
908
|
+
*/
|
|
909
|
+
upsertByIdFromRecord: (id: string, data: Record<string, unknown>, options?: Readonly<{
|
|
910
|
+
validFrom?: string;
|
|
911
|
+
validTo?: string;
|
|
912
|
+
}>) => Promise<Node<N>>;
|
|
890
913
|
/**
|
|
891
914
|
* Create multiple nodes in a batch.
|
|
892
915
|
*
|
|
@@ -1210,6 +1233,60 @@ type TransactionContext<G extends GraphDef> = Readonly<{
|
|
|
1210
1233
|
};
|
|
1211
1234
|
}>;
|
|
1212
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* Discriminated union of all Node runtime types in a graph.
|
|
1238
|
+
*
|
|
1239
|
+
* Unlike `AllNodeTypes<G>` which gives the union of *type definitions*,
|
|
1240
|
+
* `AnyNode<G>` gives the union of *runtime node instances*.
|
|
1241
|
+
*/
|
|
1242
|
+
type AnyNode<G extends GraphDef> = {
|
|
1243
|
+
[K in NodeKinds<G>]: Node<G["nodes"][K]["type"]>;
|
|
1244
|
+
}[NodeKinds<G>];
|
|
1245
|
+
/**
|
|
1246
|
+
* Discriminated union of all Edge runtime types in a graph.
|
|
1247
|
+
*/
|
|
1248
|
+
type AnyEdge<G extends GraphDef> = {
|
|
1249
|
+
[K in EdgeKinds<G>]: Edge<G["edges"][K]["type"]>;
|
|
1250
|
+
}[EdgeKinds<G>];
|
|
1251
|
+
/**
|
|
1252
|
+
* Discriminated union of Node runtime types narrowed to a subset of kinds.
|
|
1253
|
+
*/
|
|
1254
|
+
type SubsetNode<G extends GraphDef, K extends NodeKinds<G>> = {
|
|
1255
|
+
[Kind in K]: Node<G["nodes"][Kind]["type"]>;
|
|
1256
|
+
}[K];
|
|
1257
|
+
/**
|
|
1258
|
+
* Discriminated union of Edge runtime types narrowed to a subset of kinds.
|
|
1259
|
+
*/
|
|
1260
|
+
type SubsetEdge<G extends GraphDef, K extends EdgeKinds<G>> = {
|
|
1261
|
+
[Kind in K]: Edge<G["edges"][Kind]["type"]>;
|
|
1262
|
+
}[K];
|
|
1263
|
+
type SubgraphOptions<G extends GraphDef, EK extends EdgeKinds<G>, NK extends NodeKinds<G>> = Readonly<{
|
|
1264
|
+
/** Edge kinds to follow during traversal. Edges not listed are not traversed. */
|
|
1265
|
+
edges: readonly EK[];
|
|
1266
|
+
/** Maximum traversal depth from root (default: 10). */
|
|
1267
|
+
maxDepth?: number;
|
|
1268
|
+
/**
|
|
1269
|
+
* Node kinds to include in the result. Nodes of other kinds are still
|
|
1270
|
+
* traversed through but omitted from the output. When omitted, all
|
|
1271
|
+
* reachable node kinds are included.
|
|
1272
|
+
*/
|
|
1273
|
+
includeKinds?: readonly NK[];
|
|
1274
|
+
/** Exclude the root node from the result (default: false). */
|
|
1275
|
+
excludeRoot?: boolean;
|
|
1276
|
+
/**
|
|
1277
|
+
* Edge direction policy (default: "out").
|
|
1278
|
+
* - "out": follow edges in their defined direction only
|
|
1279
|
+
* - "both": follow edges in both directions (undirected traversal)
|
|
1280
|
+
*/
|
|
1281
|
+
direction?: "out" | "both";
|
|
1282
|
+
/** Cycle policy — reuse RecursiveCyclePolicy (default: "prevent"). */
|
|
1283
|
+
cyclePolicy?: RecursiveCyclePolicy;
|
|
1284
|
+
}>;
|
|
1285
|
+
type SubgraphResult<G extends GraphDef, NK extends NodeKinds<G> = NodeKinds<G>, EK extends EdgeKinds<G> = EdgeKinds<G>> = Readonly<{
|
|
1286
|
+
nodes: readonly SubsetNode<G, NK>[];
|
|
1287
|
+
edges: readonly SubsetEdge<G, EK>[];
|
|
1288
|
+
}>;
|
|
1289
|
+
|
|
1213
1290
|
/**
|
|
1214
1291
|
* ExecutableAggregateQuery - A query with aggregate functions that can be executed.
|
|
1215
1292
|
*/
|
|
@@ -1854,6 +1931,29 @@ declare class Store<G extends GraphDef> {
|
|
|
1854
1931
|
* ```
|
|
1855
1932
|
*/
|
|
1856
1933
|
query(): QueryBuilder<G>;
|
|
1934
|
+
/**
|
|
1935
|
+
* Extracts a typed subgraph by traversing from a root node.
|
|
1936
|
+
*
|
|
1937
|
+
* Performs a BFS traversal from `rootId` following the specified edge kinds,
|
|
1938
|
+
* then returns all reachable nodes and the edges connecting them.
|
|
1939
|
+
*
|
|
1940
|
+
* @example
|
|
1941
|
+
* ```typescript
|
|
1942
|
+
* const result = await store.subgraph(run.id, {
|
|
1943
|
+
* edges: ["has_task", "runs_agent", "uses_skill"],
|
|
1944
|
+
* maxDepth: 4,
|
|
1945
|
+
* includeKinds: ["Run", "Task", "Agent", "Skill"],
|
|
1946
|
+
* });
|
|
1947
|
+
*
|
|
1948
|
+
* for (const node of result.nodes) {
|
|
1949
|
+
* switch (node.kind) {
|
|
1950
|
+
* case "Task": console.log(node.name); break;
|
|
1951
|
+
* case "Agent": console.log(node.model); break;
|
|
1952
|
+
* }
|
|
1953
|
+
* }
|
|
1954
|
+
* ```
|
|
1955
|
+
*/
|
|
1956
|
+
subgraph<const EK extends EdgeKinds<G>, const NK extends NodeKinds<G> = NodeKinds<G>>(rootId: NodeId<AllNodeTypes<G>>, options: SubgraphOptions<G, EK, NK>): Promise<SubgraphResult<G, NK, EK>>;
|
|
1857
1957
|
/**
|
|
1858
1958
|
* Executes a function within a transaction.
|
|
1859
1959
|
*
|
|
@@ -1955,4 +2055,4 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
|
|
|
1955
2055
|
*/
|
|
1956
2056
|
declare function createStoreWithSchema<G extends GraphDef>(graph: G, backend: GraphBackend, options?: StoreOptions & SchemaManagerOptions): Promise<[Store<G>, SchemaValidationResult]>;
|
|
1957
2057
|
|
|
1958
|
-
export {
|
|
2058
|
+
export { type TypedEdgeCollection as $, type AliasMap as A, type QueryHookContext as B, type CreateQueryBuilderOptions as C, type QueryOptions as D, type EdgeAliasMap as E, type FieldAccessor as F, type GetOrCreateAction as G, type HookContext as H, type IfExistsMode as I, type SelectableEdge as J, type SelectableNode as K, Store as L, type StoreHooks as M, type Node as N, type OperationHookContext as O, type PaginateOptions as P, QueryBuilder as Q, type RecursiveTraversalOptions as R, type SelectContext as S, TraversalBuilder as T, type StoreOptions as U, type StreamOptions as V, type SubgraphOptions as W, type SubgraphResult as X, type SubsetEdge as Y, type SubsetNode as Z, type TransactionContext as _, type AggregateResult as a, UnionableQuery as a0, type UpdateEdgeInput as a1, type UpdateNodeInput as a2, createStore as a3, createStoreWithSchema as a4, embedding as a5, exists as a6, fieldRef as a7, getEmbeddingDimensions as a8, inSubquery as a9, isEmbeddingSchema as aa, isParameterRef as ab, notExists as ac, notInSubquery as ad, param as ae, type AnyEdge as b, type AnyNode as c, type ConstraintNames as d, type CreateEdgeInput as e, type CreateNodeInput as f, type Edge as g, type EdgeAccessor as h, type EdgeCollection as i, type EdgeFindByEndpointsOptions as j, type EdgeGetOrCreateByEndpointsOptions as k, type EdgeGetOrCreateByEndpointsResult as l, type EmbeddingSchema as m, type EmbeddingValue as n, ExecutableAggregateQuery as o, ExecutableQuery as p, type NodeAccessor as q, type NodeAlias as r, type NodeCollection as s, type NodeGetOrCreateByConstraintOptions as t, type NodeGetOrCreateByConstraintResult as u, type NodeRef as v, type PaginatedResult as w, type Predicate as x, PreparedQuery as y, type PropsAccessor as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as SqlSchema, G as GraphBackend } from './types-1YJKodRv.js';
|
|
2
|
-
import { K as KindRegistry, G as GraphDef, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-BCLhWysp.js';
|
|
3
|
-
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, d as EdgeRegistration,
|
|
2
|
+
import { K as KindRegistry, G as GraphDef, E as EdgeKinds, N as NodeKinds, a as AllNodeTypes, S as SchemaManagerOptions, f as SchemaValidationResult } from './manager-BCLhWysp.js';
|
|
3
|
+
import { S as SqlDialect, N as NodeType, A as AnyEdgeType, T as TemporalMode, E as EdgeType, d as EdgeRegistration, b as EdgeId, g as NodeId, i as NodeRegistration } from './types-DMzKq0d5.js';
|
|
4
4
|
import { V as ValueType, i as PredicateExpression, k as VectorMetricType, Q as QueryAst, J as JsonPointer, F as FieldRef, P as ParameterRef, c as JsonPointerInput, T as TraversalExpansion, l as Traversal, N as NodePredicate, m as ProjectedField, O as OrderSpec, G as GroupBySpec, o as RecursiveCyclePolicy, q as TraversalDirection, A as AggregateExpr, r as SelectiveField, s as ComposableQuery, t as SetOperationType, u as SetOperation, S as SortDirection } from './ast-COMyNeMn.js';
|
|
5
5
|
import { SQL } from 'drizzle-orm';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -877,6 +877,18 @@ type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
|
877
877
|
}>) => Promise<Node<N>[]>;
|
|
878
878
|
/** Count nodes matching criteria */
|
|
879
879
|
count: (options?: QueryOptions) => Promise<number>;
|
|
880
|
+
/**
|
|
881
|
+
* Create a node from untyped data, relying on runtime Zod validation.
|
|
882
|
+
*
|
|
883
|
+
* Use this for dynamic dispatch (changesets, migrations, imports) where
|
|
884
|
+
* the data shape is determined at runtime, not compile time.
|
|
885
|
+
* The return type is fully typed — only the input gate is relaxed.
|
|
886
|
+
*/
|
|
887
|
+
createFromRecord: (data: Record<string, unknown>, options?: Readonly<{
|
|
888
|
+
id?: string;
|
|
889
|
+
validFrom?: string;
|
|
890
|
+
validTo?: string;
|
|
891
|
+
}>) => Promise<Node<N>>;
|
|
880
892
|
/**
|
|
881
893
|
* Create or update a node.
|
|
882
894
|
*
|
|
@@ -887,6 +899,17 @@ type NodeCollection<N extends NodeType, CN extends string = string> = Readonly<{
|
|
|
887
899
|
validFrom?: string;
|
|
888
900
|
validTo?: string;
|
|
889
901
|
}>) => Promise<Node<N>>;
|
|
902
|
+
/**
|
|
903
|
+
* Upsert a node from untyped data, relying on runtime Zod validation.
|
|
904
|
+
*
|
|
905
|
+
* Use this for dynamic dispatch (changesets, migrations, imports) where
|
|
906
|
+
* the data shape is determined at runtime, not compile time.
|
|
907
|
+
* The return type is fully typed — only the input gate is relaxed.
|
|
908
|
+
*/
|
|
909
|
+
upsertByIdFromRecord: (id: string, data: Record<string, unknown>, options?: Readonly<{
|
|
910
|
+
validFrom?: string;
|
|
911
|
+
validTo?: string;
|
|
912
|
+
}>) => Promise<Node<N>>;
|
|
890
913
|
/**
|
|
891
914
|
* Create multiple nodes in a batch.
|
|
892
915
|
*
|
|
@@ -1210,6 +1233,60 @@ type TransactionContext<G extends GraphDef> = Readonly<{
|
|
|
1210
1233
|
};
|
|
1211
1234
|
}>;
|
|
1212
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* Discriminated union of all Node runtime types in a graph.
|
|
1238
|
+
*
|
|
1239
|
+
* Unlike `AllNodeTypes<G>` which gives the union of *type definitions*,
|
|
1240
|
+
* `AnyNode<G>` gives the union of *runtime node instances*.
|
|
1241
|
+
*/
|
|
1242
|
+
type AnyNode<G extends GraphDef> = {
|
|
1243
|
+
[K in NodeKinds<G>]: Node<G["nodes"][K]["type"]>;
|
|
1244
|
+
}[NodeKinds<G>];
|
|
1245
|
+
/**
|
|
1246
|
+
* Discriminated union of all Edge runtime types in a graph.
|
|
1247
|
+
*/
|
|
1248
|
+
type AnyEdge<G extends GraphDef> = {
|
|
1249
|
+
[K in EdgeKinds<G>]: Edge<G["edges"][K]["type"]>;
|
|
1250
|
+
}[EdgeKinds<G>];
|
|
1251
|
+
/**
|
|
1252
|
+
* Discriminated union of Node runtime types narrowed to a subset of kinds.
|
|
1253
|
+
*/
|
|
1254
|
+
type SubsetNode<G extends GraphDef, K extends NodeKinds<G>> = {
|
|
1255
|
+
[Kind in K]: Node<G["nodes"][Kind]["type"]>;
|
|
1256
|
+
}[K];
|
|
1257
|
+
/**
|
|
1258
|
+
* Discriminated union of Edge runtime types narrowed to a subset of kinds.
|
|
1259
|
+
*/
|
|
1260
|
+
type SubsetEdge<G extends GraphDef, K extends EdgeKinds<G>> = {
|
|
1261
|
+
[Kind in K]: Edge<G["edges"][Kind]["type"]>;
|
|
1262
|
+
}[K];
|
|
1263
|
+
type SubgraphOptions<G extends GraphDef, EK extends EdgeKinds<G>, NK extends NodeKinds<G>> = Readonly<{
|
|
1264
|
+
/** Edge kinds to follow during traversal. Edges not listed are not traversed. */
|
|
1265
|
+
edges: readonly EK[];
|
|
1266
|
+
/** Maximum traversal depth from root (default: 10). */
|
|
1267
|
+
maxDepth?: number;
|
|
1268
|
+
/**
|
|
1269
|
+
* Node kinds to include in the result. Nodes of other kinds are still
|
|
1270
|
+
* traversed through but omitted from the output. When omitted, all
|
|
1271
|
+
* reachable node kinds are included.
|
|
1272
|
+
*/
|
|
1273
|
+
includeKinds?: readonly NK[];
|
|
1274
|
+
/** Exclude the root node from the result (default: false). */
|
|
1275
|
+
excludeRoot?: boolean;
|
|
1276
|
+
/**
|
|
1277
|
+
* Edge direction policy (default: "out").
|
|
1278
|
+
* - "out": follow edges in their defined direction only
|
|
1279
|
+
* - "both": follow edges in both directions (undirected traversal)
|
|
1280
|
+
*/
|
|
1281
|
+
direction?: "out" | "both";
|
|
1282
|
+
/** Cycle policy — reuse RecursiveCyclePolicy (default: "prevent"). */
|
|
1283
|
+
cyclePolicy?: RecursiveCyclePolicy;
|
|
1284
|
+
}>;
|
|
1285
|
+
type SubgraphResult<G extends GraphDef, NK extends NodeKinds<G> = NodeKinds<G>, EK extends EdgeKinds<G> = EdgeKinds<G>> = Readonly<{
|
|
1286
|
+
nodes: readonly SubsetNode<G, NK>[];
|
|
1287
|
+
edges: readonly SubsetEdge<G, EK>[];
|
|
1288
|
+
}>;
|
|
1289
|
+
|
|
1213
1290
|
/**
|
|
1214
1291
|
* ExecutableAggregateQuery - A query with aggregate functions that can be executed.
|
|
1215
1292
|
*/
|
|
@@ -1854,6 +1931,29 @@ declare class Store<G extends GraphDef> {
|
|
|
1854
1931
|
* ```
|
|
1855
1932
|
*/
|
|
1856
1933
|
query(): QueryBuilder<G>;
|
|
1934
|
+
/**
|
|
1935
|
+
* Extracts a typed subgraph by traversing from a root node.
|
|
1936
|
+
*
|
|
1937
|
+
* Performs a BFS traversal from `rootId` following the specified edge kinds,
|
|
1938
|
+
* then returns all reachable nodes and the edges connecting them.
|
|
1939
|
+
*
|
|
1940
|
+
* @example
|
|
1941
|
+
* ```typescript
|
|
1942
|
+
* const result = await store.subgraph(run.id, {
|
|
1943
|
+
* edges: ["has_task", "runs_agent", "uses_skill"],
|
|
1944
|
+
* maxDepth: 4,
|
|
1945
|
+
* includeKinds: ["Run", "Task", "Agent", "Skill"],
|
|
1946
|
+
* });
|
|
1947
|
+
*
|
|
1948
|
+
* for (const node of result.nodes) {
|
|
1949
|
+
* switch (node.kind) {
|
|
1950
|
+
* case "Task": console.log(node.name); break;
|
|
1951
|
+
* case "Agent": console.log(node.model); break;
|
|
1952
|
+
* }
|
|
1953
|
+
* }
|
|
1954
|
+
* ```
|
|
1955
|
+
*/
|
|
1956
|
+
subgraph<const EK extends EdgeKinds<G>, const NK extends NodeKinds<G> = NodeKinds<G>>(rootId: NodeId<AllNodeTypes<G>>, options: SubgraphOptions<G, EK, NK>): Promise<SubgraphResult<G, NK, EK>>;
|
|
1857
1957
|
/**
|
|
1858
1958
|
* Executes a function within a transaction.
|
|
1859
1959
|
*
|
|
@@ -1955,4 +2055,4 @@ declare function createStore<G extends GraphDef>(graph: G, backend: GraphBackend
|
|
|
1955
2055
|
*/
|
|
1956
2056
|
declare function createStoreWithSchema<G extends GraphDef>(graph: G, backend: GraphBackend, options?: StoreOptions & SchemaManagerOptions): Promise<[Store<G>, SchemaValidationResult]>;
|
|
1957
2057
|
|
|
1958
|
-
export {
|
|
2058
|
+
export { type TypedEdgeCollection as $, type AliasMap as A, type QueryHookContext as B, type CreateQueryBuilderOptions as C, type QueryOptions as D, type EdgeAliasMap as E, type FieldAccessor as F, type GetOrCreateAction as G, type HookContext as H, type IfExistsMode as I, type SelectableEdge as J, type SelectableNode as K, Store as L, type StoreHooks as M, type Node as N, type OperationHookContext as O, type PaginateOptions as P, QueryBuilder as Q, type RecursiveTraversalOptions as R, type SelectContext as S, TraversalBuilder as T, type StoreOptions as U, type StreamOptions as V, type SubgraphOptions as W, type SubgraphResult as X, type SubsetEdge as Y, type SubsetNode as Z, type TransactionContext as _, type AggregateResult as a, UnionableQuery as a0, type UpdateEdgeInput as a1, type UpdateNodeInput as a2, createStore as a3, createStoreWithSchema as a4, embedding as a5, exists as a6, fieldRef as a7, getEmbeddingDimensions as a8, inSubquery as a9, isEmbeddingSchema as aa, isParameterRef as ab, notExists as ac, notInSubquery as ad, param as ae, type AnyEdge as b, type AnyNode as c, type ConstraintNames as d, type CreateEdgeInput as e, type CreateNodeInput as f, type Edge as g, type EdgeAccessor as h, type EdgeCollection as i, type EdgeFindByEndpointsOptions as j, type EdgeGetOrCreateByEndpointsOptions as k, type EdgeGetOrCreateByEndpointsResult as l, type EmbeddingSchema as m, type EmbeddingValue as n, ExecutableAggregateQuery as o, ExecutableQuery as p, type NodeAccessor as q, type NodeAlias as r, type NodeCollection as s, type NodeGetOrCreateByConstraintOptions as t, type NodeGetOrCreateByConstraintResult as u, type NodeRef as v, type PaginatedResult as w, type Predicate as x, PreparedQuery as y, type PropsAccessor as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nicia-ai/typegraph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "TypeScript-first embedded knowledge graph library with ontological reasoning",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -138,14 +138,14 @@
|
|
|
138
138
|
"@stryker-mutator/core": "^9.6.0",
|
|
139
139
|
"@stryker-mutator/vitest-runner": "^9.6.0",
|
|
140
140
|
"@types/better-sqlite3": "^7.6.13",
|
|
141
|
-
"@types/node": "^24.
|
|
141
|
+
"@types/node": "^24.12.0",
|
|
142
142
|
"@types/pg": "^8.18.0",
|
|
143
143
|
"@vitest/coverage-v8": "^4.0.18",
|
|
144
144
|
"better-sqlite3": "^12.6.2",
|
|
145
145
|
"drizzle-orm": "^0.45.1",
|
|
146
|
-
"eslint": "^9.39.
|
|
147
|
-
"fast-check": "^4.
|
|
148
|
-
"pg": "^8.
|
|
146
|
+
"eslint": "^9.39.4",
|
|
147
|
+
"fast-check": "^4.6.0",
|
|
148
|
+
"pg": "^8.20.0",
|
|
149
149
|
"sqlite-vec": "0.1.7-alpha.2",
|
|
150
150
|
"tsd": "^0.33.0",
|
|
151
151
|
"tsup": "^8.5.1",
|