@pyxmate/memory 0.12.2 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +16 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -394,6 +394,17 @@ interface IngestRelationship {
|
|
|
394
394
|
/** Optional properties to attach to the graph edge. */
|
|
395
395
|
properties?: Record<string, unknown>;
|
|
396
396
|
}
|
|
397
|
+
/**
|
|
398
|
+
* How `Memory.store()` should react when the graph write fails.
|
|
399
|
+
* - `throw` (default, since v0.13.0): propagate the failure so the caller
|
|
400
|
+
* knows the graph is incomplete. Honest contract: a graph write either
|
|
401
|
+
* commits or fails loudly. Silent partial-loss was the v0.12.2 bug that
|
|
402
|
+
* masked 91/92 dropped entities.
|
|
403
|
+
* - `best-effort`: swallow the error and log a warning; the entry is still
|
|
404
|
+
* considered ingested in SQLite/vector. Use only when you genuinely don't
|
|
405
|
+
* need the graph slice and a transient neo4j blip shouldn't fail ingest.
|
|
406
|
+
*/
|
|
407
|
+
type GraphFailureMode = 'throw' | 'best-effort';
|
|
397
408
|
/** Store input: what the agent sends to Memory.store(). */
|
|
398
409
|
type StoreInput = Omit<MemoryEntry, 'id' | 'createdAt'> & {
|
|
399
410
|
id?: string;
|
|
@@ -404,6 +415,8 @@ type StoreInput = Omit<MemoryEntry, 'id' | 'createdAt'> & {
|
|
|
404
415
|
entities?: IngestEntity[];
|
|
405
416
|
/** Agent-provided relationships for graph storage. */
|
|
406
417
|
relationships?: IngestRelationship[];
|
|
418
|
+
/** Graph-failure handling. Default: "throw" (loud) — see GraphFailureMode. */
|
|
419
|
+
graphFailureMode?: GraphFailureMode;
|
|
407
420
|
};
|
|
408
421
|
interface MemoryIngestRequest {
|
|
409
422
|
content?: string;
|
|
@@ -417,6 +430,8 @@ interface MemoryIngestRequest {
|
|
|
417
430
|
entities?: IngestEntity[];
|
|
418
431
|
/** Agent-provided relationships for graph storage. */
|
|
419
432
|
relationships?: IngestRelationship[];
|
|
433
|
+
/** Graph-failure handling. Default: "throw" (loud) — see GraphFailureMode. */
|
|
434
|
+
graphFailureMode?: GraphFailureMode;
|
|
420
435
|
/** Importance score (1-10). */
|
|
421
436
|
importance?: number;
|
|
422
437
|
/** Source identifier (e.g., filename, URL). */
|
|
@@ -477,4 +492,4 @@ interface GraphTraversalResult {
|
|
|
477
492
|
}>;
|
|
478
493
|
}
|
|
479
494
|
|
|
480
|
-
export { type AgentId, type ApiResponse, type ConsolidationRunResult, DEFAULTS, EmbeddingProviderName, type EnrichmentCallbacks, type ExtendedMemoryInterface, type GraphNode, type GraphRelationship, type GraphTraversalResult, type IngestEntity, type IngestRelationship, type IngestionResult, MemoryClient, type MemoryClientOptions, type MemoryEntry, type MemoryIngestRequest, type MemoryInterface, type MemoryListParams, type MemoryListResult, type MemorySearchParams, type MemorySearchResult, MemoryServerError, type MemoryStats, MemoryType, RAGStrategy, SensitivityLevel, type StoreInput, StoreTarget, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, VectorProvider };
|
|
495
|
+
export { type AgentId, type ApiResponse, type ConsolidationRunResult, DEFAULTS, EmbeddingProviderName, type EnrichmentCallbacks, type ExtendedMemoryInterface, type GraphFailureMode, type GraphNode, type GraphRelationship, type GraphTraversalResult, type IngestEntity, type IngestRelationship, type IngestionResult, MemoryClient, type MemoryClientOptions, type MemoryEntry, type MemoryIngestRequest, type MemoryInterface, type MemoryListParams, type MemoryListResult, type MemorySearchParams, type MemorySearchResult, MemoryServerError, type MemoryStats, MemoryType, RAGStrategy, SensitivityLevel, type StoreInput, StoreTarget, type TemporalQueryFilters, type TenantScopeOptions, type Timestamp, VectorProvider };
|