@utaba/deep-memory 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +21 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +54 -1
- package/dist/types/index.d.ts +54 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
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-dhIuWJbJ.cjs';
|
|
2
2
|
export { ah as EnrichedRelationship, ai as EntityMap, aj as EntityTypeInput, ak as EntityValidationIssue, al as ExportLegalMetadata, am as ExportManifest, an as ExportPipelineMetadata, ao as GetEntitiesOptions, ap as GetEntityOptions, aq as GovernanceMode, ar as ImportWarning, as as NeighborhoodCenter, at as NeighborhoodGroup, au as NeighborhoodLayer, av as Path, aw as PropertySchema, ax as PropertyType, ay as ProvenanceFilter, az as RelationshipDirection, aA as RelationshipTypeDefinition, aB as RelationshipTypeInput, aC as RelationshipValidationIssue, aD as RepositoryMetadata, aE as StorageNeighborhoodGroup, aF as StorageNeighborhoodLayer, aG as StoragePath, aH as StorageTimelineEvent, aI as TimelineEntityRef, aJ as TimelineEvent, aK as TimelineRelationshipDetail, aL as VocabularyInput } from './portability-dhIuWJbJ.cjs';
|
|
3
|
-
import { DeepMemoryEventType, EventHandler, Unsubscribe, DeepMemoryEvent, HookResult, EventPayload } from './types/index.cjs';
|
|
3
|
+
import { DeepMemoryEventType, EventHandler, Unsubscribe, DeepMemoryEvent, HookResult, EventPayload, UsageSink } from './types/index.cjs';
|
|
4
|
+
export { OperationUsage } from './types/index.cjs';
|
|
4
5
|
import { T as TraversalSpec, a as TraversalResult } from './traversal-Bmv4we_g.cjs';
|
|
5
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-Bmv4we_g.cjs';
|
|
6
7
|
import { S as StorageProvider, E as EnsureSchemaResult } from './StorageProvider-DmKddrEg.cjs';
|
|
@@ -446,6 +447,17 @@ declare function matchesPropertyFilters(properties: Record<string, unknown>, fil
|
|
|
446
447
|
/** Project a stored entity to the requested detail level */
|
|
447
448
|
declare function projectEntity(stored: StoredEntity, level: DetailLevel): Entity | EntitySummary | EntityBrief;
|
|
448
449
|
|
|
450
|
+
/**
|
|
451
|
+
* Wrap a sink with try/catch so a throwing caller sink never aborts the
|
|
452
|
+
* underlying operation. Errors from the caller's sink are silently swallowed;
|
|
453
|
+
* if the caller cares about internal failures they can catch in their own
|
|
454
|
+
* implementation.
|
|
455
|
+
*
|
|
456
|
+
* Returns `undefined` if the input sink is `undefined`, letting providers
|
|
457
|
+
* cheaply skip sink machinery when nobody is listening.
|
|
458
|
+
*/
|
|
459
|
+
declare function createSafeSink(sink: UsageSink | undefined): UsageSink | undefined;
|
|
460
|
+
|
|
449
461
|
interface TraversalCompiler {
|
|
450
462
|
/** The query language this compiler targets. */
|
|
451
463
|
readonly language: 'gremlin' | 'cypher' | 'sql';
|
|
@@ -538,4 +550,4 @@ declare class NoOpEmbeddingProvider implements EmbeddingProvider {
|
|
|
538
550
|
modelId(): string;
|
|
539
551
|
}
|
|
540
552
|
|
|
541
|
-
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, 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, ValidateEntitiesOptions, ValidateRelationshipsOptions, VocabularyChangeRecord, VocabularyProposal, VocabularyProposalResult, VocabularyValidationError, generateId, isValidUuid, matchesPropertyFilters, projectEntity };
|
|
553
|
+
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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
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-dhIuWJbJ.js';
|
|
2
2
|
export { ah as EnrichedRelationship, ai as EntityMap, aj as EntityTypeInput, ak as EntityValidationIssue, al as ExportLegalMetadata, am as ExportManifest, an as ExportPipelineMetadata, ao as GetEntitiesOptions, ap as GetEntityOptions, aq as GovernanceMode, ar as ImportWarning, as as NeighborhoodCenter, at as NeighborhoodGroup, au as NeighborhoodLayer, av as Path, aw as PropertySchema, ax as PropertyType, ay as ProvenanceFilter, az as RelationshipDirection, aA as RelationshipTypeDefinition, aB as RelationshipTypeInput, aC as RelationshipValidationIssue, aD as RepositoryMetadata, aE as StorageNeighborhoodGroup, aF as StorageNeighborhoodLayer, aG as StoragePath, aH as StorageTimelineEvent, aI as TimelineEntityRef, aJ as TimelineEvent, aK as TimelineRelationshipDetail, aL as VocabularyInput } from './portability-dhIuWJbJ.js';
|
|
3
|
-
import { DeepMemoryEventType, EventHandler, Unsubscribe, DeepMemoryEvent, HookResult, EventPayload } from './types/index.js';
|
|
3
|
+
import { DeepMemoryEventType, EventHandler, Unsubscribe, DeepMemoryEvent, HookResult, EventPayload, UsageSink } from './types/index.js';
|
|
4
|
+
export { OperationUsage } from './types/index.js';
|
|
4
5
|
import { T as TraversalSpec, a as TraversalResult } from './traversal-D8SGKq0z.js';
|
|
5
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-D8SGKq0z.js';
|
|
6
7
|
import { S as StorageProvider, E as EnsureSchemaResult } from './StorageProvider-CRenWERy.js';
|
|
@@ -446,6 +447,17 @@ declare function matchesPropertyFilters(properties: Record<string, unknown>, fil
|
|
|
446
447
|
/** Project a stored entity to the requested detail level */
|
|
447
448
|
declare function projectEntity(stored: StoredEntity, level: DetailLevel): Entity | EntitySummary | EntityBrief;
|
|
448
449
|
|
|
450
|
+
/**
|
|
451
|
+
* Wrap a sink with try/catch so a throwing caller sink never aborts the
|
|
452
|
+
* underlying operation. Errors from the caller's sink are silently swallowed;
|
|
453
|
+
* if the caller cares about internal failures they can catch in their own
|
|
454
|
+
* implementation.
|
|
455
|
+
*
|
|
456
|
+
* Returns `undefined` if the input sink is `undefined`, letting providers
|
|
457
|
+
* cheaply skip sink machinery when nobody is listening.
|
|
458
|
+
*/
|
|
459
|
+
declare function createSafeSink(sink: UsageSink | undefined): UsageSink | undefined;
|
|
460
|
+
|
|
449
461
|
interface TraversalCompiler {
|
|
450
462
|
/** The query language this compiler targets. */
|
|
451
463
|
readonly language: 'gremlin' | 'cypher' | 'sql';
|
|
@@ -538,4 +550,4 @@ declare class NoOpEmbeddingProvider implements EmbeddingProvider {
|
|
|
538
550
|
modelId(): string;
|
|
539
551
|
}
|
|
540
552
|
|
|
541
|
-
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, 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, ValidateEntitiesOptions, ValidateRelationshipsOptions, VocabularyChangeRecord, VocabularyProposal, VocabularyProposalResult, VocabularyValidationError, generateId, isValidUuid, matchesPropertyFilters, projectEntity };
|
|
553
|
+
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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -2553,7 +2553,7 @@ var MemoryRepository = class {
|
|
|
2553
2553
|
### Step 1 \u2014 Discover before you traverse
|
|
2554
2554
|
|
|
2555
2555
|
Before following relationships from an entity, check that it actually has relationships.
|
|
2556
|
-
|
|
2556
|
+
Graph queries include \`relationshipSummary\` on every returned entity by default
|
|
2557
2557
|
(outbound and inbound counts by type). Inspect this before traversing \u2014 entities with
|
|
2558
2558
|
zero outbound counts for the relationship type you need have no connections to follow.
|
|
2559
2559
|
To skip summaries and reduce response size, set \`includeRelationshipSummary: false\`.
|
|
@@ -2561,7 +2561,7 @@ To skip summaries and reduce response size, set \`includeRelationshipSummary: fa
|
|
|
2561
2561
|
### Step 2 \u2014 Use projection for aggregation
|
|
2562
2562
|
|
|
2563
2563
|
To understand what data exists (e.g. all distinct values of a property, or counts by
|
|
2564
|
-
category), use
|
|
2564
|
+
category), use a graph query with \`projection\` instead of fetching full entities:
|
|
2565
2565
|
\`{ start: { entityType: "..." }, projection: { properties: ["propName"], distinct: true }, limit: 200 }\`
|
|
2566
2566
|
|
|
2567
2567
|
This returns only the aggregated values \u2014 no entity objects \u2014 keeping responses lightweight.
|
|
@@ -2570,23 +2570,23 @@ This returns only the aggregated values \u2014 no entity objects \u2014 keeping
|
|
|
2570
2570
|
|
|
2571
2571
|
- **Omit relationshipTypes** in a traversal step to follow all relationship types at once,
|
|
2572
2572
|
rather than making separate calls per type.
|
|
2573
|
-
- **Use multi-step traversals** for multi-hop patterns. A two-step
|
|
2573
|
+
- **Use multi-step traversals** for multi-hop patterns. A two-step traverse operation
|
|
2574
2574
|
(e.g. Equipment \u2192 Component \u2192 MaintenanceProcedure) is one call, not two sequential calls.
|
|
2575
2575
|
- **Use returnMode "all"** when you need intermediate entities along the path, not just
|
|
2576
2576
|
the terminal nodes.
|
|
2577
2577
|
|
|
2578
2578
|
### Step 4 \u2014 Use semantic search for known-unknowns
|
|
2579
2579
|
|
|
2580
|
-
|
|
2580
|
+
Semantic/concept search is best for finding specific entities when you know roughly
|
|
2581
2581
|
what you're looking for but not the exact label or type. It is not efficient for broad
|
|
2582
|
-
discovery \u2014 use projection or
|
|
2582
|
+
discovery \u2014 use projection or entity finding for that.
|
|
2583
2583
|
|
|
2584
2584
|
### Common anti-patterns to avoid
|
|
2585
2585
|
|
|
2586
2586
|
- **Don't traverse from entities with zero relationship counts.** The \`relationshipSummary\` on each entity tells you what is connected before you traverse.
|
|
2587
|
-
- **Don't split queries by relationship type.** One step with no type filter is better
|
|
2587
|
+
- **Don't split queries by relationship type.** One traverse step with no type filter is better
|
|
2588
2588
|
than three separate single-type calls.
|
|
2589
|
-
- **Don't use sequential single-hop traversals** when a multi-step
|
|
2589
|
+
- **Don't use sequential single-hop traversals** when a multi-step traverse operation achieves the
|
|
2590
2590
|
same result in one call.
|
|
2591
2591
|
- **Don't fetch full entities when you only need property values.** Use projection.`;
|
|
2592
2592
|
}
|
|
@@ -3431,7 +3431,7 @@ var EventBus = class {
|
|
|
3431
3431
|
};
|
|
3432
3432
|
|
|
3433
3433
|
// src/portability/RepositoryExporter.ts
|
|
3434
|
-
var LIBRARY_VERSION = true ? "0.
|
|
3434
|
+
var LIBRARY_VERSION = true ? "0.9.1" : "0.1.0";
|
|
3435
3435
|
var RepositoryExporter = class {
|
|
3436
3436
|
storage;
|
|
3437
3437
|
provenance;
|
|
@@ -4486,6 +4486,17 @@ var DeepMemory = class {
|
|
|
4486
4486
|
}
|
|
4487
4487
|
};
|
|
4488
4488
|
|
|
4489
|
+
// src/usage/safeSink.ts
|
|
4490
|
+
function createSafeSink(sink) {
|
|
4491
|
+
if (!sink) return void 0;
|
|
4492
|
+
return (usage) => {
|
|
4493
|
+
try {
|
|
4494
|
+
sink(usage);
|
|
4495
|
+
} catch {
|
|
4496
|
+
}
|
|
4497
|
+
};
|
|
4498
|
+
}
|
|
4499
|
+
|
|
4489
4500
|
// src/relationships/compilers/GremlinCompiler.ts
|
|
4490
4501
|
var DEFAULT_ESTIMATED_FANOUT_PER_HOP = 10;
|
|
4491
4502
|
var GremlinCompiler = class {
|
|
@@ -5560,6 +5571,7 @@ export {
|
|
|
5560
5571
|
TraversalValidationError,
|
|
5561
5572
|
TraversalVocabularyError,
|
|
5562
5573
|
VocabularyValidationError,
|
|
5574
|
+
createSafeSink,
|
|
5563
5575
|
generateId,
|
|
5564
5576
|
isValidUuid,
|
|
5565
5577
|
matchesPropertyFilters,
|