@utaba/deep-memory 0.6.1 → 0.7.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-ynfpc5wz.d.ts → StorageProvider-CX4mKNph.d.cts} +11 -1
- package/dist/{StorageProvider-CBhwqavV.d.cts → StorageProvider-CrIcN06Q.d.ts} +11 -1
- package/dist/index.cjs +618 -238
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -26
- package/dist/index.d.ts +81 -26
- package/dist/index.js +616 -238
- package/dist/index.js.map +1 -1
- package/dist/{portability-B-8J4nQQ.d.cts → portability-fa5sVgsP.d.cts} +120 -9
- package/dist/{portability-B-8J4nQQ.d.ts → portability-fa5sVgsP.d.ts} +120 -9
- package/dist/providers/index.cjs.map +1 -1
- package/dist/providers/index.d.cts +17 -4
- package/dist/providers/index.d.ts +17 -4
- package/dist/testing/conformance.cjs +36 -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 +36 -0
- package/dist/testing/conformance.js.map +1 -1
- package/dist/{traversal-Llalk03r.d.cts → traversal-CXqN780S.d.cts} +1 -1
- package/dist/{traversal-BdmDLMxV.d.ts → traversal-DpSdLzxn.d.ts} +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/package.json +1 -1
|
@@ -255,12 +255,24 @@ interface CreateEntityInput {
|
|
|
255
255
|
}
|
|
256
256
|
/** Input for updating an existing entity */
|
|
257
257
|
interface UpdateEntityInput {
|
|
258
|
+
/**
|
|
259
|
+
* Change the entity's type. Must exist in the vocabulary. The slug is
|
|
260
|
+
* regenerated with the new type prefix, and any provided `properties` are
|
|
261
|
+
* validated against the new type's schema.
|
|
262
|
+
*/
|
|
263
|
+
entityType?: string;
|
|
258
264
|
label?: string;
|
|
259
|
-
|
|
260
|
-
|
|
265
|
+
/** `undefined` preserves the existing value; `null` clears it. */
|
|
266
|
+
summary?: string | null;
|
|
267
|
+
/**
|
|
268
|
+
* Merged with existing properties. A property value of `null` deletes that
|
|
269
|
+
* key from the entity's properties (RFC 7396 JSON Merge Patch semantics).
|
|
270
|
+
*/
|
|
261
271
|
properties?: Record<string, unknown>;
|
|
262
|
-
|
|
263
|
-
|
|
272
|
+
/** `undefined` preserves the existing value; `null` clears it. */
|
|
273
|
+
data?: string | null;
|
|
274
|
+
/** `undefined` preserves the existing value; `null` clears it. */
|
|
275
|
+
dataFormat?: string | null;
|
|
264
276
|
/** Force regeneration of the embedding vector (e.g. after switching embedding models) */
|
|
265
277
|
reembed?: boolean;
|
|
266
278
|
}
|
|
@@ -278,14 +290,23 @@ interface StoredEntity {
|
|
|
278
290
|
/** Vector embedding of the entity (label + summary + properties) */
|
|
279
291
|
embedding?: number[];
|
|
280
292
|
}
|
|
281
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* Internal update representation for the storage provider.
|
|
295
|
+
*
|
|
296
|
+
* For optional string fields (`summary`, `data`, `dataFormat`), the tri-state
|
|
297
|
+
* applies: `undefined` preserves the existing value, `null` clears it, and a
|
|
298
|
+
* string sets the new value. For `properties`, storage receives the fully
|
|
299
|
+
* merged map that the caller wants persisted — key deletions are already
|
|
300
|
+
* applied upstream, so storage can replace the stored map wholesale.
|
|
301
|
+
*/
|
|
282
302
|
interface StoredEntityUpdate {
|
|
303
|
+
entityType?: string;
|
|
283
304
|
label?: string;
|
|
284
305
|
slug?: string;
|
|
285
|
-
summary?: string;
|
|
306
|
+
summary?: string | null;
|
|
286
307
|
properties?: Record<string, unknown>;
|
|
287
|
-
data?: string;
|
|
288
|
-
dataFormat?: string;
|
|
308
|
+
data?: string | null;
|
|
309
|
+
dataFormat?: string | null;
|
|
289
310
|
provenance: Provenance;
|
|
290
311
|
embedding?: number[];
|
|
291
312
|
}
|
|
@@ -298,6 +319,14 @@ interface GetEntitiesOptions {
|
|
|
298
319
|
/** Only "brief" or "summary" for batch retrieval */
|
|
299
320
|
detailLevel?: 'brief' | 'summary';
|
|
300
321
|
}
|
|
322
|
+
/** Result of a bulk entity deletion */
|
|
323
|
+
interface DeleteEntitiesResult {
|
|
324
|
+
deleted: string[];
|
|
325
|
+
failed: Array<{
|
|
326
|
+
id: string;
|
|
327
|
+
error: string;
|
|
328
|
+
}>;
|
|
329
|
+
}
|
|
301
330
|
|
|
302
331
|
/** Pagination options used across all paginated queries */
|
|
303
332
|
interface PaginationOptions {
|
|
@@ -496,6 +525,14 @@ interface RelationshipSummary {
|
|
|
496
525
|
outbound: Record<string, number>;
|
|
497
526
|
inbound: Record<string, number>;
|
|
498
527
|
}
|
|
528
|
+
/** Result of a bulk relationship removal */
|
|
529
|
+
interface RemoveRelationshipsResult {
|
|
530
|
+
removed: string[];
|
|
531
|
+
failed: Array<{
|
|
532
|
+
id: string;
|
|
533
|
+
error: string;
|
|
534
|
+
}>;
|
|
535
|
+
}
|
|
499
536
|
/** Options for querying relationships of an entity */
|
|
500
537
|
interface RelationshipQueryOptions {
|
|
501
538
|
/** Filter by relationship type(s) */
|
|
@@ -617,6 +654,18 @@ interface StorageRepositoryConfig {
|
|
|
617
654
|
createdBy: string;
|
|
618
655
|
}
|
|
619
656
|
|
|
657
|
+
/** A single validation error with optional suggestion */
|
|
658
|
+
interface ValidationError {
|
|
659
|
+
field: string;
|
|
660
|
+
message: string;
|
|
661
|
+
suggestion?: string;
|
|
662
|
+
}
|
|
663
|
+
/** Result of a validation check */
|
|
664
|
+
interface ValidationResult {
|
|
665
|
+
valid: boolean;
|
|
666
|
+
errors: ValidationError[];
|
|
667
|
+
}
|
|
668
|
+
|
|
620
669
|
/** Paginated result wrapper */
|
|
621
670
|
interface PaginatedResult<T> {
|
|
622
671
|
items: T[];
|
|
@@ -782,6 +831,68 @@ interface ReembedResult {
|
|
|
782
831
|
modelId: string;
|
|
783
832
|
dimensions: number;
|
|
784
833
|
}
|
|
834
|
+
/** A single entity that failed vocabulary validation */
|
|
835
|
+
interface EntityValidationIssue {
|
|
836
|
+
entityId: string;
|
|
837
|
+
slug: string;
|
|
838
|
+
entityType: string;
|
|
839
|
+
label: string;
|
|
840
|
+
errors: ValidationError[];
|
|
841
|
+
}
|
|
842
|
+
/** A single relationship that failed vocabulary validation */
|
|
843
|
+
interface RelationshipValidationIssue {
|
|
844
|
+
relationshipId: string;
|
|
845
|
+
relationshipType: string;
|
|
846
|
+
sourceEntityId: string;
|
|
847
|
+
targetEntityId: string;
|
|
848
|
+
/** Label of the source entity if it exists (aids human/AI diagnosis) */
|
|
849
|
+
sourceLabel?: string;
|
|
850
|
+
/** Label of the target entity if it exists */
|
|
851
|
+
targetLabel?: string;
|
|
852
|
+
/** Type of the source entity if it exists (for context on type-mismatch errors) */
|
|
853
|
+
sourceEntityType?: string;
|
|
854
|
+
/** Type of the target entity if it exists */
|
|
855
|
+
targetEntityType?: string;
|
|
856
|
+
errors: ValidationError[];
|
|
857
|
+
}
|
|
858
|
+
/** One page of entity validation results from RepositoryValidator.validateEntities() */
|
|
859
|
+
interface EntityValidationPage {
|
|
860
|
+
issues: EntityValidationIssue[];
|
|
861
|
+
/** Number of entities inspected in this call (for diagnostics; not bounded by take) */
|
|
862
|
+
scanned: number;
|
|
863
|
+
/** Issue-offset to pass on the next call; equal to the input offset + issues.length */
|
|
864
|
+
nextOffset: number;
|
|
865
|
+
/** True when the export stream ended before take was hit (no further issues beyond this page) */
|
|
866
|
+
done: boolean;
|
|
867
|
+
}
|
|
868
|
+
/** One page of relationship validation results from RepositoryValidator.validateRelationships() */
|
|
869
|
+
interface RelationshipValidationPage {
|
|
870
|
+
issues: RelationshipValidationIssue[];
|
|
871
|
+
/** Number of relationships inspected in this call (for diagnostics; not bounded by take) */
|
|
872
|
+
scanned: number;
|
|
873
|
+
/** Issue-offset to pass on the next call; equal to the input offset + issues.length */
|
|
874
|
+
nextOffset: number;
|
|
875
|
+
/** True when the export stream ended before take was hit (no further issues beyond this page) */
|
|
876
|
+
done: boolean;
|
|
877
|
+
/** Number of entities loaded into the resolution map (for diagnostics) */
|
|
878
|
+
entitiesInMap: number;
|
|
879
|
+
}
|
|
880
|
+
interface ValidateEntitiesOptions {
|
|
881
|
+
/** Number of issues to skip before returning (not entities); default 0 */
|
|
882
|
+
offset?: number;
|
|
883
|
+
/** Maximum number of issues to return in this call; default 200 */
|
|
884
|
+
take?: number;
|
|
885
|
+
/** Milliseconds to pause between export chunks (for manual rate limiting); default 0 */
|
|
886
|
+
delayBetweenChunksMs?: number;
|
|
887
|
+
}
|
|
888
|
+
interface ValidateRelationshipsOptions {
|
|
889
|
+
/** Number of issues to skip before returning (not relationships); default 0 */
|
|
890
|
+
offset?: number;
|
|
891
|
+
/** Maximum number of issues to return in this call; default 200 */
|
|
892
|
+
take?: number;
|
|
893
|
+
/** Milliseconds to pause between export chunks (for manual rate limiting); default 0 */
|
|
894
|
+
delayBetweenChunksMs?: number;
|
|
895
|
+
}
|
|
785
896
|
|
|
786
897
|
/** Manifest describing an exported repository archive */
|
|
787
898
|
interface ExportManifest {
|
|
@@ -955,4 +1066,4 @@ interface ImportResult {
|
|
|
955
1066
|
warnings: ImportWarning[];
|
|
956
1067
|
}
|
|
957
1068
|
|
|
958
|
-
export type {
|
|
1069
|
+
export type { ConceptSearchOptions as $, EntityTypeDefinition as A, BulkImportOptions as B, CreateEntityInput as C, DetailLevel as D, Entity as E, VocabularyProposal as F, GovernanceConfig as G, VocabularyProposalResult as H, ImportChunk as I, ProvenanceContext as J, Provenance as K, FindEntitiesQuery as L, MemoryVocabulary as M, DeleteEntitiesResult as N, ReembedResult as O, PropertyFilter as P, Relationship as Q, RelationshipSummary as R, StorageRepositoryConfig as S, RemoveRelationshipsResult as T, UpdateEntityInput as U, VocabularyChangeRecord as V, GraphResult as W, ExploreOptions as X, Neighborhood as Y, PathOptions as Z, PathResult as _, EntitySummary as a, ScoredEntity as a0, TimelineOptions as a1, TimelineResult as a2, ValidateEntitiesOptions as a3, EntityValidationPage as a4, ValidateRelationshipsOptions as a5, RelationshipValidationPage as a6, RepositoryConfig as a7, RepositorySummary as a8, ExportOptions as a9, RelationshipTypeDefinition as aA, RelationshipTypeInput as aB, RelationshipValidationIssue as aC, RepositoryMetadata as aD, StorageNeighborhoodGroup as aE, StorageNeighborhoodLayer as aF, StoragePath as aG, StorageTimelineEvent as aH, TimelineEntityRef as aI, TimelineEvent as aJ, TimelineRelationshipDetail as aK, VocabularyInput as aL, ExportArchive as aa, ImportOptions as ab, ImportResult as ac, ExportStreamItem as ad, ImportStreamHeader as ae, SearchOptions as af, SearchHit as ag, EnrichedRelationship as ah, EntityMap as ai, EntityTypeInput as aj, EntityValidationIssue as ak, ExportLegalMetadata as al, ExportManifest as am, ExportPipelineMetadata as an, GetEntitiesOptions as ao, GetEntityOptions as ap, GovernanceMode as aq, ImportWarning as ar, NeighborhoodCenter as as, NeighborhoodGroup as at, NeighborhoodLayer as au, Path as av, PropertySchema as aw, PropertyType as ax, ProvenanceFilter as ay, RelationshipDirection as az, EntityBrief as b, StoredRepository as c, RepositoryFilter as d, PaginatedResult as e, StoredRepositorySummary as f, RepositoryUpdate as g, DeleteProgressCallback as h, RepositoryStats as i, PaginationOptions as j, StoredEntity as k, StoredEntityUpdate as l, StorageFindQuery as m, StoredRelationship as n, RelationshipQueryOptions as o, StorageExploreOptions as p, StorageNeighborhood as q, StoragePathOptions as r, StoragePathResult as s, StorageTimelineOptions as t, StorageTimelineResult as u, ExportChunk as v, BulkImportResult as w, ResolvedVocabulary as x, ValidationResult as y, CreateRelationshipInput as z };
|
|
@@ -255,12 +255,24 @@ interface CreateEntityInput {
|
|
|
255
255
|
}
|
|
256
256
|
/** Input for updating an existing entity */
|
|
257
257
|
interface UpdateEntityInput {
|
|
258
|
+
/**
|
|
259
|
+
* Change the entity's type. Must exist in the vocabulary. The slug is
|
|
260
|
+
* regenerated with the new type prefix, and any provided `properties` are
|
|
261
|
+
* validated against the new type's schema.
|
|
262
|
+
*/
|
|
263
|
+
entityType?: string;
|
|
258
264
|
label?: string;
|
|
259
|
-
|
|
260
|
-
|
|
265
|
+
/** `undefined` preserves the existing value; `null` clears it. */
|
|
266
|
+
summary?: string | null;
|
|
267
|
+
/**
|
|
268
|
+
* Merged with existing properties. A property value of `null` deletes that
|
|
269
|
+
* key from the entity's properties (RFC 7396 JSON Merge Patch semantics).
|
|
270
|
+
*/
|
|
261
271
|
properties?: Record<string, unknown>;
|
|
262
|
-
|
|
263
|
-
|
|
272
|
+
/** `undefined` preserves the existing value; `null` clears it. */
|
|
273
|
+
data?: string | null;
|
|
274
|
+
/** `undefined` preserves the existing value; `null` clears it. */
|
|
275
|
+
dataFormat?: string | null;
|
|
264
276
|
/** Force regeneration of the embedding vector (e.g. after switching embedding models) */
|
|
265
277
|
reembed?: boolean;
|
|
266
278
|
}
|
|
@@ -278,14 +290,23 @@ interface StoredEntity {
|
|
|
278
290
|
/** Vector embedding of the entity (label + summary + properties) */
|
|
279
291
|
embedding?: number[];
|
|
280
292
|
}
|
|
281
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* Internal update representation for the storage provider.
|
|
295
|
+
*
|
|
296
|
+
* For optional string fields (`summary`, `data`, `dataFormat`), the tri-state
|
|
297
|
+
* applies: `undefined` preserves the existing value, `null` clears it, and a
|
|
298
|
+
* string sets the new value. For `properties`, storage receives the fully
|
|
299
|
+
* merged map that the caller wants persisted — key deletions are already
|
|
300
|
+
* applied upstream, so storage can replace the stored map wholesale.
|
|
301
|
+
*/
|
|
282
302
|
interface StoredEntityUpdate {
|
|
303
|
+
entityType?: string;
|
|
283
304
|
label?: string;
|
|
284
305
|
slug?: string;
|
|
285
|
-
summary?: string;
|
|
306
|
+
summary?: string | null;
|
|
286
307
|
properties?: Record<string, unknown>;
|
|
287
|
-
data?: string;
|
|
288
|
-
dataFormat?: string;
|
|
308
|
+
data?: string | null;
|
|
309
|
+
dataFormat?: string | null;
|
|
289
310
|
provenance: Provenance;
|
|
290
311
|
embedding?: number[];
|
|
291
312
|
}
|
|
@@ -298,6 +319,14 @@ interface GetEntitiesOptions {
|
|
|
298
319
|
/** Only "brief" or "summary" for batch retrieval */
|
|
299
320
|
detailLevel?: 'brief' | 'summary';
|
|
300
321
|
}
|
|
322
|
+
/** Result of a bulk entity deletion */
|
|
323
|
+
interface DeleteEntitiesResult {
|
|
324
|
+
deleted: string[];
|
|
325
|
+
failed: Array<{
|
|
326
|
+
id: string;
|
|
327
|
+
error: string;
|
|
328
|
+
}>;
|
|
329
|
+
}
|
|
301
330
|
|
|
302
331
|
/** Pagination options used across all paginated queries */
|
|
303
332
|
interface PaginationOptions {
|
|
@@ -496,6 +525,14 @@ interface RelationshipSummary {
|
|
|
496
525
|
outbound: Record<string, number>;
|
|
497
526
|
inbound: Record<string, number>;
|
|
498
527
|
}
|
|
528
|
+
/** Result of a bulk relationship removal */
|
|
529
|
+
interface RemoveRelationshipsResult {
|
|
530
|
+
removed: string[];
|
|
531
|
+
failed: Array<{
|
|
532
|
+
id: string;
|
|
533
|
+
error: string;
|
|
534
|
+
}>;
|
|
535
|
+
}
|
|
499
536
|
/** Options for querying relationships of an entity */
|
|
500
537
|
interface RelationshipQueryOptions {
|
|
501
538
|
/** Filter by relationship type(s) */
|
|
@@ -617,6 +654,18 @@ interface StorageRepositoryConfig {
|
|
|
617
654
|
createdBy: string;
|
|
618
655
|
}
|
|
619
656
|
|
|
657
|
+
/** A single validation error with optional suggestion */
|
|
658
|
+
interface ValidationError {
|
|
659
|
+
field: string;
|
|
660
|
+
message: string;
|
|
661
|
+
suggestion?: string;
|
|
662
|
+
}
|
|
663
|
+
/** Result of a validation check */
|
|
664
|
+
interface ValidationResult {
|
|
665
|
+
valid: boolean;
|
|
666
|
+
errors: ValidationError[];
|
|
667
|
+
}
|
|
668
|
+
|
|
620
669
|
/** Paginated result wrapper */
|
|
621
670
|
interface PaginatedResult<T> {
|
|
622
671
|
items: T[];
|
|
@@ -782,6 +831,68 @@ interface ReembedResult {
|
|
|
782
831
|
modelId: string;
|
|
783
832
|
dimensions: number;
|
|
784
833
|
}
|
|
834
|
+
/** A single entity that failed vocabulary validation */
|
|
835
|
+
interface EntityValidationIssue {
|
|
836
|
+
entityId: string;
|
|
837
|
+
slug: string;
|
|
838
|
+
entityType: string;
|
|
839
|
+
label: string;
|
|
840
|
+
errors: ValidationError[];
|
|
841
|
+
}
|
|
842
|
+
/** A single relationship that failed vocabulary validation */
|
|
843
|
+
interface RelationshipValidationIssue {
|
|
844
|
+
relationshipId: string;
|
|
845
|
+
relationshipType: string;
|
|
846
|
+
sourceEntityId: string;
|
|
847
|
+
targetEntityId: string;
|
|
848
|
+
/** Label of the source entity if it exists (aids human/AI diagnosis) */
|
|
849
|
+
sourceLabel?: string;
|
|
850
|
+
/** Label of the target entity if it exists */
|
|
851
|
+
targetLabel?: string;
|
|
852
|
+
/** Type of the source entity if it exists (for context on type-mismatch errors) */
|
|
853
|
+
sourceEntityType?: string;
|
|
854
|
+
/** Type of the target entity if it exists */
|
|
855
|
+
targetEntityType?: string;
|
|
856
|
+
errors: ValidationError[];
|
|
857
|
+
}
|
|
858
|
+
/** One page of entity validation results from RepositoryValidator.validateEntities() */
|
|
859
|
+
interface EntityValidationPage {
|
|
860
|
+
issues: EntityValidationIssue[];
|
|
861
|
+
/** Number of entities inspected in this call (for diagnostics; not bounded by take) */
|
|
862
|
+
scanned: number;
|
|
863
|
+
/** Issue-offset to pass on the next call; equal to the input offset + issues.length */
|
|
864
|
+
nextOffset: number;
|
|
865
|
+
/** True when the export stream ended before take was hit (no further issues beyond this page) */
|
|
866
|
+
done: boolean;
|
|
867
|
+
}
|
|
868
|
+
/** One page of relationship validation results from RepositoryValidator.validateRelationships() */
|
|
869
|
+
interface RelationshipValidationPage {
|
|
870
|
+
issues: RelationshipValidationIssue[];
|
|
871
|
+
/** Number of relationships inspected in this call (for diagnostics; not bounded by take) */
|
|
872
|
+
scanned: number;
|
|
873
|
+
/** Issue-offset to pass on the next call; equal to the input offset + issues.length */
|
|
874
|
+
nextOffset: number;
|
|
875
|
+
/** True when the export stream ended before take was hit (no further issues beyond this page) */
|
|
876
|
+
done: boolean;
|
|
877
|
+
/** Number of entities loaded into the resolution map (for diagnostics) */
|
|
878
|
+
entitiesInMap: number;
|
|
879
|
+
}
|
|
880
|
+
interface ValidateEntitiesOptions {
|
|
881
|
+
/** Number of issues to skip before returning (not entities); default 0 */
|
|
882
|
+
offset?: number;
|
|
883
|
+
/** Maximum number of issues to return in this call; default 200 */
|
|
884
|
+
take?: number;
|
|
885
|
+
/** Milliseconds to pause between export chunks (for manual rate limiting); default 0 */
|
|
886
|
+
delayBetweenChunksMs?: number;
|
|
887
|
+
}
|
|
888
|
+
interface ValidateRelationshipsOptions {
|
|
889
|
+
/** Number of issues to skip before returning (not relationships); default 0 */
|
|
890
|
+
offset?: number;
|
|
891
|
+
/** Maximum number of issues to return in this call; default 200 */
|
|
892
|
+
take?: number;
|
|
893
|
+
/** Milliseconds to pause between export chunks (for manual rate limiting); default 0 */
|
|
894
|
+
delayBetweenChunksMs?: number;
|
|
895
|
+
}
|
|
785
896
|
|
|
786
897
|
/** Manifest describing an exported repository archive */
|
|
787
898
|
interface ExportManifest {
|
|
@@ -955,4 +1066,4 @@ interface ImportResult {
|
|
|
955
1066
|
warnings: ImportWarning[];
|
|
956
1067
|
}
|
|
957
1068
|
|
|
958
|
-
export type {
|
|
1069
|
+
export type { ConceptSearchOptions as $, EntityTypeDefinition as A, BulkImportOptions as B, CreateEntityInput as C, DetailLevel as D, Entity as E, VocabularyProposal as F, GovernanceConfig as G, VocabularyProposalResult as H, ImportChunk as I, ProvenanceContext as J, Provenance as K, FindEntitiesQuery as L, MemoryVocabulary as M, DeleteEntitiesResult as N, ReembedResult as O, PropertyFilter as P, Relationship as Q, RelationshipSummary as R, StorageRepositoryConfig as S, RemoveRelationshipsResult as T, UpdateEntityInput as U, VocabularyChangeRecord as V, GraphResult as W, ExploreOptions as X, Neighborhood as Y, PathOptions as Z, PathResult as _, EntitySummary as a, ScoredEntity as a0, TimelineOptions as a1, TimelineResult as a2, ValidateEntitiesOptions as a3, EntityValidationPage as a4, ValidateRelationshipsOptions as a5, RelationshipValidationPage as a6, RepositoryConfig as a7, RepositorySummary as a8, ExportOptions as a9, RelationshipTypeDefinition as aA, RelationshipTypeInput as aB, RelationshipValidationIssue as aC, RepositoryMetadata as aD, StorageNeighborhoodGroup as aE, StorageNeighborhoodLayer as aF, StoragePath as aG, StorageTimelineEvent as aH, TimelineEntityRef as aI, TimelineEvent as aJ, TimelineRelationshipDetail as aK, VocabularyInput as aL, ExportArchive as aa, ImportOptions as ab, ImportResult as ac, ExportStreamItem as ad, ImportStreamHeader as ae, SearchOptions as af, SearchHit as ag, EnrichedRelationship as ah, EntityMap as ai, EntityTypeInput as aj, EntityValidationIssue as ak, ExportLegalMetadata as al, ExportManifest as am, ExportPipelineMetadata as an, GetEntitiesOptions as ao, GetEntityOptions as ap, GovernanceMode as aq, ImportWarning as ar, NeighborhoodCenter as as, NeighborhoodGroup as at, NeighborhoodLayer as au, Path as av, PropertySchema as aw, PropertyType as ax, ProvenanceFilter as ay, RelationshipDirection as az, EntityBrief as b, StoredRepository as c, RepositoryFilter as d, PaginatedResult as e, StoredRepositorySummary as f, RepositoryUpdate as g, DeleteProgressCallback as h, RepositoryStats as i, PaginationOptions as j, StoredEntity as k, StoredEntityUpdate as l, StorageFindQuery as m, StoredRelationship as n, RelationshipQueryOptions as o, StorageExploreOptions as p, StorageNeighborhood as q, StoragePathOptions as r, StoragePathResult as s, StorageTimelineOptions as t, StorageTimelineResult as u, ExportChunk as v, BulkImportResult as w, ResolvedVocabulary as x, ValidationResult as y, CreateRelationshipInput as z };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/providers/index.ts"],"sourcesContent":["// Provider interface re-exports — @utaba/deep-memory/providers\n\nexport type { StorageProvider, EnsureSchemaResult } from './StorageProvider.js';\nexport type { EmbeddingProvider } from './EmbeddingProvider.js';\nexport type {\n SearchProvider,\n SearchableEntity,\n} from './SearchProvider.js';\nexport type {\n LockProvider,\n LockOptions,\n LockHandle,\n} from './LockProvider.js';\nexport type {\n GraphTraversalProvider,\n GraphTraversalCapabilities,\n} from './GraphTraversalProvider.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/providers/index.ts"],"sourcesContent":["// Provider interface re-exports — @utaba/deep-memory/providers\n\nexport type { StorageProvider, EnsureSchemaResult } from './StorageProvider.js';\nexport type { EmbeddingProvider, EmbeddingProviderFactory } from './EmbeddingProvider.js';\nexport type {\n SearchProvider,\n SearchableEntity,\n} from './SearchProvider.js';\nexport type {\n LockProvider,\n LockOptions,\n LockHandle,\n} from './LockProvider.js';\nexport type {\n GraphTraversalProvider,\n GraphTraversalCapabilities,\n} from './GraphTraversalProvider.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { E as EnsureSchemaResult, S as StorageProvider } from '../StorageProvider-
|
|
2
|
-
import {
|
|
3
|
-
import { T as TraversalSpec, a as TraversalResult } from '../traversal-
|
|
1
|
+
export { E as EnsureSchemaResult, S as StorageProvider } from '../StorageProvider-CX4mKNph.cjs';
|
|
2
|
+
import { af as SearchOptions, e as PaginatedResult, ag as SearchHit } from '../portability-fa5sVgsP.cjs';
|
|
3
|
+
import { T as TraversalSpec, a as TraversalResult } from '../traversal-CXqN780S.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* EmbeddingProvider — enables semantic search and vocabulary deduplication.
|
|
@@ -25,6 +25,19 @@ interface EmbeddingProvider {
|
|
|
25
25
|
*/
|
|
26
26
|
similarity?(a: number[], b: number[]): number;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Factory that produces an EmbeddingProvider configured for a specific model + dimensionality.
|
|
30
|
+
*
|
|
31
|
+
* DeepMemory calls this once per repository when the repo is opened or created,
|
|
32
|
+
* using the repo's stored embedding metadata. Infrastructure concerns (base URL,
|
|
33
|
+
* API key) are captured in the factory closure; model + dimensions come from the
|
|
34
|
+
* repository itself, so different repositories can use different embedding
|
|
35
|
+
* configurations without any global state.
|
|
36
|
+
*/
|
|
37
|
+
type EmbeddingProviderFactory = (config: {
|
|
38
|
+
model: string;
|
|
39
|
+
dimensions: number;
|
|
40
|
+
}) => EmbeddingProvider;
|
|
28
41
|
|
|
29
42
|
/** Entity data indexed for full-text search */
|
|
30
43
|
interface SearchableEntity {
|
|
@@ -139,4 +152,4 @@ interface GraphTraversalCapabilities {
|
|
|
139
152
|
supportsRelationshipSummary: boolean;
|
|
140
153
|
}
|
|
141
154
|
|
|
142
|
-
export type { EmbeddingProvider, GraphTraversalCapabilities, GraphTraversalProvider, LockHandle, LockOptions, LockProvider, SearchProvider, SearchableEntity };
|
|
155
|
+
export type { EmbeddingProvider, EmbeddingProviderFactory, GraphTraversalCapabilities, GraphTraversalProvider, LockHandle, LockOptions, LockProvider, SearchProvider, SearchableEntity };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { E as EnsureSchemaResult, S as StorageProvider } from '../StorageProvider-
|
|
2
|
-
import {
|
|
3
|
-
import { T as TraversalSpec, a as TraversalResult } from '../traversal-
|
|
1
|
+
export { E as EnsureSchemaResult, S as StorageProvider } from '../StorageProvider-CrIcN06Q.js';
|
|
2
|
+
import { af as SearchOptions, e as PaginatedResult, ag as SearchHit } from '../portability-fa5sVgsP.js';
|
|
3
|
+
import { T as TraversalSpec, a as TraversalResult } from '../traversal-DpSdLzxn.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* EmbeddingProvider — enables semantic search and vocabulary deduplication.
|
|
@@ -25,6 +25,19 @@ interface EmbeddingProvider {
|
|
|
25
25
|
*/
|
|
26
26
|
similarity?(a: number[], b: number[]): number;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Factory that produces an EmbeddingProvider configured for a specific model + dimensionality.
|
|
30
|
+
*
|
|
31
|
+
* DeepMemory calls this once per repository when the repo is opened or created,
|
|
32
|
+
* using the repo's stored embedding metadata. Infrastructure concerns (base URL,
|
|
33
|
+
* API key) are captured in the factory closure; model + dimensions come from the
|
|
34
|
+
* repository itself, so different repositories can use different embedding
|
|
35
|
+
* configurations without any global state.
|
|
36
|
+
*/
|
|
37
|
+
type EmbeddingProviderFactory = (config: {
|
|
38
|
+
model: string;
|
|
39
|
+
dimensions: number;
|
|
40
|
+
}) => EmbeddingProvider;
|
|
28
41
|
|
|
29
42
|
/** Entity data indexed for full-text search */
|
|
30
43
|
interface SearchableEntity {
|
|
@@ -139,4 +152,4 @@ interface GraphTraversalCapabilities {
|
|
|
139
152
|
supportsRelationshipSummary: boolean;
|
|
140
153
|
}
|
|
141
154
|
|
|
142
|
-
export type { EmbeddingProvider, GraphTraversalCapabilities, GraphTraversalProvider, LockHandle, LockOptions, LockProvider, SearchProvider, SearchableEntity };
|
|
155
|
+
export type { EmbeddingProvider, EmbeddingProviderFactory, GraphTraversalCapabilities, GraphTraversalProvider, LockHandle, LockOptions, LockProvider, SearchProvider, SearchableEntity };
|
|
@@ -174,6 +174,42 @@ function runStorageProviderConformanceTests(factory) {
|
|
|
174
174
|
const fetched = await provider.getEntity(repoId, "e1");
|
|
175
175
|
(0, import_vitest.expect)(fetched.label).toBe("Updated Label");
|
|
176
176
|
});
|
|
177
|
+
(0, import_vitest.it)("clears summary/data/dataFormat when null is passed", async () => {
|
|
178
|
+
const entity = {
|
|
179
|
+
...makeEntity("e1"),
|
|
180
|
+
summary: "starting summary",
|
|
181
|
+
data: "raw content",
|
|
182
|
+
dataFormat: "text/plain"
|
|
183
|
+
};
|
|
184
|
+
await provider.createEntity(repoId, entity);
|
|
185
|
+
await provider.updateEntity(repoId, "e1", {
|
|
186
|
+
summary: null,
|
|
187
|
+
data: null,
|
|
188
|
+
dataFormat: null,
|
|
189
|
+
provenance: makeProvenance()
|
|
190
|
+
});
|
|
191
|
+
const fetched = await provider.getEntity(repoId, "e1");
|
|
192
|
+
(0, import_vitest.expect)(fetched.summary).toBeUndefined();
|
|
193
|
+
(0, import_vitest.expect)(fetched.data).toBeUndefined();
|
|
194
|
+
(0, import_vitest.expect)(fetched.dataFormat).toBeUndefined();
|
|
195
|
+
});
|
|
196
|
+
(0, import_vitest.it)("preserves summary/data/dataFormat when undefined is passed", async () => {
|
|
197
|
+
const entity = {
|
|
198
|
+
...makeEntity("e1"),
|
|
199
|
+
summary: "keep me",
|
|
200
|
+
data: "keep me too",
|
|
201
|
+
dataFormat: "text/plain"
|
|
202
|
+
};
|
|
203
|
+
await provider.createEntity(repoId, entity);
|
|
204
|
+
await provider.updateEntity(repoId, "e1", {
|
|
205
|
+
label: "Renamed",
|
|
206
|
+
provenance: makeProvenance()
|
|
207
|
+
});
|
|
208
|
+
const fetched = await provider.getEntity(repoId, "e1");
|
|
209
|
+
(0, import_vitest.expect)(fetched.summary).toBe("keep me");
|
|
210
|
+
(0, import_vitest.expect)(fetched.data).toBe("keep me too");
|
|
211
|
+
(0, import_vitest.expect)(fetched.dataFormat).toBe("text/plain");
|
|
212
|
+
});
|
|
177
213
|
(0, import_vitest.it)("deletes an entity", async () => {
|
|
178
214
|
await provider.createEntity(repoId, makeEntity("e1"));
|
|
179
215
|
await provider.deleteEntity(repoId, "e1");
|