@utaba/deep-memory 0.2.0 → 0.3.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/{StorageProvider-DR9HLYHJ.d.ts → StorageProvider-CSbaIY6X.d.cts} +8 -3
- package/dist/{StorageProvider-C3tKhfuw.d.cts → StorageProvider-DqW-zpd0.d.ts} +8 -3
- package/dist/index.cjs +324 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -8
- package/dist/index.d.ts +27 -8
- package/dist/index.js +324 -50
- package/dist/index.js.map +1 -1
- package/dist/{portability-DdjsCB07.d.cts → portability-1KBMVBGJ.d.cts} +19 -1
- package/dist/{portability-DdjsCB07.d.ts → portability-1KBMVBGJ.d.ts} +19 -1
- package/dist/providers/index.d.cts +9 -3
- package/dist/providers/index.d.ts +9 -3
- package/dist/testing/conformance.cjs +22 -0
- package/dist/testing/conformance.cjs.map +1 -1
- package/dist/testing/conformance.d.cts +2 -2
- package/dist/testing/conformance.d.ts +2 -2
- package/dist/testing/conformance.js +22 -0
- package/dist/testing/conformance.js.map +1 -1
- package/dist/{traversal-9JdiqjZ9.d.ts → traversal-B4SUysM-.d.ts} +98 -11
- package/dist/{traversal-BB_yERbf.d.cts → traversal-DQynd-to.d.cts} +98 -11
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +28 -4
- package/dist/types/index.d.ts +28 -4
- package/package.json +1 -1
|
@@ -1,20 +1,46 @@
|
|
|
1
|
-
import { P as PropertyFilter, D as DetailLevel, E as Entity, a as EntitySummary, b as EntityBrief } from './portability-
|
|
1
|
+
import { P as PropertyFilter, D as DetailLevel, E as Entity, a as EntitySummary, b as EntityBrief, R as RelationshipSummary } from './portability-1KBMVBGJ.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* An entity as returned inside a TraversalResult — the projected entity plus
|
|
5
|
+
* an optional relationship summary when includeRelationshipSummary is set.
|
|
6
|
+
*/
|
|
7
|
+
type TraversalEntity = (Entity | EntitySummary | EntityBrief) & {
|
|
8
|
+
relationshipSummary?: RelationshipSummary;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A structured graph query specification that can be compiled to
|
|
5
12
|
* Gremlin, Cypher, or executed via application-level BFS.
|
|
6
13
|
*
|
|
7
14
|
* Designed to be expressible by AI agents without raw query
|
|
8
|
-
* language knowledge
|
|
9
|
-
*
|
|
15
|
+
* language knowledge. Covers both vertex-only queries (property
|
|
16
|
+
* aggregation, distinct values, filtered lookups) and multi-hop
|
|
17
|
+
* relationship traversals.
|
|
18
|
+
*
|
|
19
|
+
* When steps is empty or omitted, the query operates on the
|
|
20
|
+
* starting entities directly — no relationship hops needed.
|
|
10
21
|
*/
|
|
11
22
|
interface TraversalSpec {
|
|
12
|
-
/** Starting point
|
|
23
|
+
/** Starting point — which entities to query or start traversing from. */
|
|
13
24
|
start: TraversalStart;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Ordered sequence of traversal steps (relationship hops).
|
|
27
|
+
* When empty or omitted, the query operates on the starting entities
|
|
28
|
+
* directly — useful for property aggregation, distinct value queries,
|
|
29
|
+
* and filtered entity lookups without relationship hops.
|
|
30
|
+
*/
|
|
31
|
+
steps?: TraversalStep[];
|
|
32
|
+
/** What to return from the query. */
|
|
17
33
|
returnMode: TraversalReturnMode;
|
|
34
|
+
/**
|
|
35
|
+
* Property projection — extract and aggregate property values from
|
|
36
|
+
* result entities. When present, returns projected values in the
|
|
37
|
+
* `aggregations` array. By default, the `entities` array is suppressed
|
|
38
|
+
* (projection replaces full entity output). Set `includeEntities: true`
|
|
39
|
+
* to return both.
|
|
40
|
+
*
|
|
41
|
+
* Works with both vertex-only queries and traversals.
|
|
42
|
+
*/
|
|
43
|
+
projection?: TraversalProjection;
|
|
18
44
|
/**
|
|
19
45
|
* Maximum number of results to return.
|
|
20
46
|
* Default: 50. Max: 200.
|
|
@@ -30,6 +56,54 @@ interface TraversalSpec {
|
|
|
30
56
|
detailLevel?: DetailLevel;
|
|
31
57
|
/** Whether to deduplicate entities in the result set. Default: true. */
|
|
32
58
|
dedup?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Whether to include a relationship summary (outbound/inbound counts by type)
|
|
61
|
+
* on each entity in the result. Default: false.
|
|
62
|
+
*
|
|
63
|
+
* Native GraphTraversalProviders (Gremlin, Cypher) can return this in a single
|
|
64
|
+
* query. The fallback executor fetches all relationship data in one batch call
|
|
65
|
+
* and computes summaries locally. Check GraphTraversalCapabilities.supportsRelationshipSummary
|
|
66
|
+
* to know whether the active provider handles this natively.
|
|
67
|
+
*/
|
|
68
|
+
includeRelationshipSummary?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether to include provenance data on entities. Default: false.
|
|
71
|
+
* Only has effect when detailLevel is 'full'.
|
|
72
|
+
*/
|
|
73
|
+
includeProvenance?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Property projection — extract and optionally aggregate property values
|
|
77
|
+
* from result entities. Like SQL SELECT or Gremlin valueMap(), projection
|
|
78
|
+
* returns the projected values, not the full objects.
|
|
79
|
+
*
|
|
80
|
+
* By default, when projection is present the entities array is suppressed
|
|
81
|
+
* (only aggregations are returned). Set includeEntities to also get the
|
|
82
|
+
* full entity objects back.
|
|
83
|
+
*/
|
|
84
|
+
interface TraversalProjection {
|
|
85
|
+
/**
|
|
86
|
+
* Property names to extract from result entities.
|
|
87
|
+
*/
|
|
88
|
+
properties: string[];
|
|
89
|
+
/**
|
|
90
|
+
* Return only distinct combinations of the projected properties.
|
|
91
|
+
* Default: false.
|
|
92
|
+
*/
|
|
93
|
+
distinct?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Aggregation mode for the projected properties.
|
|
96
|
+
* - 'values': return the raw property values (default)
|
|
97
|
+
* - 'count': count entities per distinct value combination
|
|
98
|
+
*/
|
|
99
|
+
mode?: 'count' | 'values';
|
|
100
|
+
/**
|
|
101
|
+
* When true, also return the full entities array alongside the
|
|
102
|
+
* projected aggregations. By default, projection suppresses entities
|
|
103
|
+
* to keep responses lightweight.
|
|
104
|
+
* Default: false.
|
|
105
|
+
*/
|
|
106
|
+
includeEntities?: boolean;
|
|
33
107
|
}
|
|
34
108
|
/** Where the traversal begins. */
|
|
35
109
|
interface TraversalStart {
|
|
@@ -99,7 +173,7 @@ type TraversalReturnMode =
|
|
|
99
173
|
*/
|
|
100
174
|
interface TraversalResult {
|
|
101
175
|
/** Entities in the result set, projected to the requested detail level. */
|
|
102
|
-
entities:
|
|
176
|
+
entities: TraversalEntity[];
|
|
103
177
|
/**
|
|
104
178
|
* Relationships in the result set.
|
|
105
179
|
* Present when returnMode is 'path' or 'all'.
|
|
@@ -110,6 +184,12 @@ interface TraversalResult {
|
|
|
110
184
|
* Present only when returnMode is 'path'.
|
|
111
185
|
*/
|
|
112
186
|
paths?: TraversalPath[];
|
|
187
|
+
/**
|
|
188
|
+
* Aggregated property values.
|
|
189
|
+
* Present when select is specified in the query.
|
|
190
|
+
* Each entry is a distinct value combination with an optional count.
|
|
191
|
+
*/
|
|
192
|
+
aggregations?: TraversalAggregation[];
|
|
113
193
|
/** Total number of results matching the traversal (before limit/offset). */
|
|
114
194
|
total: number;
|
|
115
195
|
/** Number of results returned in this response. */
|
|
@@ -119,6 +199,13 @@ interface TraversalResult {
|
|
|
119
199
|
/** Query execution metadata. */
|
|
120
200
|
queryMetadata: QueryMetadata;
|
|
121
201
|
}
|
|
202
|
+
/** A single aggregation row — a distinct property value combination with optional count. */
|
|
203
|
+
interface TraversalAggregation {
|
|
204
|
+
/** Property values for this combination. */
|
|
205
|
+
values: Record<string, unknown>;
|
|
206
|
+
/** Number of entities with this value combination. Present when mode is 'count'. */
|
|
207
|
+
count?: number;
|
|
208
|
+
}
|
|
122
209
|
interface TraversalRelationship {
|
|
123
210
|
id: string;
|
|
124
211
|
type: string;
|
|
@@ -131,7 +218,7 @@ interface TraversalPath {
|
|
|
131
218
|
/** Number of hops in this path. */
|
|
132
219
|
length: number;
|
|
133
220
|
/** Ordered sequence of entities from start to end. */
|
|
134
|
-
entities:
|
|
221
|
+
entities: TraversalEntity[];
|
|
135
222
|
/** Ordered sequence of relationships connecting the entities. */
|
|
136
223
|
relationships: TraversalRelationship[];
|
|
137
224
|
}
|
|
@@ -174,4 +261,4 @@ interface QueryMetadata {
|
|
|
174
261
|
truncationReason?: 'result_limit' | 'timeout' | 'cost_limit' | 'depth_limit';
|
|
175
262
|
}
|
|
176
263
|
|
|
177
|
-
export type { QueryMetadata as Q, TraversalSpec as T, TraversalResult as a,
|
|
264
|
+
export type { QueryMetadata as Q, TraversalSpec as T, TraversalResult as a, TraversalAggregation as b, TraversalPath as c, TraversalProjection as d, TraversalRelationship as e, TraversalReturnMode as f, TraversalStart as g, TraversalStep as h };
|
|
@@ -1,20 +1,46 @@
|
|
|
1
|
-
import { P as PropertyFilter, D as DetailLevel, E as Entity, a as EntitySummary, b as EntityBrief } from './portability-
|
|
1
|
+
import { P as PropertyFilter, D as DetailLevel, E as Entity, a as EntitySummary, b as EntityBrief, R as RelationshipSummary } from './portability-1KBMVBGJ.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* An entity as returned inside a TraversalResult — the projected entity plus
|
|
5
|
+
* an optional relationship summary when includeRelationshipSummary is set.
|
|
6
|
+
*/
|
|
7
|
+
type TraversalEntity = (Entity | EntitySummary | EntityBrief) & {
|
|
8
|
+
relationshipSummary?: RelationshipSummary;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A structured graph query specification that can be compiled to
|
|
5
12
|
* Gremlin, Cypher, or executed via application-level BFS.
|
|
6
13
|
*
|
|
7
14
|
* Designed to be expressible by AI agents without raw query
|
|
8
|
-
* language knowledge
|
|
9
|
-
*
|
|
15
|
+
* language knowledge. Covers both vertex-only queries (property
|
|
16
|
+
* aggregation, distinct values, filtered lookups) and multi-hop
|
|
17
|
+
* relationship traversals.
|
|
18
|
+
*
|
|
19
|
+
* When steps is empty or omitted, the query operates on the
|
|
20
|
+
* starting entities directly — no relationship hops needed.
|
|
10
21
|
*/
|
|
11
22
|
interface TraversalSpec {
|
|
12
|
-
/** Starting point
|
|
23
|
+
/** Starting point — which entities to query or start traversing from. */
|
|
13
24
|
start: TraversalStart;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Ordered sequence of traversal steps (relationship hops).
|
|
27
|
+
* When empty or omitted, the query operates on the starting entities
|
|
28
|
+
* directly — useful for property aggregation, distinct value queries,
|
|
29
|
+
* and filtered entity lookups without relationship hops.
|
|
30
|
+
*/
|
|
31
|
+
steps?: TraversalStep[];
|
|
32
|
+
/** What to return from the query. */
|
|
17
33
|
returnMode: TraversalReturnMode;
|
|
34
|
+
/**
|
|
35
|
+
* Property projection — extract and aggregate property values from
|
|
36
|
+
* result entities. When present, returns projected values in the
|
|
37
|
+
* `aggregations` array. By default, the `entities` array is suppressed
|
|
38
|
+
* (projection replaces full entity output). Set `includeEntities: true`
|
|
39
|
+
* to return both.
|
|
40
|
+
*
|
|
41
|
+
* Works with both vertex-only queries and traversals.
|
|
42
|
+
*/
|
|
43
|
+
projection?: TraversalProjection;
|
|
18
44
|
/**
|
|
19
45
|
* Maximum number of results to return.
|
|
20
46
|
* Default: 50. Max: 200.
|
|
@@ -30,6 +56,54 @@ interface TraversalSpec {
|
|
|
30
56
|
detailLevel?: DetailLevel;
|
|
31
57
|
/** Whether to deduplicate entities in the result set. Default: true. */
|
|
32
58
|
dedup?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Whether to include a relationship summary (outbound/inbound counts by type)
|
|
61
|
+
* on each entity in the result. Default: false.
|
|
62
|
+
*
|
|
63
|
+
* Native GraphTraversalProviders (Gremlin, Cypher) can return this in a single
|
|
64
|
+
* query. The fallback executor fetches all relationship data in one batch call
|
|
65
|
+
* and computes summaries locally. Check GraphTraversalCapabilities.supportsRelationshipSummary
|
|
66
|
+
* to know whether the active provider handles this natively.
|
|
67
|
+
*/
|
|
68
|
+
includeRelationshipSummary?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether to include provenance data on entities. Default: false.
|
|
71
|
+
* Only has effect when detailLevel is 'full'.
|
|
72
|
+
*/
|
|
73
|
+
includeProvenance?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Property projection — extract and optionally aggregate property values
|
|
77
|
+
* from result entities. Like SQL SELECT or Gremlin valueMap(), projection
|
|
78
|
+
* returns the projected values, not the full objects.
|
|
79
|
+
*
|
|
80
|
+
* By default, when projection is present the entities array is suppressed
|
|
81
|
+
* (only aggregations are returned). Set includeEntities to also get the
|
|
82
|
+
* full entity objects back.
|
|
83
|
+
*/
|
|
84
|
+
interface TraversalProjection {
|
|
85
|
+
/**
|
|
86
|
+
* Property names to extract from result entities.
|
|
87
|
+
*/
|
|
88
|
+
properties: string[];
|
|
89
|
+
/**
|
|
90
|
+
* Return only distinct combinations of the projected properties.
|
|
91
|
+
* Default: false.
|
|
92
|
+
*/
|
|
93
|
+
distinct?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Aggregation mode for the projected properties.
|
|
96
|
+
* - 'values': return the raw property values (default)
|
|
97
|
+
* - 'count': count entities per distinct value combination
|
|
98
|
+
*/
|
|
99
|
+
mode?: 'count' | 'values';
|
|
100
|
+
/**
|
|
101
|
+
* When true, also return the full entities array alongside the
|
|
102
|
+
* projected aggregations. By default, projection suppresses entities
|
|
103
|
+
* to keep responses lightweight.
|
|
104
|
+
* Default: false.
|
|
105
|
+
*/
|
|
106
|
+
includeEntities?: boolean;
|
|
33
107
|
}
|
|
34
108
|
/** Where the traversal begins. */
|
|
35
109
|
interface TraversalStart {
|
|
@@ -99,7 +173,7 @@ type TraversalReturnMode =
|
|
|
99
173
|
*/
|
|
100
174
|
interface TraversalResult {
|
|
101
175
|
/** Entities in the result set, projected to the requested detail level. */
|
|
102
|
-
entities:
|
|
176
|
+
entities: TraversalEntity[];
|
|
103
177
|
/**
|
|
104
178
|
* Relationships in the result set.
|
|
105
179
|
* Present when returnMode is 'path' or 'all'.
|
|
@@ -110,6 +184,12 @@ interface TraversalResult {
|
|
|
110
184
|
* Present only when returnMode is 'path'.
|
|
111
185
|
*/
|
|
112
186
|
paths?: TraversalPath[];
|
|
187
|
+
/**
|
|
188
|
+
* Aggregated property values.
|
|
189
|
+
* Present when select is specified in the query.
|
|
190
|
+
* Each entry is a distinct value combination with an optional count.
|
|
191
|
+
*/
|
|
192
|
+
aggregations?: TraversalAggregation[];
|
|
113
193
|
/** Total number of results matching the traversal (before limit/offset). */
|
|
114
194
|
total: number;
|
|
115
195
|
/** Number of results returned in this response. */
|
|
@@ -119,6 +199,13 @@ interface TraversalResult {
|
|
|
119
199
|
/** Query execution metadata. */
|
|
120
200
|
queryMetadata: QueryMetadata;
|
|
121
201
|
}
|
|
202
|
+
/** A single aggregation row — a distinct property value combination with optional count. */
|
|
203
|
+
interface TraversalAggregation {
|
|
204
|
+
/** Property values for this combination. */
|
|
205
|
+
values: Record<string, unknown>;
|
|
206
|
+
/** Number of entities with this value combination. Present when mode is 'count'. */
|
|
207
|
+
count?: number;
|
|
208
|
+
}
|
|
122
209
|
interface TraversalRelationship {
|
|
123
210
|
id: string;
|
|
124
211
|
type: string;
|
|
@@ -131,7 +218,7 @@ interface TraversalPath {
|
|
|
131
218
|
/** Number of hops in this path. */
|
|
132
219
|
length: number;
|
|
133
220
|
/** Ordered sequence of entities from start to end. */
|
|
134
|
-
entities:
|
|
221
|
+
entities: TraversalEntity[];
|
|
135
222
|
/** Ordered sequence of relationships connecting the entities. */
|
|
136
223
|
relationships: TraversalRelationship[];
|
|
137
224
|
}
|
|
@@ -174,4 +261,4 @@ interface QueryMetadata {
|
|
|
174
261
|
truncationReason?: 'result_limit' | 'timeout' | 'cost_limit' | 'depth_limit';
|
|
175
262
|
}
|
|
176
263
|
|
|
177
|
-
export type { QueryMetadata as Q, TraversalSpec as T, TraversalResult as a,
|
|
264
|
+
export type { QueryMetadata as Q, TraversalSpec as T, TraversalResult as a, TraversalAggregation as b, TraversalPath as c, TraversalProjection as d, TraversalRelationship as e, TraversalReturnMode as f, TraversalStart as g, TraversalStep as h };
|
package/dist/types/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Type re-exports — @utaba/deep-memory/types\n\nexport type {\n ProvenanceContext,\n Provenance,\n} from './provenance.js';\n\nexport type {\n PropertyType,\n PropertySchema,\n EntityTypeDefinition,\n RelationshipTypeDefinition,\n MemoryVocabulary,\n GovernanceMode,\n GovernanceConfig,\n VocabularyProposal,\n VocabularyProposalResult,\n VocabularyChangeRecord,\n ResolvedVocabulary,\n EntityTypeInput,\n RelationshipTypeInput,\n VocabularyInput,\n} from './vocabulary.js';\n\nexport type {\n DetailLevel,\n Entity,\n EntitySummary,\n EntityBrief,\n CreateEntityInput,\n UpdateEntityInput,\n StoredEntity,\n StoredEntityUpdate,\n GetEntityOptions,\n GetEntitiesOptions,\n} from './entities.js';\n\nexport type {\n RelationshipDirection,\n Relationship,\n EnrichedRelationship,\n CreateRelationshipInput,\n StoredRelationship,\n RelationshipQueryOptions,\n RelationshipSummary,\n} from './relationships.js';\n\nexport type {\n RepositoryConfig,\n RepositoryMetadata,\n RepositoryUpdate,\n RepositorySummary,\n RepositoryStats,\n StoredRepository,\n StoredRepositorySummary,\n RepositoryFilter,\n StorageRepositoryConfig,\n} from './repositories.js';\n\nexport type {\n PaginationOptions,\n FindEntitiesQuery,\n ExploreOptions,\n PathOptions,\n ConceptSearchOptions,\n TimelineOptions,\n StorageFindQuery,\n StorageExploreOptions,\n StoragePathOptions,\n StorageTimelineOptions,\n SearchOptions,\n PropertyFilter,\n ProvenanceFilter,\n} from './queries.js';\n\nexport type {\n PaginatedResult,\n NeighbourhoodCentre,\n NeighbourhoodGroup,\n NeighbourhoodLayer,\n Neighbourhood,\n Path,\n PathResult,\n ScoredEntity,\n TimelineEntityRef,\n TimelineRelationshipDetail,\n TimelineEvent,\n TimelineResult,\n GraphResult,\n EntityMap,\n StorageNeighbourhoodGroup,\n StorageNeighbourhoodLayer,\n StorageNeighbourhood,\n StoragePath,\n StoragePathResult,\n StorageTimelineEvent,\n StorageTimelineResult,\n SearchHit,\n BulkImportResult,\n ReembedResult,\n} from './results.js';\n\nexport type {\n DeepMemoryEventType,\n EventPayload,\n DeepMemoryEvent,\n EventHandler,\n Unsubscribe,\n HookResult,\n} from './events.js';\n\nexport type {\n TraversalSpec,\n TraversalStart,\n TraversalStep,\n TraversalReturnMode,\n TraversalResult,\n TraversalRelationship,\n TraversalPath,\n QueryMetadata,\n} from './traversal.js';\n\nexport type {\n ExportManifest,\n ExportLegalMetadata,\n ExportPipelineMetadata,\n ExportOptions,\n ExportArchive,\n ExportChunk,\n ExportStreamItem,\n ImportOptions,\n ImportChunk,\n ImportStreamHeader,\n ImportWarning,\n ImportResult,\n} from './portability.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["// Type re-exports — @utaba/deep-memory/types\n\nexport type {\n ProvenanceContext,\n Provenance,\n} from './provenance.js';\n\nexport type {\n PropertyType,\n PropertySchema,\n EntityTypeDefinition,\n RelationshipTypeDefinition,\n MemoryVocabulary,\n GovernanceMode,\n GovernanceConfig,\n VocabularyProposal,\n VocabularyProposalResult,\n VocabularyChangeRecord,\n ResolvedVocabulary,\n EntityTypeInput,\n RelationshipTypeInput,\n VocabularyInput,\n} from './vocabulary.js';\n\nexport type {\n DetailLevel,\n Entity,\n EntitySummary,\n EntityBrief,\n CreateEntityInput,\n UpdateEntityInput,\n StoredEntity,\n StoredEntityUpdate,\n GetEntityOptions,\n GetEntitiesOptions,\n} from './entities.js';\n\nexport type {\n RelationshipDirection,\n Relationship,\n EnrichedRelationship,\n CreateRelationshipInput,\n StoredRelationship,\n RelationshipQueryOptions,\n RelationshipSummary,\n} from './relationships.js';\n\nexport type {\n RepositoryConfig,\n RepositoryMetadata,\n RepositoryUpdate,\n RepositorySummary,\n RepositoryStats,\n StoredRepository,\n StoredRepositorySummary,\n RepositoryFilter,\n StorageRepositoryConfig,\n} from './repositories.js';\n\nexport type {\n PaginationOptions,\n FindEntitiesQuery,\n ExploreOptions,\n PathOptions,\n ConceptSearchOptions,\n TimelineOptions,\n StorageFindQuery,\n StorageExploreOptions,\n StoragePathOptions,\n StorageTimelineOptions,\n SearchOptions,\n PropertyFilter,\n ProvenanceFilter,\n} from './queries.js';\n\nexport type {\n PaginatedResult,\n NeighbourhoodCentre,\n NeighbourhoodGroup,\n NeighbourhoodLayer,\n Neighbourhood,\n Path,\n PathResult,\n ScoredEntity,\n TimelineEntityRef,\n TimelineRelationshipDetail,\n TimelineEvent,\n TimelineResult,\n GraphResult,\n EntityMap,\n StorageNeighbourhoodGroup,\n StorageNeighbourhoodLayer,\n StorageNeighbourhood,\n StoragePath,\n StoragePathResult,\n StorageTimelineEvent,\n StorageTimelineResult,\n SearchHit,\n BulkImportResult,\n ReembedResult,\n} from './results.js';\n\nexport type {\n DeepMemoryEventType,\n EventPayload,\n DeepMemoryEvent,\n EventHandler,\n Unsubscribe,\n HookResult,\n} from './events.js';\n\nexport type {\n TraversalSpec,\n TraversalStart,\n TraversalStep,\n TraversalProjection,\n TraversalReturnMode,\n TraversalResult,\n TraversalAggregation,\n TraversalRelationship,\n TraversalPath,\n QueryMetadata,\n} from './traversal.js';\n\nexport type {\n ExportManifest,\n ExportLegalMetadata,\n ExportPipelineMetadata,\n ExportOptions,\n ExportArchive,\n ExportChunk,\n ExportStreamItem,\n ImportOptions,\n ImportChunk,\n BulkImportOptions,\n DeleteProgressCallback,\n ImportStreamHeader,\n ImportWarning,\n ImportResult,\n} from './portability.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BulkImportResult,
|
|
3
|
-
export { Q as QueryMetadata, b as
|
|
1
|
+
import { H as ProvenanceContext, C as CreateEntityInput, E as Entity, U as UpdateEntityInput, y as CreateRelationshipInput, N as Relationship, V as VocabularyChangeRecord } from '../portability-1KBMVBGJ.cjs';
|
|
2
|
+
export { B as BulkImportOptions, w as BulkImportResult, Y as ConceptSearchOptions, h as DeleteProgressCallback, D as DetailLevel, aa as EnrichedRelationship, b as EntityBrief, ab as EntityMap, a as EntitySummary, z as EntityTypeDefinition, ac as EntityTypeInput, Q as ExploreOptions, a3 as ExportArchive, v as ExportChunk, ad as ExportLegalMetadata, ae as ExportManifest, a2 as ExportOptions, af as ExportPipelineMetadata, a6 as ExportStreamItem, K as FindEntitiesQuery, ag as GetEntitiesOptions, ah as GetEntityOptions, G as GovernanceConfig, ai as GovernanceMode, O as GraphResult, I as ImportChunk, a4 as ImportOptions, a5 as ImportResult, a7 as ImportStreamHeader, aj as ImportWarning, M as MemoryVocabulary, T as Neighbourhood, ak as NeighbourhoodCentre, al as NeighbourhoodGroup, am as NeighbourhoodLayer, e as PaginatedResult, j as PaginationOptions, an as Path, W as PathOptions, X as PathResult, P as PropertyFilter, ao as PropertySchema, ap as PropertyType, J as Provenance, aq as ProvenanceFilter, L as ReembedResult, ar as RelationshipDirection, o as RelationshipQueryOptions, R as RelationshipSummary, as as RelationshipTypeDefinition, at as RelationshipTypeInput, a0 as RepositoryConfig, d as RepositoryFilter, au as RepositoryMetadata, i as RepositoryStats, a1 as RepositorySummary, g as RepositoryUpdate, x as ResolvedVocabulary, Z as ScoredEntity, a9 as SearchHit, a8 as SearchOptions, p as StorageExploreOptions, m as StorageFindQuery, q as StorageNeighbourhood, av as StorageNeighbourhoodGroup, aw as StorageNeighbourhoodLayer, ax as StoragePath, r as StoragePathOptions, s as StoragePathResult, S as StorageRepositoryConfig, ay as StorageTimelineEvent, t as StorageTimelineOptions, u as StorageTimelineResult, k as StoredEntity, l as StoredEntityUpdate, n as StoredRelationship, c as StoredRepository, f as StoredRepositorySummary, az as TimelineEntityRef, aA as TimelineEvent, _ as TimelineOptions, aB as TimelineRelationshipDetail, $ as TimelineResult, aC as VocabularyInput, A as VocabularyProposal, F as VocabularyProposalResult } from '../portability-1KBMVBGJ.cjs';
|
|
3
|
+
export { Q as QueryMetadata, b as TraversalAggregation, c as TraversalPath, d as TraversalProjection, e as TraversalRelationship, a as TraversalResult, f as TraversalReturnMode, T as TraversalSpec, g as TraversalStart, h as TraversalStep } from '../traversal-DQynd-to.cjs';
|
|
4
4
|
|
|
5
5
|
/** All event types emitted by the Deep Memory engine */
|
|
6
|
-
type DeepMemoryEventType = 'repository:created' | 'repository:opened' | 'repository:updated' | 'repository:deleted' | 'entity:creating' | 'entity:created' | 'entity:updating' | 'entity:updated' | 'entity:deleting' | 'entity:deleted' | 'relationship:creating' | 'relationship:created' | 'relationship:removing' | 'relationship:removed' | 'vocabulary:proposal' | 'vocabulary:approved' | 'vocabulary:rejected' | 'vocabulary:pending' | 'vocabulary:changed' | 'validation:failed' | 'search:executed' | 'reembed:started' | 'reembed:progress' | 'reembed:completed' | 'reembed:failed' | 'export:started' | 'export:progress' | 'export:completed' | 'import:started' | 'import:progress' | 'import:completed' | 'import:failed';
|
|
6
|
+
type DeepMemoryEventType = 'repository:created' | 'repository:opened' | 'repository:updated' | 'repository:deleted' | 'entity:creating' | 'entity:created' | 'entity:updating' | 'entity:updated' | 'entity:deleting' | 'entity:deleted' | 'relationship:creating' | 'relationship:created' | 'relationship:removing' | 'relationship:removed' | 'vocabulary:proposal' | 'vocabulary:approved' | 'vocabulary:rejected' | 'vocabulary:pending' | 'vocabulary:changed' | 'validation:failed' | 'search:executed' | 'reembed:started' | 'reembed:progress' | 'reembed:completed' | 'reembed:failed' | 'export:started' | 'export:progress' | 'export:completed' | 'import:started' | 'import:progress' | 'import:completed' | 'import:failed' | 'delete:started' | 'delete:progress' | 'delete:completed';
|
|
7
7
|
/** Type-safe event payload mapping */
|
|
8
8
|
type EventPayload<T extends DeepMemoryEventType> = T extends 'repository:created' ? {
|
|
9
9
|
repositoryId: string;
|
|
@@ -76,10 +76,16 @@ type EventPayload<T extends DeepMemoryEventType> = T extends 'repository:created
|
|
|
76
76
|
error: string;
|
|
77
77
|
} : T extends 'export:started' ? {
|
|
78
78
|
repositoryId: string;
|
|
79
|
+
totalEntities: number;
|
|
80
|
+
totalRelationships: number;
|
|
79
81
|
} : T extends 'export:progress' ? {
|
|
80
82
|
repositoryId: string;
|
|
81
83
|
entitiesExported: number;
|
|
84
|
+
relationshipsExported: number;
|
|
82
85
|
totalEntities: number;
|
|
86
|
+
totalRelationships: number;
|
|
87
|
+
chunksCompleted: number;
|
|
88
|
+
totalChunks: number;
|
|
83
89
|
} : T extends 'export:completed' ? {
|
|
84
90
|
repositoryId: string;
|
|
85
91
|
entityCount: number;
|
|
@@ -89,7 +95,11 @@ type EventPayload<T extends DeepMemoryEventType> = T extends 'repository:created
|
|
|
89
95
|
} : T extends 'import:progress' ? {
|
|
90
96
|
repositoryId: string;
|
|
91
97
|
entitiesImported: number;
|
|
98
|
+
relationshipsImported: number;
|
|
92
99
|
totalEntities: number;
|
|
100
|
+
totalRelationships: number;
|
|
101
|
+
chunksCompleted: number;
|
|
102
|
+
totalChunks: number;
|
|
93
103
|
} : T extends 'import:completed' ? {
|
|
94
104
|
repositoryId: string;
|
|
95
105
|
entitiesImported: number;
|
|
@@ -97,6 +107,20 @@ type EventPayload<T extends DeepMemoryEventType> = T extends 'repository:created
|
|
|
97
107
|
} : T extends 'import:failed' ? {
|
|
98
108
|
repositoryId: string;
|
|
99
109
|
error: string;
|
|
110
|
+
} : T extends 'delete:started' ? {
|
|
111
|
+
repositoryId: string;
|
|
112
|
+
totalEntities: number;
|
|
113
|
+
totalRelationships: number;
|
|
114
|
+
} : T extends 'delete:progress' ? {
|
|
115
|
+
repositoryId: string;
|
|
116
|
+
entitiesDeleted: number;
|
|
117
|
+
relationshipsDeleted: number;
|
|
118
|
+
totalEntities: number;
|
|
119
|
+
totalRelationships: number;
|
|
120
|
+
} : T extends 'delete:completed' ? {
|
|
121
|
+
repositoryId: string;
|
|
122
|
+
entitiesDeleted: number;
|
|
123
|
+
relationshipsDeleted: number;
|
|
100
124
|
} : Record<string, unknown>;
|
|
101
125
|
/** A typed event emitted by the engine */
|
|
102
126
|
interface DeepMemoryEvent<T extends DeepMemoryEventType> {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BulkImportResult,
|
|
3
|
-
export { Q as QueryMetadata, b as
|
|
1
|
+
import { H as ProvenanceContext, C as CreateEntityInput, E as Entity, U as UpdateEntityInput, y as CreateRelationshipInput, N as Relationship, V as VocabularyChangeRecord } from '../portability-1KBMVBGJ.js';
|
|
2
|
+
export { B as BulkImportOptions, w as BulkImportResult, Y as ConceptSearchOptions, h as DeleteProgressCallback, D as DetailLevel, aa as EnrichedRelationship, b as EntityBrief, ab as EntityMap, a as EntitySummary, z as EntityTypeDefinition, ac as EntityTypeInput, Q as ExploreOptions, a3 as ExportArchive, v as ExportChunk, ad as ExportLegalMetadata, ae as ExportManifest, a2 as ExportOptions, af as ExportPipelineMetadata, a6 as ExportStreamItem, K as FindEntitiesQuery, ag as GetEntitiesOptions, ah as GetEntityOptions, G as GovernanceConfig, ai as GovernanceMode, O as GraphResult, I as ImportChunk, a4 as ImportOptions, a5 as ImportResult, a7 as ImportStreamHeader, aj as ImportWarning, M as MemoryVocabulary, T as Neighbourhood, ak as NeighbourhoodCentre, al as NeighbourhoodGroup, am as NeighbourhoodLayer, e as PaginatedResult, j as PaginationOptions, an as Path, W as PathOptions, X as PathResult, P as PropertyFilter, ao as PropertySchema, ap as PropertyType, J as Provenance, aq as ProvenanceFilter, L as ReembedResult, ar as RelationshipDirection, o as RelationshipQueryOptions, R as RelationshipSummary, as as RelationshipTypeDefinition, at as RelationshipTypeInput, a0 as RepositoryConfig, d as RepositoryFilter, au as RepositoryMetadata, i as RepositoryStats, a1 as RepositorySummary, g as RepositoryUpdate, x as ResolvedVocabulary, Z as ScoredEntity, a9 as SearchHit, a8 as SearchOptions, p as StorageExploreOptions, m as StorageFindQuery, q as StorageNeighbourhood, av as StorageNeighbourhoodGroup, aw as StorageNeighbourhoodLayer, ax as StoragePath, r as StoragePathOptions, s as StoragePathResult, S as StorageRepositoryConfig, ay as StorageTimelineEvent, t as StorageTimelineOptions, u as StorageTimelineResult, k as StoredEntity, l as StoredEntityUpdate, n as StoredRelationship, c as StoredRepository, f as StoredRepositorySummary, az as TimelineEntityRef, aA as TimelineEvent, _ as TimelineOptions, aB as TimelineRelationshipDetail, $ as TimelineResult, aC as VocabularyInput, A as VocabularyProposal, F as VocabularyProposalResult } from '../portability-1KBMVBGJ.js';
|
|
3
|
+
export { Q as QueryMetadata, b as TraversalAggregation, c as TraversalPath, d as TraversalProjection, e as TraversalRelationship, a as TraversalResult, f as TraversalReturnMode, T as TraversalSpec, g as TraversalStart, h as TraversalStep } from '../traversal-B4SUysM-.js';
|
|
4
4
|
|
|
5
5
|
/** All event types emitted by the Deep Memory engine */
|
|
6
|
-
type DeepMemoryEventType = 'repository:created' | 'repository:opened' | 'repository:updated' | 'repository:deleted' | 'entity:creating' | 'entity:created' | 'entity:updating' | 'entity:updated' | 'entity:deleting' | 'entity:deleted' | 'relationship:creating' | 'relationship:created' | 'relationship:removing' | 'relationship:removed' | 'vocabulary:proposal' | 'vocabulary:approved' | 'vocabulary:rejected' | 'vocabulary:pending' | 'vocabulary:changed' | 'validation:failed' | 'search:executed' | 'reembed:started' | 'reembed:progress' | 'reembed:completed' | 'reembed:failed' | 'export:started' | 'export:progress' | 'export:completed' | 'import:started' | 'import:progress' | 'import:completed' | 'import:failed';
|
|
6
|
+
type DeepMemoryEventType = 'repository:created' | 'repository:opened' | 'repository:updated' | 'repository:deleted' | 'entity:creating' | 'entity:created' | 'entity:updating' | 'entity:updated' | 'entity:deleting' | 'entity:deleted' | 'relationship:creating' | 'relationship:created' | 'relationship:removing' | 'relationship:removed' | 'vocabulary:proposal' | 'vocabulary:approved' | 'vocabulary:rejected' | 'vocabulary:pending' | 'vocabulary:changed' | 'validation:failed' | 'search:executed' | 'reembed:started' | 'reembed:progress' | 'reembed:completed' | 'reembed:failed' | 'export:started' | 'export:progress' | 'export:completed' | 'import:started' | 'import:progress' | 'import:completed' | 'import:failed' | 'delete:started' | 'delete:progress' | 'delete:completed';
|
|
7
7
|
/** Type-safe event payload mapping */
|
|
8
8
|
type EventPayload<T extends DeepMemoryEventType> = T extends 'repository:created' ? {
|
|
9
9
|
repositoryId: string;
|
|
@@ -76,10 +76,16 @@ type EventPayload<T extends DeepMemoryEventType> = T extends 'repository:created
|
|
|
76
76
|
error: string;
|
|
77
77
|
} : T extends 'export:started' ? {
|
|
78
78
|
repositoryId: string;
|
|
79
|
+
totalEntities: number;
|
|
80
|
+
totalRelationships: number;
|
|
79
81
|
} : T extends 'export:progress' ? {
|
|
80
82
|
repositoryId: string;
|
|
81
83
|
entitiesExported: number;
|
|
84
|
+
relationshipsExported: number;
|
|
82
85
|
totalEntities: number;
|
|
86
|
+
totalRelationships: number;
|
|
87
|
+
chunksCompleted: number;
|
|
88
|
+
totalChunks: number;
|
|
83
89
|
} : T extends 'export:completed' ? {
|
|
84
90
|
repositoryId: string;
|
|
85
91
|
entityCount: number;
|
|
@@ -89,7 +95,11 @@ type EventPayload<T extends DeepMemoryEventType> = T extends 'repository:created
|
|
|
89
95
|
} : T extends 'import:progress' ? {
|
|
90
96
|
repositoryId: string;
|
|
91
97
|
entitiesImported: number;
|
|
98
|
+
relationshipsImported: number;
|
|
92
99
|
totalEntities: number;
|
|
100
|
+
totalRelationships: number;
|
|
101
|
+
chunksCompleted: number;
|
|
102
|
+
totalChunks: number;
|
|
93
103
|
} : T extends 'import:completed' ? {
|
|
94
104
|
repositoryId: string;
|
|
95
105
|
entitiesImported: number;
|
|
@@ -97,6 +107,20 @@ type EventPayload<T extends DeepMemoryEventType> = T extends 'repository:created
|
|
|
97
107
|
} : T extends 'import:failed' ? {
|
|
98
108
|
repositoryId: string;
|
|
99
109
|
error: string;
|
|
110
|
+
} : T extends 'delete:started' ? {
|
|
111
|
+
repositoryId: string;
|
|
112
|
+
totalEntities: number;
|
|
113
|
+
totalRelationships: number;
|
|
114
|
+
} : T extends 'delete:progress' ? {
|
|
115
|
+
repositoryId: string;
|
|
116
|
+
entitiesDeleted: number;
|
|
117
|
+
relationshipsDeleted: number;
|
|
118
|
+
totalEntities: number;
|
|
119
|
+
totalRelationships: number;
|
|
120
|
+
} : T extends 'delete:completed' ? {
|
|
121
|
+
repositoryId: string;
|
|
122
|
+
entitiesDeleted: number;
|
|
123
|
+
relationshipsDeleted: number;
|
|
100
124
|
} : Record<string, unknown>;
|
|
101
125
|
/** A typed event emitted by the engine */
|
|
102
126
|
interface DeepMemoryEvent<T extends DeepMemoryEventType> {
|