@utaba/deep-memory 0.14.0 → 0.16.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-BfdyQgiI.d.cts → StorageProvider-BGtKZZt4.d.cts} +1 -1
- package/dist/{StorageProvider-jpzVIKXs.d.ts → StorageProvider-D_o2Hksf.d.ts} +1 -1
- package/dist/index.cjs +180 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -8
- package/dist/index.d.ts +67 -8
- package/dist/index.js +179 -70
- package/dist/index.js.map +1 -1
- package/dist/{portability-DWpZbxNn.d.cts → portability-P1hL-bOa.d.cts} +11 -0
- package/dist/{portability-DWpZbxNn.d.ts → portability-P1hL-bOa.d.ts} +11 -0
- package/dist/providers/index.d.cts +3 -3
- package/dist/providers/index.d.ts +3 -3
- package/dist/testing/conformance.d.cts +2 -2
- package/dist/testing/conformance.d.ts +2 -2
- package/dist/{traversal-COr0AJBc.d.ts → traversal-B_84kGaO.d.ts} +1 -1
- package/dist/{traversal-37JAiha-.d.cts → traversal-CBE5h5ob.d.cts} +1 -1
- package/dist/types/index.d.cts +13 -4
- package/dist/types/index.d.ts +13 -4
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { G as GovernanceConfig, M as MemoryVocabulary, x as ResolvedVocabulary, C as CreateEntityInput, y as ValidationResult, U as UpdateEntityInput, z as CreateRelationshipInput, A as EntityTypeDefinition, F as VocabularyProposal, H as VocabularyProposalResult, J as ProvenanceContext, K as Provenance, E as Entity, D as DetailLevel, a as EntitySummary, b as EntityBrief, L as FindEntitiesQuery, e as PaginatedResult, N as DeleteEntitiesResult, O as ReembedResult, Q as Relationship, T as RemoveRelationshipsResult, P as PropertyFilter, R as RelationshipSummary, W as GraphResult, X as ExploreOptions, Y as Neighborhood, Z as PathOptions, _ as PathResult, $ as ConceptSearchOptions, a0 as ScoredEntity, a1 as TimelineOptions, a2 as TimelineResult, i as RepositoryStats, a3 as ValidateEntitiesOptions, a4 as EntityValidationPage, a5 as ValidateRelationshipsOptions, a6 as RelationshipValidationPage, a7 as RepositoryConfig, c as StoredRepository, d as RepositoryFilter, a8 as RepositorySummary, g as RepositoryUpdate, a9 as ExportOptions, aa as ExportArchive, ab as ImportOptions, ac as ImportResult, ad as ExportStreamItem, ae as ImportStreamHeader, I as ImportChunk, k as StoredEntity, S as StorageRepositoryConfig, f as StoredRepositorySummary, h as DeleteProgressCallback, j as PaginationOptions, V as VocabularyChangeRecord, l as StoredEntityUpdate, m as StorageFindQuery, n as StoredRelationship, o as RelationshipQueryOptions, p as StorageExploreOptions, q as StorageNeighborhood, r as StoragePathOptions, s as StoragePathResult, t as StorageTimelineOptions, u as StorageTimelineResult, v as ExportChunk, B as BulkImportOptions, w as BulkImportResult, af as SearchOptions, ag as SearchHit } from './portability-
|
|
2
|
-
export { ah as AdaptiveConcurrencyAdjustEvent, ai as AdaptiveConcurrencyAdjustReason, aj as AdaptiveConcurrencyHandle, ak as AdaptiveConcurrencyOptions, al as EnrichedRelationship, am as EntityMap, an as EntityTypeInput, ao as EntityValidationIssue, ap as ExportLegalMetadata, aq as ExportManifest, ar as ExportPipelineMetadata, as as GetEntitiesOptions, at as GetEntityOptions, au as GovernanceMode, av as ImportWarning, aw as NeighborhoodCenter, ax as NeighborhoodGroup, ay as NeighborhoodLayer, az as Path, aA as PropertySchema, aB as PropertyType, aC as ProvenanceFilter, aD as RelationshipDirection, aE as RelationshipTypeDefinition, aF as RelationshipTypeInput, aG as RelationshipValidationIssue, aH as RepositoryMetadata, aI as StorageNeighborhoodGroup, aJ as StorageNeighborhoodLayer, aK as StoragePath, aL as StorageTimelineEvent, aM as TimelineEntityRef, aN as TimelineEvent, aO as TimelineRelationshipDetail, aP as VocabularyInput } from './portability-
|
|
1
|
+
import { G as GovernanceConfig, M as MemoryVocabulary, x as ResolvedVocabulary, C as CreateEntityInput, y as ValidationResult, U as UpdateEntityInput, z as CreateRelationshipInput, A as EntityTypeDefinition, F as VocabularyProposal, H as VocabularyProposalResult, J as ProvenanceContext, K as Provenance, E as Entity, D as DetailLevel, a as EntitySummary, b as EntityBrief, L as FindEntitiesQuery, e as PaginatedResult, N as DeleteEntitiesResult, O as ReembedResult, Q as Relationship, T as RemoveRelationshipsResult, P as PropertyFilter, R as RelationshipSummary, W as GraphResult, X as ExploreOptions, Y as Neighborhood, Z as PathOptions, _ as PathResult, $ as ConceptSearchOptions, a0 as ScoredEntity, a1 as TimelineOptions, a2 as TimelineResult, i as RepositoryStats, a3 as ValidateEntitiesOptions, a4 as EntityValidationPage, a5 as ValidateRelationshipsOptions, a6 as RelationshipValidationPage, a7 as RepositoryConfig, c as StoredRepository, d as RepositoryFilter, a8 as RepositorySummary, g as RepositoryUpdate, a9 as ExportOptions, aa as ExportArchive, ab as ImportOptions, ac as ImportResult, ad as ExportStreamItem, ae as ImportStreamHeader, I as ImportChunk, k as StoredEntity, S as StorageRepositoryConfig, f as StoredRepositorySummary, h as DeleteProgressCallback, j as PaginationOptions, V as VocabularyChangeRecord, l as StoredEntityUpdate, m as StorageFindQuery, n as StoredRelationship, o as RelationshipQueryOptions, p as StorageExploreOptions, q as StorageNeighborhood, r as StoragePathOptions, s as StoragePathResult, t as StorageTimelineOptions, u as StorageTimelineResult, v as ExportChunk, B as BulkImportOptions, w as BulkImportResult, af as SearchOptions, ag as SearchHit } from './portability-P1hL-bOa.cjs';
|
|
2
|
+
export { ah as AdaptiveConcurrencyAdjustEvent, ai as AdaptiveConcurrencyAdjustReason, aj as AdaptiveConcurrencyHandle, ak as AdaptiveConcurrencyOptions, al as EnrichedRelationship, am as EntityMap, an as EntityTypeInput, ao as EntityValidationIssue, ap as ExportLegalMetadata, aq as ExportManifest, ar as ExportPipelineMetadata, as as GetEntitiesOptions, at as GetEntityOptions, au as GovernanceMode, av as ImportWarning, aw as NeighborhoodCenter, ax as NeighborhoodGroup, ay as NeighborhoodLayer, az as Path, aA as PropertySchema, aB as PropertyType, aC as ProvenanceFilter, aD as RelationshipDirection, aE as RelationshipTypeDefinition, aF as RelationshipTypeInput, aG as RelationshipValidationIssue, aH as RepositoryMetadata, aI as StorageNeighborhoodGroup, aJ as StorageNeighborhoodLayer, aK as StoragePath, aL as StorageTimelineEvent, aM as TimelineEntityRef, aN as TimelineEvent, aO as TimelineRelationshipDetail, aP as VocabularyInput } from './portability-P1hL-bOa.cjs';
|
|
3
3
|
import { DeepMemoryEventType, EventHandler, Unsubscribe, DeepMemoryEvent, HookResult, EventPayload, UsageSink } from './types/index.cjs';
|
|
4
4
|
export { OperationUsage } from './types/index.cjs';
|
|
5
|
-
import { T as TraversalSpec, a as TraversalResult } from './traversal-
|
|
6
|
-
export { Q as QueryMetadata, b as TraversalAggregation, c as TraversalPath, d as TraversalProjection, e as TraversalRelationship, f as TraversalReturnMode, g as TraversalStart, h as TraversalStep } from './traversal-
|
|
7
|
-
import { S as StorageProvider, E as EnsureSchemaResult } from './StorageProvider-
|
|
5
|
+
import { T as TraversalSpec, a as TraversalResult } from './traversal-CBE5h5ob.cjs';
|
|
6
|
+
export { Q as QueryMetadata, b as TraversalAggregation, c as TraversalPath, d as TraversalProjection, e as TraversalRelationship, f as TraversalReturnMode, g as TraversalStart, h as TraversalStep } from './traversal-CBE5h5ob.cjs';
|
|
7
|
+
import { S as StorageProvider, E as EnsureSchemaResult } from './StorageProvider-BGtKZZt4.cjs';
|
|
8
8
|
import { EmbeddingProvider, SearchProvider, EmbeddingProviderFactory, GraphTraversalProvider, LockProvider, SearchableEntity } from './providers/index.cjs';
|
|
9
9
|
export { GraphTraversalCapabilities, LockHandle, LockOptions } from './providers/index.cjs';
|
|
10
10
|
|
|
11
11
|
/** Error codes for all Deep Memory errors */
|
|
12
|
-
type DeepMemoryErrorCode = 'INVALID_INPUT' | 'ENTITY_NOT_FOUND' | 'ENTITY_ALREADY_EXISTS' | 'RELATIONSHIP_NOT_FOUND' | 'RELATIONSHIP_ALREADY_EXISTS' | 'REPOSITORY_NOT_FOUND' | 'REPOSITORY_ALREADY_EXISTS' | 'VOCABULARY_VALIDATION_FAILED' | 'RELATIONSHIP_CONSTRAINT_FAILED' | 'SELF_REFERENTIAL_RELATIONSHIP' | 'GOVERNANCE_DENIED' | 'OPERATION_CANCELLED' | 'EMBEDDING_PROVIDER_REQUIRED' | 'IMPORT_ERROR' | 'EXPORT_ERROR' | 'PROVIDER_ERROR' | 'GRAPH_TRAVERSAL_PROVIDER_REQUIRED' | 'TRAVERSAL_VALIDATION_FAILED' | 'TRAVERSAL_VOCABULARY_ERROR' | 'TRAVERSAL_TIMEOUT';
|
|
12
|
+
type DeepMemoryErrorCode = 'INVALID_INPUT' | 'ENTITY_NOT_FOUND' | 'ENTITY_ALREADY_EXISTS' | 'RELATIONSHIP_NOT_FOUND' | 'RELATIONSHIP_ALREADY_EXISTS' | 'REPOSITORY_NOT_FOUND' | 'REPOSITORY_ALREADY_EXISTS' | 'VOCABULARY_VALIDATION_FAILED' | 'RELATIONSHIP_CONSTRAINT_FAILED' | 'SELF_REFERENTIAL_RELATIONSHIP' | 'GOVERNANCE_DENIED' | 'OPERATION_CANCELLED' | 'OPERATION_ABORTED' | 'EMBEDDING_PROVIDER_REQUIRED' | 'IMPORT_ERROR' | 'EXPORT_ERROR' | 'PROVIDER_ERROR' | 'GRAPH_TRAVERSAL_PROVIDER_REQUIRED' | 'TRAVERSAL_VALIDATION_FAILED' | 'TRAVERSAL_VOCABULARY_ERROR' | 'TRAVERSAL_TIMEOUT';
|
|
13
13
|
/** Base error class for all Deep Memory errors */
|
|
14
14
|
declare class DeepMemoryError extends Error {
|
|
15
15
|
readonly code: DeepMemoryErrorCode;
|
|
@@ -89,6 +89,15 @@ declare class OperationCancelledError extends DeepMemoryError {
|
|
|
89
89
|
readonly reason: string;
|
|
90
90
|
constructor(operation: string, reason: string);
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* A long-running operation was aborted by a caller-supplied AbortSignal.
|
|
94
|
+
* Cooperative — the in-flight batch/chunk completes before the abort is honoured,
|
|
95
|
+
* and any state written before the abort is left in place.
|
|
96
|
+
*/
|
|
97
|
+
declare class OperationAbortedError extends DeepMemoryError {
|
|
98
|
+
readonly operation: string;
|
|
99
|
+
constructor(operation: string);
|
|
100
|
+
}
|
|
92
101
|
/** Semantic search was attempted without an embedding provider */
|
|
93
102
|
declare class EmbeddingProviderRequiredError extends DeepMemoryError {
|
|
94
103
|
constructor();
|
|
@@ -284,7 +293,13 @@ declare class MemoryRepository {
|
|
|
284
293
|
* the repository's embedding configuration is updated to the new values before
|
|
285
294
|
* re-embedding, so all subsequent entity writes use the new model/dimensionality.
|
|
286
295
|
*
|
|
287
|
-
* Processes in batches with optional rate limiting.
|
|
296
|
+
* Processes in batches with optional rate limiting.
|
|
297
|
+
*
|
|
298
|
+
* Progress is delivered via the optional `onProgress` callback. Most callers
|
|
299
|
+
* should use {@link DeepMemory.reembedAll} instead, which wires this callback
|
|
300
|
+
* to the global event bus so `reembed:*` events are reachable via
|
|
301
|
+
* `DeepMemory.on()`.
|
|
302
|
+
*
|
|
288
303
|
* Updates repository metadata with the new model ID and dimensions on completion.
|
|
289
304
|
*/
|
|
290
305
|
reembedAll(options?: {
|
|
@@ -299,6 +314,29 @@ declare class MemoryRepository {
|
|
|
299
314
|
errorThresholdToAbort?: number;
|
|
300
315
|
/** Milliseconds to wait between batches for rate limiting (default 0) */
|
|
301
316
|
delayBetweenBatchesMs?: number;
|
|
317
|
+
/**
|
|
318
|
+
* Called after each batch completes. Internal plumbing — the {@link DeepMemory}
|
|
319
|
+
* facade wires this to `globalEventBus.emit('reembed:progress', ...)`.
|
|
320
|
+
*/
|
|
321
|
+
onProgress?: (progress: {
|
|
322
|
+
processed: number;
|
|
323
|
+
totalEntities: number;
|
|
324
|
+
failed: number;
|
|
325
|
+
}) => void | Promise<void>;
|
|
326
|
+
/**
|
|
327
|
+
* Called for every entity that fails to re-embed (embedBatch retries
|
|
328
|
+
* exhausted, or storage write failure). Internal plumbing — the facade
|
|
329
|
+
* wires this to `globalEventBus.emit('reembed:item-failed', ...)`.
|
|
330
|
+
*/
|
|
331
|
+
onItemFailed?: (failure: {
|
|
332
|
+
entityId: string;
|
|
333
|
+
error: string;
|
|
334
|
+
}) => void | Promise<void>;
|
|
335
|
+
/**
|
|
336
|
+
* Caller-supplied abort signal. Honoured at batch boundaries.
|
|
337
|
+
* Any vectors already written by completed batches are left in place.
|
|
338
|
+
*/
|
|
339
|
+
signal?: AbortSignal;
|
|
302
340
|
}): Promise<ReembedResult>;
|
|
303
341
|
createRelationships(inputs: CreateRelationshipInput[]): Promise<Relationship[]>;
|
|
304
342
|
removeRelationships(ids: string[]): Promise<RemoveRelationshipsResult>;
|
|
@@ -434,6 +472,27 @@ declare class DeepMemory {
|
|
|
434
472
|
* Use for large repositories to avoid loading everything into memory.
|
|
435
473
|
*/
|
|
436
474
|
importRepositoryStream(header: ImportStreamHeader, chunks: AsyncIterable<ImportChunk>, options: ImportOptions): Promise<ImportResult>;
|
|
475
|
+
/**
|
|
476
|
+
* Re-embed all entities in a repository, emitting `reembed:*` events on the
|
|
477
|
+
* global event bus (reachable via {@link DeepMemory.on}).
|
|
478
|
+
*
|
|
479
|
+
* Mirrors the lifecycle of {@link importRepositoryStream}: emits
|
|
480
|
+
* `reembed:started` up front, `reembed:progress` after every batch,
|
|
481
|
+
* and either `reembed:completed` or `reembed:failed` at the end.
|
|
482
|
+
*
|
|
483
|
+
* `options.signal` is honoured at batch boundaries — any vectors already
|
|
484
|
+
* written by completed batches are retained, and `reembed:failed` is emitted
|
|
485
|
+
* with the abort error message.
|
|
486
|
+
*/
|
|
487
|
+
reembedAll(repositoryId: string, options?: {
|
|
488
|
+
model?: string;
|
|
489
|
+
dimensions?: number;
|
|
490
|
+
batchSize?: number;
|
|
491
|
+
maxRetries?: number;
|
|
492
|
+
errorThresholdToAbort?: number;
|
|
493
|
+
delayBetweenBatchesMs?: number;
|
|
494
|
+
signal?: AbortSignal;
|
|
495
|
+
}): Promise<ReembedResult>;
|
|
437
496
|
/** Subscribe to global events */
|
|
438
497
|
on<E extends DeepMemoryEventType>(event: E, handler: EventHandler<E>): Unsubscribe;
|
|
439
498
|
/** Update the provenance context (e.g., new conversation) */
|
|
@@ -563,4 +622,4 @@ declare class NoOpEmbeddingProvider implements EmbeddingProvider {
|
|
|
563
622
|
modelId(): string;
|
|
564
623
|
}
|
|
565
624
|
|
|
566
|
-
export { BulkImportOptions, BulkImportResult, type CompiledQuery, ConceptSearchOptions, CreateEntityInput, CreateRelationshipInput, CypherCompiler, DeepMemory, type DeepMemoryConfig, DeepMemoryError, type DeepMemoryErrorCode, DeepMemoryEvent, DeepMemoryEventType, DeleteEntitiesResult, DeleteProgressCallback, DetailLevel, DuplicateEntityError, DuplicateRelationshipError, DuplicateRepositoryError, EmbeddingProvider, EmbeddingProviderFactory, EmbeddingProviderRequiredError, EnsureSchemaResult, Entity, EntityBrief, EntityNotFoundError, EntitySummary, EntityTypeDefinition, EntityValidationPage, EventHandler, EventPayload, ExploreOptions, ExportArchive, ExportChunk, ExportError, ExportOptions, ExportStreamItem, FindEntitiesQuery, GovernanceConfig, GovernanceDeniedError, GraphResult, GraphTraversalProvider, GraphTraversalProviderRequiredError, GremlinCompiler, HookResult, ImportChunk, ImportError, ImportOptions, ImportResult, ImportStreamHeader, ImportThrottleAbortError, InMemorySearchProvider, InMemoryStorageProvider, InvalidInputError, LockProvider, MemoryRepository, MemoryVocabulary, Neighborhood, NoOpEmbeddingProvider, OperationCancelledError, PaginatedResult, PaginationOptions, PathOptions, PathResult, PropertyFilter, Provenance, ProvenanceContext, ProviderError, ReembedResult, Relationship, RelationshipConstraintError, RelationshipNotFoundError, RelationshipQueryOptions, RelationshipSummary, RelationshipValidationPage, RemoveRelationshipsResult, RepositoryConfig, RepositoryFilter, RepositoryNotFoundError, RepositoryStats, RepositorySummary, RepositoryUpdate, RepositoryValidator, ResolvedVocabulary, ScoredEntity, SearchHit, SearchOptions, SearchProvider, SearchableEntity, SelfReferentialRelationshipError, StorageExploreOptions, StorageFindQuery, StorageNeighborhood, StoragePathOptions, StoragePathResult, StorageProvider, StorageRepositoryConfig, StorageTimelineOptions, StorageTimelineResult, StoredEntity, StoredEntityUpdate, StoredRelationship, StoredRepository, StoredRepositorySummary, TimelineOptions, TimelineResult, type TraversalCompiler, TraversalResult, TraversalSpec, TraversalTimeoutError, TraversalValidationError, TraversalVocabularyError, Unsubscribe, UpdateEntityInput, UsageSink, ValidateEntitiesOptions, ValidateRelationshipsOptions, VocabularyChangeRecord, VocabularyProposal, VocabularyProposalResult, VocabularyValidationError, createSafeSink, generateId, isValidUuid, matchesPropertyFilters, projectEntity };
|
|
625
|
+
export { BulkImportOptions, BulkImportResult, type CompiledQuery, ConceptSearchOptions, CreateEntityInput, CreateRelationshipInput, CypherCompiler, DeepMemory, type DeepMemoryConfig, DeepMemoryError, type DeepMemoryErrorCode, DeepMemoryEvent, DeepMemoryEventType, DeleteEntitiesResult, DeleteProgressCallback, DetailLevel, DuplicateEntityError, DuplicateRelationshipError, DuplicateRepositoryError, EmbeddingProvider, EmbeddingProviderFactory, EmbeddingProviderRequiredError, EnsureSchemaResult, Entity, EntityBrief, EntityNotFoundError, EntitySummary, EntityTypeDefinition, EntityValidationPage, EventHandler, EventPayload, ExploreOptions, ExportArchive, ExportChunk, ExportError, ExportOptions, ExportStreamItem, FindEntitiesQuery, GovernanceConfig, GovernanceDeniedError, GraphResult, GraphTraversalProvider, GraphTraversalProviderRequiredError, GremlinCompiler, HookResult, ImportChunk, ImportError, ImportOptions, ImportResult, ImportStreamHeader, ImportThrottleAbortError, InMemorySearchProvider, InMemoryStorageProvider, InvalidInputError, LockProvider, MemoryRepository, MemoryVocabulary, Neighborhood, NoOpEmbeddingProvider, OperationAbortedError, OperationCancelledError, PaginatedResult, PaginationOptions, PathOptions, PathResult, PropertyFilter, Provenance, ProvenanceContext, ProviderError, ReembedResult, Relationship, RelationshipConstraintError, RelationshipNotFoundError, RelationshipQueryOptions, RelationshipSummary, RelationshipValidationPage, RemoveRelationshipsResult, RepositoryConfig, RepositoryFilter, RepositoryNotFoundError, RepositoryStats, RepositorySummary, RepositoryUpdate, RepositoryValidator, ResolvedVocabulary, ScoredEntity, SearchHit, SearchOptions, SearchProvider, SearchableEntity, SelfReferentialRelationshipError, StorageExploreOptions, StorageFindQuery, StorageNeighborhood, StoragePathOptions, StoragePathResult, StorageProvider, StorageRepositoryConfig, StorageTimelineOptions, StorageTimelineResult, StoredEntity, StoredEntityUpdate, StoredRelationship, StoredRepository, StoredRepositorySummary, TimelineOptions, TimelineResult, type TraversalCompiler, TraversalResult, TraversalSpec, TraversalTimeoutError, TraversalValidationError, TraversalVocabularyError, Unsubscribe, UpdateEntityInput, UsageSink, ValidateEntitiesOptions, ValidateRelationshipsOptions, VocabularyChangeRecord, VocabularyProposal, VocabularyProposalResult, VocabularyValidationError, createSafeSink, generateId, isValidUuid, matchesPropertyFilters, projectEntity };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { G as GovernanceConfig, M as MemoryVocabulary, x as ResolvedVocabulary, C as CreateEntityInput, y as ValidationResult, U as UpdateEntityInput, z as CreateRelationshipInput, A as EntityTypeDefinition, F as VocabularyProposal, H as VocabularyProposalResult, J as ProvenanceContext, K as Provenance, E as Entity, D as DetailLevel, a as EntitySummary, b as EntityBrief, L as FindEntitiesQuery, e as PaginatedResult, N as DeleteEntitiesResult, O as ReembedResult, Q as Relationship, T as RemoveRelationshipsResult, P as PropertyFilter, R as RelationshipSummary, W as GraphResult, X as ExploreOptions, Y as Neighborhood, Z as PathOptions, _ as PathResult, $ as ConceptSearchOptions, a0 as ScoredEntity, a1 as TimelineOptions, a2 as TimelineResult, i as RepositoryStats, a3 as ValidateEntitiesOptions, a4 as EntityValidationPage, a5 as ValidateRelationshipsOptions, a6 as RelationshipValidationPage, a7 as RepositoryConfig, c as StoredRepository, d as RepositoryFilter, a8 as RepositorySummary, g as RepositoryUpdate, a9 as ExportOptions, aa as ExportArchive, ab as ImportOptions, ac as ImportResult, ad as ExportStreamItem, ae as ImportStreamHeader, I as ImportChunk, k as StoredEntity, S as StorageRepositoryConfig, f as StoredRepositorySummary, h as DeleteProgressCallback, j as PaginationOptions, V as VocabularyChangeRecord, l as StoredEntityUpdate, m as StorageFindQuery, n as StoredRelationship, o as RelationshipQueryOptions, p as StorageExploreOptions, q as StorageNeighborhood, r as StoragePathOptions, s as StoragePathResult, t as StorageTimelineOptions, u as StorageTimelineResult, v as ExportChunk, B as BulkImportOptions, w as BulkImportResult, af as SearchOptions, ag as SearchHit } from './portability-
|
|
2
|
-
export { ah as AdaptiveConcurrencyAdjustEvent, ai as AdaptiveConcurrencyAdjustReason, aj as AdaptiveConcurrencyHandle, ak as AdaptiveConcurrencyOptions, al as EnrichedRelationship, am as EntityMap, an as EntityTypeInput, ao as EntityValidationIssue, ap as ExportLegalMetadata, aq as ExportManifest, ar as ExportPipelineMetadata, as as GetEntitiesOptions, at as GetEntityOptions, au as GovernanceMode, av as ImportWarning, aw as NeighborhoodCenter, ax as NeighborhoodGroup, ay as NeighborhoodLayer, az as Path, aA as PropertySchema, aB as PropertyType, aC as ProvenanceFilter, aD as RelationshipDirection, aE as RelationshipTypeDefinition, aF as RelationshipTypeInput, aG as RelationshipValidationIssue, aH as RepositoryMetadata, aI as StorageNeighborhoodGroup, aJ as StorageNeighborhoodLayer, aK as StoragePath, aL as StorageTimelineEvent, aM as TimelineEntityRef, aN as TimelineEvent, aO as TimelineRelationshipDetail, aP as VocabularyInput } from './portability-
|
|
1
|
+
import { G as GovernanceConfig, M as MemoryVocabulary, x as ResolvedVocabulary, C as CreateEntityInput, y as ValidationResult, U as UpdateEntityInput, z as CreateRelationshipInput, A as EntityTypeDefinition, F as VocabularyProposal, H as VocabularyProposalResult, J as ProvenanceContext, K as Provenance, E as Entity, D as DetailLevel, a as EntitySummary, b as EntityBrief, L as FindEntitiesQuery, e as PaginatedResult, N as DeleteEntitiesResult, O as ReembedResult, Q as Relationship, T as RemoveRelationshipsResult, P as PropertyFilter, R as RelationshipSummary, W as GraphResult, X as ExploreOptions, Y as Neighborhood, Z as PathOptions, _ as PathResult, $ as ConceptSearchOptions, a0 as ScoredEntity, a1 as TimelineOptions, a2 as TimelineResult, i as RepositoryStats, a3 as ValidateEntitiesOptions, a4 as EntityValidationPage, a5 as ValidateRelationshipsOptions, a6 as RelationshipValidationPage, a7 as RepositoryConfig, c as StoredRepository, d as RepositoryFilter, a8 as RepositorySummary, g as RepositoryUpdate, a9 as ExportOptions, aa as ExportArchive, ab as ImportOptions, ac as ImportResult, ad as ExportStreamItem, ae as ImportStreamHeader, I as ImportChunk, k as StoredEntity, S as StorageRepositoryConfig, f as StoredRepositorySummary, h as DeleteProgressCallback, j as PaginationOptions, V as VocabularyChangeRecord, l as StoredEntityUpdate, m as StorageFindQuery, n as StoredRelationship, o as RelationshipQueryOptions, p as StorageExploreOptions, q as StorageNeighborhood, r as StoragePathOptions, s as StoragePathResult, t as StorageTimelineOptions, u as StorageTimelineResult, v as ExportChunk, B as BulkImportOptions, w as BulkImportResult, af as SearchOptions, ag as SearchHit } from './portability-P1hL-bOa.js';
|
|
2
|
+
export { ah as AdaptiveConcurrencyAdjustEvent, ai as AdaptiveConcurrencyAdjustReason, aj as AdaptiveConcurrencyHandle, ak as AdaptiveConcurrencyOptions, al as EnrichedRelationship, am as EntityMap, an as EntityTypeInput, ao as EntityValidationIssue, ap as ExportLegalMetadata, aq as ExportManifest, ar as ExportPipelineMetadata, as as GetEntitiesOptions, at as GetEntityOptions, au as GovernanceMode, av as ImportWarning, aw as NeighborhoodCenter, ax as NeighborhoodGroup, ay as NeighborhoodLayer, az as Path, aA as PropertySchema, aB as PropertyType, aC as ProvenanceFilter, aD as RelationshipDirection, aE as RelationshipTypeDefinition, aF as RelationshipTypeInput, aG as RelationshipValidationIssue, aH as RepositoryMetadata, aI as StorageNeighborhoodGroup, aJ as StorageNeighborhoodLayer, aK as StoragePath, aL as StorageTimelineEvent, aM as TimelineEntityRef, aN as TimelineEvent, aO as TimelineRelationshipDetail, aP as VocabularyInput } from './portability-P1hL-bOa.js';
|
|
3
3
|
import { DeepMemoryEventType, EventHandler, Unsubscribe, DeepMemoryEvent, HookResult, EventPayload, UsageSink } from './types/index.js';
|
|
4
4
|
export { OperationUsage } from './types/index.js';
|
|
5
|
-
import { T as TraversalSpec, a as TraversalResult } from './traversal-
|
|
6
|
-
export { Q as QueryMetadata, b as TraversalAggregation, c as TraversalPath, d as TraversalProjection, e as TraversalRelationship, f as TraversalReturnMode, g as TraversalStart, h as TraversalStep } from './traversal-
|
|
7
|
-
import { S as StorageProvider, E as EnsureSchemaResult } from './StorageProvider-
|
|
5
|
+
import { T as TraversalSpec, a as TraversalResult } from './traversal-B_84kGaO.js';
|
|
6
|
+
export { Q as QueryMetadata, b as TraversalAggregation, c as TraversalPath, d as TraversalProjection, e as TraversalRelationship, f as TraversalReturnMode, g as TraversalStart, h as TraversalStep } from './traversal-B_84kGaO.js';
|
|
7
|
+
import { S as StorageProvider, E as EnsureSchemaResult } from './StorageProvider-D_o2Hksf.js';
|
|
8
8
|
import { EmbeddingProvider, SearchProvider, EmbeddingProviderFactory, GraphTraversalProvider, LockProvider, SearchableEntity } from './providers/index.js';
|
|
9
9
|
export { GraphTraversalCapabilities, LockHandle, LockOptions } from './providers/index.js';
|
|
10
10
|
|
|
11
11
|
/** Error codes for all Deep Memory errors */
|
|
12
|
-
type DeepMemoryErrorCode = 'INVALID_INPUT' | 'ENTITY_NOT_FOUND' | 'ENTITY_ALREADY_EXISTS' | 'RELATIONSHIP_NOT_FOUND' | 'RELATIONSHIP_ALREADY_EXISTS' | 'REPOSITORY_NOT_FOUND' | 'REPOSITORY_ALREADY_EXISTS' | 'VOCABULARY_VALIDATION_FAILED' | 'RELATIONSHIP_CONSTRAINT_FAILED' | 'SELF_REFERENTIAL_RELATIONSHIP' | 'GOVERNANCE_DENIED' | 'OPERATION_CANCELLED' | 'EMBEDDING_PROVIDER_REQUIRED' | 'IMPORT_ERROR' | 'EXPORT_ERROR' | 'PROVIDER_ERROR' | 'GRAPH_TRAVERSAL_PROVIDER_REQUIRED' | 'TRAVERSAL_VALIDATION_FAILED' | 'TRAVERSAL_VOCABULARY_ERROR' | 'TRAVERSAL_TIMEOUT';
|
|
12
|
+
type DeepMemoryErrorCode = 'INVALID_INPUT' | 'ENTITY_NOT_FOUND' | 'ENTITY_ALREADY_EXISTS' | 'RELATIONSHIP_NOT_FOUND' | 'RELATIONSHIP_ALREADY_EXISTS' | 'REPOSITORY_NOT_FOUND' | 'REPOSITORY_ALREADY_EXISTS' | 'VOCABULARY_VALIDATION_FAILED' | 'RELATIONSHIP_CONSTRAINT_FAILED' | 'SELF_REFERENTIAL_RELATIONSHIP' | 'GOVERNANCE_DENIED' | 'OPERATION_CANCELLED' | 'OPERATION_ABORTED' | 'EMBEDDING_PROVIDER_REQUIRED' | 'IMPORT_ERROR' | 'EXPORT_ERROR' | 'PROVIDER_ERROR' | 'GRAPH_TRAVERSAL_PROVIDER_REQUIRED' | 'TRAVERSAL_VALIDATION_FAILED' | 'TRAVERSAL_VOCABULARY_ERROR' | 'TRAVERSAL_TIMEOUT';
|
|
13
13
|
/** Base error class for all Deep Memory errors */
|
|
14
14
|
declare class DeepMemoryError extends Error {
|
|
15
15
|
readonly code: DeepMemoryErrorCode;
|
|
@@ -89,6 +89,15 @@ declare class OperationCancelledError extends DeepMemoryError {
|
|
|
89
89
|
readonly reason: string;
|
|
90
90
|
constructor(operation: string, reason: string);
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* A long-running operation was aborted by a caller-supplied AbortSignal.
|
|
94
|
+
* Cooperative — the in-flight batch/chunk completes before the abort is honoured,
|
|
95
|
+
* and any state written before the abort is left in place.
|
|
96
|
+
*/
|
|
97
|
+
declare class OperationAbortedError extends DeepMemoryError {
|
|
98
|
+
readonly operation: string;
|
|
99
|
+
constructor(operation: string);
|
|
100
|
+
}
|
|
92
101
|
/** Semantic search was attempted without an embedding provider */
|
|
93
102
|
declare class EmbeddingProviderRequiredError extends DeepMemoryError {
|
|
94
103
|
constructor();
|
|
@@ -284,7 +293,13 @@ declare class MemoryRepository {
|
|
|
284
293
|
* the repository's embedding configuration is updated to the new values before
|
|
285
294
|
* re-embedding, so all subsequent entity writes use the new model/dimensionality.
|
|
286
295
|
*
|
|
287
|
-
* Processes in batches with optional rate limiting.
|
|
296
|
+
* Processes in batches with optional rate limiting.
|
|
297
|
+
*
|
|
298
|
+
* Progress is delivered via the optional `onProgress` callback. Most callers
|
|
299
|
+
* should use {@link DeepMemory.reembedAll} instead, which wires this callback
|
|
300
|
+
* to the global event bus so `reembed:*` events are reachable via
|
|
301
|
+
* `DeepMemory.on()`.
|
|
302
|
+
*
|
|
288
303
|
* Updates repository metadata with the new model ID and dimensions on completion.
|
|
289
304
|
*/
|
|
290
305
|
reembedAll(options?: {
|
|
@@ -299,6 +314,29 @@ declare class MemoryRepository {
|
|
|
299
314
|
errorThresholdToAbort?: number;
|
|
300
315
|
/** Milliseconds to wait between batches for rate limiting (default 0) */
|
|
301
316
|
delayBetweenBatchesMs?: number;
|
|
317
|
+
/**
|
|
318
|
+
* Called after each batch completes. Internal plumbing — the {@link DeepMemory}
|
|
319
|
+
* facade wires this to `globalEventBus.emit('reembed:progress', ...)`.
|
|
320
|
+
*/
|
|
321
|
+
onProgress?: (progress: {
|
|
322
|
+
processed: number;
|
|
323
|
+
totalEntities: number;
|
|
324
|
+
failed: number;
|
|
325
|
+
}) => void | Promise<void>;
|
|
326
|
+
/**
|
|
327
|
+
* Called for every entity that fails to re-embed (embedBatch retries
|
|
328
|
+
* exhausted, or storage write failure). Internal plumbing — the facade
|
|
329
|
+
* wires this to `globalEventBus.emit('reembed:item-failed', ...)`.
|
|
330
|
+
*/
|
|
331
|
+
onItemFailed?: (failure: {
|
|
332
|
+
entityId: string;
|
|
333
|
+
error: string;
|
|
334
|
+
}) => void | Promise<void>;
|
|
335
|
+
/**
|
|
336
|
+
* Caller-supplied abort signal. Honoured at batch boundaries.
|
|
337
|
+
* Any vectors already written by completed batches are left in place.
|
|
338
|
+
*/
|
|
339
|
+
signal?: AbortSignal;
|
|
302
340
|
}): Promise<ReembedResult>;
|
|
303
341
|
createRelationships(inputs: CreateRelationshipInput[]): Promise<Relationship[]>;
|
|
304
342
|
removeRelationships(ids: string[]): Promise<RemoveRelationshipsResult>;
|
|
@@ -434,6 +472,27 @@ declare class DeepMemory {
|
|
|
434
472
|
* Use for large repositories to avoid loading everything into memory.
|
|
435
473
|
*/
|
|
436
474
|
importRepositoryStream(header: ImportStreamHeader, chunks: AsyncIterable<ImportChunk>, options: ImportOptions): Promise<ImportResult>;
|
|
475
|
+
/**
|
|
476
|
+
* Re-embed all entities in a repository, emitting `reembed:*` events on the
|
|
477
|
+
* global event bus (reachable via {@link DeepMemory.on}).
|
|
478
|
+
*
|
|
479
|
+
* Mirrors the lifecycle of {@link importRepositoryStream}: emits
|
|
480
|
+
* `reembed:started` up front, `reembed:progress` after every batch,
|
|
481
|
+
* and either `reembed:completed` or `reembed:failed` at the end.
|
|
482
|
+
*
|
|
483
|
+
* `options.signal` is honoured at batch boundaries — any vectors already
|
|
484
|
+
* written by completed batches are retained, and `reembed:failed` is emitted
|
|
485
|
+
* with the abort error message.
|
|
486
|
+
*/
|
|
487
|
+
reembedAll(repositoryId: string, options?: {
|
|
488
|
+
model?: string;
|
|
489
|
+
dimensions?: number;
|
|
490
|
+
batchSize?: number;
|
|
491
|
+
maxRetries?: number;
|
|
492
|
+
errorThresholdToAbort?: number;
|
|
493
|
+
delayBetweenBatchesMs?: number;
|
|
494
|
+
signal?: AbortSignal;
|
|
495
|
+
}): Promise<ReembedResult>;
|
|
437
496
|
/** Subscribe to global events */
|
|
438
497
|
on<E extends DeepMemoryEventType>(event: E, handler: EventHandler<E>): Unsubscribe;
|
|
439
498
|
/** Update the provenance context (e.g., new conversation) */
|
|
@@ -563,4 +622,4 @@ declare class NoOpEmbeddingProvider implements EmbeddingProvider {
|
|
|
563
622
|
modelId(): string;
|
|
564
623
|
}
|
|
565
624
|
|
|
566
|
-
export { BulkImportOptions, BulkImportResult, type CompiledQuery, ConceptSearchOptions, CreateEntityInput, CreateRelationshipInput, CypherCompiler, DeepMemory, type DeepMemoryConfig, DeepMemoryError, type DeepMemoryErrorCode, DeepMemoryEvent, DeepMemoryEventType, DeleteEntitiesResult, DeleteProgressCallback, DetailLevel, DuplicateEntityError, DuplicateRelationshipError, DuplicateRepositoryError, EmbeddingProvider, EmbeddingProviderFactory, EmbeddingProviderRequiredError, EnsureSchemaResult, Entity, EntityBrief, EntityNotFoundError, EntitySummary, EntityTypeDefinition, EntityValidationPage, EventHandler, EventPayload, ExploreOptions, ExportArchive, ExportChunk, ExportError, ExportOptions, ExportStreamItem, FindEntitiesQuery, GovernanceConfig, GovernanceDeniedError, GraphResult, GraphTraversalProvider, GraphTraversalProviderRequiredError, GremlinCompiler, HookResult, ImportChunk, ImportError, ImportOptions, ImportResult, ImportStreamHeader, ImportThrottleAbortError, InMemorySearchProvider, InMemoryStorageProvider, InvalidInputError, LockProvider, MemoryRepository, MemoryVocabulary, Neighborhood, NoOpEmbeddingProvider, OperationCancelledError, PaginatedResult, PaginationOptions, PathOptions, PathResult, PropertyFilter, Provenance, ProvenanceContext, ProviderError, ReembedResult, Relationship, RelationshipConstraintError, RelationshipNotFoundError, RelationshipQueryOptions, RelationshipSummary, RelationshipValidationPage, RemoveRelationshipsResult, RepositoryConfig, RepositoryFilter, RepositoryNotFoundError, RepositoryStats, RepositorySummary, RepositoryUpdate, RepositoryValidator, ResolvedVocabulary, ScoredEntity, SearchHit, SearchOptions, SearchProvider, SearchableEntity, SelfReferentialRelationshipError, StorageExploreOptions, StorageFindQuery, StorageNeighborhood, StoragePathOptions, StoragePathResult, StorageProvider, StorageRepositoryConfig, StorageTimelineOptions, StorageTimelineResult, StoredEntity, StoredEntityUpdate, StoredRelationship, StoredRepository, StoredRepositorySummary, TimelineOptions, TimelineResult, type TraversalCompiler, TraversalResult, TraversalSpec, TraversalTimeoutError, TraversalValidationError, TraversalVocabularyError, Unsubscribe, UpdateEntityInput, UsageSink, ValidateEntitiesOptions, ValidateRelationshipsOptions, VocabularyChangeRecord, VocabularyProposal, VocabularyProposalResult, VocabularyValidationError, createSafeSink, generateId, isValidUuid, matchesPropertyFilters, projectEntity };
|
|
625
|
+
export { BulkImportOptions, BulkImportResult, type CompiledQuery, ConceptSearchOptions, CreateEntityInput, CreateRelationshipInput, CypherCompiler, DeepMemory, type DeepMemoryConfig, DeepMemoryError, type DeepMemoryErrorCode, DeepMemoryEvent, DeepMemoryEventType, DeleteEntitiesResult, DeleteProgressCallback, DetailLevel, DuplicateEntityError, DuplicateRelationshipError, DuplicateRepositoryError, EmbeddingProvider, EmbeddingProviderFactory, EmbeddingProviderRequiredError, EnsureSchemaResult, Entity, EntityBrief, EntityNotFoundError, EntitySummary, EntityTypeDefinition, EntityValidationPage, EventHandler, EventPayload, ExploreOptions, ExportArchive, ExportChunk, ExportError, ExportOptions, ExportStreamItem, FindEntitiesQuery, GovernanceConfig, GovernanceDeniedError, GraphResult, GraphTraversalProvider, GraphTraversalProviderRequiredError, GremlinCompiler, HookResult, ImportChunk, ImportError, ImportOptions, ImportResult, ImportStreamHeader, ImportThrottleAbortError, InMemorySearchProvider, InMemoryStorageProvider, InvalidInputError, LockProvider, MemoryRepository, MemoryVocabulary, Neighborhood, NoOpEmbeddingProvider, OperationAbortedError, OperationCancelledError, PaginatedResult, PaginationOptions, PathOptions, PathResult, PropertyFilter, Provenance, ProvenanceContext, ProviderError, ReembedResult, Relationship, RelationshipConstraintError, RelationshipNotFoundError, RelationshipQueryOptions, RelationshipSummary, RelationshipValidationPage, RemoveRelationshipsResult, RepositoryConfig, RepositoryFilter, RepositoryNotFoundError, RepositoryStats, RepositorySummary, RepositoryUpdate, RepositoryValidator, ResolvedVocabulary, ScoredEntity, SearchHit, SearchOptions, SearchProvider, SearchableEntity, SelfReferentialRelationshipError, StorageExploreOptions, StorageFindQuery, StorageNeighborhood, StoragePathOptions, StoragePathResult, StorageProvider, StorageRepositoryConfig, StorageTimelineOptions, StorageTimelineResult, StoredEntity, StoredEntityUpdate, StoredRelationship, StoredRepository, StoredRepositorySummary, TimelineOptions, TimelineResult, type TraversalCompiler, TraversalResult, TraversalSpec, TraversalTimeoutError, TraversalValidationError, TraversalVocabularyError, Unsubscribe, UpdateEntityInput, UsageSink, ValidateEntitiesOptions, ValidateRelationshipsOptions, VocabularyChangeRecord, VocabularyProposal, VocabularyProposalResult, VocabularyValidationError, createSafeSink, generateId, isValidUuid, matchesPropertyFilters, projectEntity };
|