@anuma/sdk 6.25.0 → 6.25.2

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.
Files changed (36) hide show
  1. package/dist/expo/{chunk-XDBX4FZY.mjs → chunk-EDABJLYN.mjs} +441 -2
  2. package/dist/{react/consolidate-XKS6IZFC.mjs → expo/consolidate-5WM3CFKK.mjs} +2 -4
  3. package/dist/expo/index.cjs +14011 -14024
  4. package/dist/expo/index.d.mts +140 -27
  5. package/dist/expo/index.d.ts +140 -27
  6. package/dist/expo/index.mjs +10575 -2283
  7. package/dist/index.cjs +88 -46
  8. package/dist/index.mjs +88 -46
  9. package/dist/memory/context.d.mts +20 -1
  10. package/dist/memory/context.d.ts +20 -1
  11. package/dist/{server/chunk-RKQ4MRS2.mjs → react/chunk-BPMINZPO.mjs} +443 -2
  12. package/dist/{expo/consolidate-XBYKAFKT.mjs → react/consolidate-A2X3M47N.mjs} +2 -4
  13. package/dist/react/index.cjs +18107 -18149
  14. package/dist/react/index.d.mts +147 -27
  15. package/dist/react/index.d.ts +147 -27
  16. package/dist/react/index.mjs +13693 -5157
  17. package/dist/{react/chunk-GPLMMMZN.mjs → server/chunk-DWNEDXA5.mjs} +425 -4
  18. package/dist/server/{consolidate-54P6QZKU.mjs → consolidate-53I4CTD7.mjs} +2 -4
  19. package/dist/server/index.cjs +11590 -11580
  20. package/dist/server/index.d.mts +147 -27
  21. package/dist/server/index.d.ts +147 -27
  22. package/dist/server/index.mjs +26502 -4209
  23. package/dist/telemetry/index.d.mts +4 -0
  24. package/dist/telemetry/index.d.ts +4 -0
  25. package/dist/tools/selection/index.cjs +88 -46
  26. package/dist/tools/selection/index.mjs +88 -46
  27. package/package.json +1 -1
  28. package/dist/expo/chunk-5LKHK5LN.mjs +0 -8142
  29. package/dist/expo/chunk-WUG6GTHO.mjs +0 -445
  30. package/dist/expo/recall-4FSY2MC4.mjs +0 -8
  31. package/dist/react/chunk-DOYXFYB3.mjs +0 -8472
  32. package/dist/react/chunk-MHZB6KIX.mjs +0 -445
  33. package/dist/react/recall-6FVSDGWU.mjs +0 -8
  34. package/dist/server/chunk-FEDRFVHD.mjs +0 -22161
  35. package/dist/server/chunk-YXL5VKCO.mjs +0 -429
  36. package/dist/server/recall-Z2WJGXOL.mjs +0 -8
@@ -1358,6 +1358,28 @@ interface EmbeddingOptions {
1358
1358
  * while real PII never reaches the server. Used when PII redaction is active.
1359
1359
  */
1360
1360
  maskInput?: (text: string) => string;
1361
+ /**
1362
+ * Deadline, in ms, for EACH embeddings HTTP attempt (default 15000). An
1363
+ * attempt that exceeds it is aborted and counts as a transient failure, so the
1364
+ * bounded retry still applies. `0` disables the deadline.
1365
+ */
1366
+ timeoutMs?: number;
1367
+ /**
1368
+ * Deadline, in ms, for the `getToken()` read that precedes a request (default
1369
+ * 10000). A provider that never settles rejects instead of hanging the
1370
+ * embedding — and the recall waiting on it. `0` disables the deadline.
1371
+ */
1372
+ tokenTimeoutMs?: number;
1373
+ /**
1374
+ * Overall deadline, in ms, for one `generateEmbedding` call — the token read,
1375
+ * every retry attempt and the backoff between them. Unset (the default) means
1376
+ * only the per-attempt deadlines apply, which is right for background/bulk
1377
+ * embeds. The recall query path sets it (see
1378
+ * `RecallOptions.queryEmbedTotalTimeoutMs`) so an outage degrades a turn to
1379
+ * BM25 within a few seconds instead of ~4 x `timeoutMs`. Not applied by
1380
+ * `generateEmbeddings`.
1381
+ */
1382
+ totalTimeoutMs?: number;
1361
1383
  }
1362
1384
 
1363
1385
  /**
@@ -5393,6 +5415,12 @@ interface MemoryVaultSearchOptions {
5393
5415
  rerankTopN?: number;
5394
5416
  /** Multiplicative cross-encoder blend weight. Default 0.1. Only used when `rerank` is true. */
5395
5417
  ceWeight?: number;
5418
+ /**
5419
+ * Max ms a rerank waits for the cross-encoder's FIRST model load (default
5420
+ * 10000). On expiry the search degrades to the fused ranking and reports
5421
+ * `reranked: false`; the load continues in the background for later calls.
5422
+ */
5423
+ rerankLoadTimeoutMs?: number;
5396
5424
  /** Recency boost slope applied in the fused ranker. Default 1.0. */
5397
5425
  recencyAlpha?: number;
5398
5426
  /** Recency decay curve overrides (per-year decay slope, floor, no-date multiplier). */
@@ -5460,6 +5488,23 @@ interface MemoryVaultSearchOptions {
5460
5488
  * prefix stays byte-identical.
5461
5489
  */
5462
5490
  decryptLast?: boolean;
5491
+ /**
5492
+ * A vector the caller already computed for THIS query, with the model named in
5493
+ * `embeddingOptions`. When set, the search uses it instead of embedding the
5494
+ * query a second time — `recall()` embeds once for its chunk lane and passes
5495
+ * the vector here. An EMPTY array means the caller's embed failed: the search
5496
+ * degrades to BM25 (reported as embeddings unavailable) without re-trying a
5497
+ * provider that just failed.
5498
+ */
5499
+ queryEmbedding?: number[];
5500
+ /**
5501
+ * Overall deadline, in ms, for embedding the QUERY (token read + all attempts
5502
+ * + backoff). On expiry the search degrades to BM25 and reports embeddings
5503
+ * unavailable. Unset = only the per-attempt deadlines apply. `recall()` sets
5504
+ * it (default 8000 — see `RecallOptions.queryEmbedTotalTimeoutMs`); row
5505
+ * (re)embeds are never subject to it.
5506
+ */
5507
+ queryEmbedTotalTimeoutMs?: number;
5463
5508
  /** Admission window multiplier for decrypt-last (`limit * admitFactor`). Default 3. */
5464
5509
  admitFactor?: number;
5465
5510
  /** Admission window floor for decrypt-last. Default 30. */
@@ -5476,7 +5521,14 @@ declare function preEmbedVaultMemories(vaultCtx: VaultMemoryOperationsContext, e
5476
5521
  * Eagerly embed a single piece of content and store it in the cache.
5477
5522
  * Call this when a vault memory is created or updated.
5478
5523
  */
5479
- declare function eagerEmbedContent(content: string, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, vaultCtx?: VaultMemoryOperationsContext, memoryId?: string): Promise<void>;
5524
+ declare function eagerEmbedContent(content: string, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, vaultCtx?: VaultMemoryOperationsContext, memoryId?: string,
5525
+ /**
5526
+ * `updatedAt` of the committed row this content belongs to. When given, the
5527
+ * cache entry is tied to that row version; without it the entry is
5528
+ * unversioned and a search re-resolves it from the stored column instead of
5529
+ * trusting it (see `vectorVersion.ts`).
5530
+ */
5531
+ updatedAt?: Date): Promise<void>;
5480
5532
  /**
5481
5533
  * A single vault search result with its similarity score.
5482
5534
  */
@@ -5517,21 +5569,6 @@ interface VaultSearchResult {
5517
5569
  * @returns Sorted results (empty array on invalid input or empty vault)
5518
5570
  */
5519
5571
  declare function searchVaultMemories(query: string, vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): Promise<VaultSearchResult[]>;
5520
- /**
5521
- * Creates a memory vault search tool for use with chat completions.
5522
- *
5523
- * The tool allows the LLM to search through vault memories using semantic
5524
- * similarity. Vault entries should have their embeddings pre-computed in the
5525
- * cache (via preEmbedVaultMemories or eagerEmbedContent). Any missing
5526
- * embeddings are computed on the fly as a fallback.
5527
- *
5528
- * @param vaultCtx - Vault operations context for database access
5529
- * @param embeddingOptions - Options for embedding generation (auth, base URL)
5530
- * @param cache - Pre-populated embedding cache
5531
- * @param searchOptions - Optional search configuration
5532
- * @returns A ToolConfig that can be passed to chat completion tools
5533
- */
5534
- declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): ToolConfig;
5535
5572
 
5536
5573
  /**
5537
5574
  * C2 — Observation trend labels.
@@ -5754,6 +5791,20 @@ interface RecallOptions {
5754
5791
  rerankTopN?: number;
5755
5792
  /** Multiplicative cross-encoder blend weight. Default: 0.1. */
5756
5793
  ceWeight?: number;
5794
+ /**
5795
+ * Max ms a `mid`/`high` recall waits for the cross-encoder's FIRST model load
5796
+ * before degrading to the fused ranking (reported as `rerank-unavailable`).
5797
+ * Default: 10000. The load keeps going in the background for later calls.
5798
+ */
5799
+ rerankLoadTimeoutMs?: number;
5800
+ /**
5801
+ * Overall deadline, in ms, for embedding the query — token read, every retry
5802
+ * attempt and the backoff between them. Default: 8000. On expiry the fact lane
5803
+ * degrades to BM25 and the (cosine-only) chunk lane is skipped, reported as
5804
+ * `embeddings-unavailable`, so an embeddings outage costs a turn at most this
5805
+ * long rather than ~4 x the per-attempt timeout. `0` disables it.
5806
+ */
5807
+ queryEmbedTotalTimeoutMs?: number;
5757
5808
  /** Recency boost slope in the fused ranker. Default: 1.0. */
5758
5809
  recencyAlpha?: number;
5759
5810
  /** Recency decay curve overrides (per-year decay slope, floor, no-date multiplier). */
@@ -5781,7 +5832,8 @@ interface RecallOptions {
5781
5832
  maxHops?: number;
5782
5833
  /** Max neighbor entities expanded per hop. Default: 8. */
5783
5834
  entityFanout?: number;
5784
- /** Hard cap on accumulated memory IDs across all hops. Default: 64. */
5835
+ /** Hard cap on graph-lane memory IDs — across all hops, and on the single-hop
5836
+ * lane `low`/`mid` run. Default: 64. */
5785
5837
  nodeBudget?: number;
5786
5838
  /**
5787
5839
  * PR5 — enable LLM graph path-refinement: at each traversal hop a model picks
@@ -6016,6 +6068,10 @@ interface RecallDiagnostics {
6016
6068
  * fast `vault_size = 0` population never established a baseline for this
6017
6069
  * cost, and why the ~850ms floor on the smallest NON-empty vaults had no
6018
6070
  * attributable owner.
6071
+ *
6072
+ * EXCEPTION — a mixed fact + chunk recall embeds the query ONCE, during
6073
+ * {@link prep}, and hands the vector to both lanes. There `queryEmbed` is
6074
+ * that shared embed and sits inside `prep`, not `factLane`.
6019
6075
  */
6020
6076
  queryEmbed: number;
6021
6077
  /** Chunk-lane search (`searchChunksOp`). */
@@ -7280,7 +7336,21 @@ declare function hardDeleteDecayedOp(ctx: VaultMemoryOperationsContext, id: stri
7280
7336
  hardDeleteWindowMs: number;
7281
7337
  now?: number;
7282
7338
  }): Promise<boolean>;
7283
- declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
7339
+ /**
7340
+ * What a re-embed was computed from. A search embeds a row it READ earlier, so
7341
+ * by the time the vector lands the row may have been edited (the tool clears
7342
+ * the embedding on an edit, a consolidation rewrites content under
7343
+ * preserveUpdatedAt); writing then would pin a vector for text that is gone.
7344
+ */
7345
+ interface VaultEmbeddingExpectation {
7346
+ /** Plaintext content the vector was computed from. */
7347
+ content?: string;
7348
+ /** `updatedAt` (ms) of the row as it was read. */
7349
+ updatedAt?: number;
7350
+ }
7351
+ declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string,
7352
+ /** When given, the write lands only if the row still matches it. */
7353
+ expected?: VaultEmbeddingExpectation): Promise<boolean>;
7284
7354
 
7285
7355
  /**
7286
7356
  * Ingest server-extracted photo memories into the local vault.
@@ -8747,7 +8817,7 @@ declare function reflect(query: string, ctx: RecallContext, options: ReflectOpti
8747
8817
  declare class RerankerUnavailableError extends Error {
8748
8818
  /** The underlying import failure, kept for debugging. */
8749
8819
  readonly reason: unknown;
8750
- constructor(reason: unknown);
8820
+ constructor(reason: unknown, message?: string);
8751
8821
  }
8752
8822
  /**
8753
8823
  * Whether the cross-encoder reranker can run in this environment.
@@ -9476,14 +9546,18 @@ interface DurableAutoExtractorOptions extends Omit<CreateAutoExtractorOptions, "
9476
9546
  retryDelayMs?: number;
9477
9547
  /**
9478
9548
  * Ceiling on one batch, from the extraction call through retention. Defaults
9479
- * to 180 seconds — deliberately above the extraction call's own budget
9480
- * (`timeoutMs`, 60s per attempt, x `maxAttempts`), so this is a backstop
9481
- * against a promise that never settles at all rather than a second timeout
9482
- * competing with that one. Use `timeoutMs`/`totalTimeoutMs` to bound the LLM
9483
- * call itself. Without a ceiling here, one unsettled promise latched the
9484
- * drain and killed the outbox for the rest of the session.
9549
+ * to the extraction call's own worst case — `extract.timeoutMs` (60s) x
9550
+ * `extract.maxAttempts` (3) plus backoff, or `extract.totalTimeoutMs` when
9551
+ * that is smaller — plus a fixed retain budget, so this is a backstop against
9552
+ * a promise that never settles rather than a second timeout competing with
9553
+ * the call's own. A batch past its ceiling is cancelled: its late writes are
9554
+ * refused, so the retry cannot race it into duplicate rows. Without a
9555
+ * ceiling, one unsettled promise latched the drain and killed the outbox for
9556
+ * the rest of the session.
9485
9557
  */
9486
9558
  batchTimeoutMs?: number;
9559
+ /** Clock for the failed-session spacing. Defaults to `Date.now`. */
9560
+ now?: () => number;
9487
9561
  }
9488
9562
  /** Durable client extraction. Call once per authenticated database session.
9489
9563
  * Resumes pending jobs on creation, reads bounded batches from encrypted
@@ -9888,6 +9962,38 @@ declare function encodeChunkVector(vector: ArrayLike<number>): string;
9888
9962
  */
9889
9963
  declare function decodeChunkVector(vector: number[] | string | null | undefined, onMalformed?: () => void): Float32Array<ArrayBuffer>;
9890
9964
 
9965
+ /**
9966
+ * `memory_vault_search` chat tool — the executor half of the vault search.
9967
+ *
9968
+ * Split out of `searchTool.ts` to break the `recall` <-> `searchTool` import
9969
+ * cycle: `recall()` statically imports the vault search from `searchTool.ts`,
9970
+ * and this executor routes through `recall()`. While both lived in one module
9971
+ * the executor reached recall through a dynamic `import()`, and the cycle it
9972
+ * papered over is what surfaced as the order-dependent
9973
+ * `Cannot access 'nowMs' before initialization` flake. With the executor here,
9974
+ * the graph is a straight line: executor -> recall -> searchTool.
9975
+ *
9976
+ * `searchTool.ts` must NOT import (or re-export) from this module, or the
9977
+ * cycle comes back. The public name is re-exported from the barrel
9978
+ * (`./index.ts`), which is the path every entry point already uses.
9979
+ */
9980
+
9981
+ /**
9982
+ * Creates a memory vault search tool for use with chat completions.
9983
+ *
9984
+ * The tool allows the LLM to search through vault memories using semantic
9985
+ * similarity. Vault entries should have their embeddings pre-computed in the
9986
+ * cache (via preEmbedVaultMemories or eagerEmbedContent). Any missing
9987
+ * embeddings are computed on the fly as a fallback.
9988
+ *
9989
+ * @param vaultCtx - Vault operations context for database access
9990
+ * @param embeddingOptions - Options for embedding generation (auth, base URL)
9991
+ * @param cache - Pre-populated embedding cache
9992
+ * @param searchOptions - Optional search configuration
9993
+ * @returns A ToolConfig that can be passed to chat completion tools
9994
+ */
9995
+ declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): ToolConfig;
9996
+
9891
9997
  /**
9892
9998
  * Memory Vault Tool
9893
9999
  *
@@ -10475,8 +10581,15 @@ declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageR
10475
10581
  * rolling a release back past v46 after a device has run it resets that
10476
10582
  * device's local database. Relevant to OTA, where a JS-only rollback can
10477
10583
  * land on a database the newer build already migrated
10584
+ * - v47: Added failed_sessions, failed_head, failed_at to
10585
+ * memory_extraction_jobs — the persisted poison count for a job's head batch
10586
+ * (how many worker sessions it failed in, which batch that count belongs to,
10587
+ * and when the last one was counted, so sessions minutes apart count once). Without it the retry
10588
+ * budget was in memory and reset on every turn, so one batch that could never
10589
+ * extract blocked its conversation's extraction forever. Additive, both
10590
+ * nullable, no backfill: NULL reads as "never failed"
10478
10591
  */
10479
- declare const SDK_SCHEMA_VERSION = 46;
10592
+ declare const SDK_SCHEMA_VERSION = 47;
10480
10593
  /**
10481
10594
  * Combined WatermelonDB schema for all SDK storage modules.
10482
10595
  *
@@ -11095,4 +11208,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
11095
11208
  */
11096
11209
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
11097
11210
 
11098
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
11211
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
@@ -1358,6 +1358,28 @@ interface EmbeddingOptions {
1358
1358
  * while real PII never reaches the server. Used when PII redaction is active.
1359
1359
  */
1360
1360
  maskInput?: (text: string) => string;
1361
+ /**
1362
+ * Deadline, in ms, for EACH embeddings HTTP attempt (default 15000). An
1363
+ * attempt that exceeds it is aborted and counts as a transient failure, so the
1364
+ * bounded retry still applies. `0` disables the deadline.
1365
+ */
1366
+ timeoutMs?: number;
1367
+ /**
1368
+ * Deadline, in ms, for the `getToken()` read that precedes a request (default
1369
+ * 10000). A provider that never settles rejects instead of hanging the
1370
+ * embedding — and the recall waiting on it. `0` disables the deadline.
1371
+ */
1372
+ tokenTimeoutMs?: number;
1373
+ /**
1374
+ * Overall deadline, in ms, for one `generateEmbedding` call — the token read,
1375
+ * every retry attempt and the backoff between them. Unset (the default) means
1376
+ * only the per-attempt deadlines apply, which is right for background/bulk
1377
+ * embeds. The recall query path sets it (see
1378
+ * `RecallOptions.queryEmbedTotalTimeoutMs`) so an outage degrades a turn to
1379
+ * BM25 within a few seconds instead of ~4 x `timeoutMs`. Not applied by
1380
+ * `generateEmbeddings`.
1381
+ */
1382
+ totalTimeoutMs?: number;
1361
1383
  }
1362
1384
 
1363
1385
  /**
@@ -5393,6 +5415,12 @@ interface MemoryVaultSearchOptions {
5393
5415
  rerankTopN?: number;
5394
5416
  /** Multiplicative cross-encoder blend weight. Default 0.1. Only used when `rerank` is true. */
5395
5417
  ceWeight?: number;
5418
+ /**
5419
+ * Max ms a rerank waits for the cross-encoder's FIRST model load (default
5420
+ * 10000). On expiry the search degrades to the fused ranking and reports
5421
+ * `reranked: false`; the load continues in the background for later calls.
5422
+ */
5423
+ rerankLoadTimeoutMs?: number;
5396
5424
  /** Recency boost slope applied in the fused ranker. Default 1.0. */
5397
5425
  recencyAlpha?: number;
5398
5426
  /** Recency decay curve overrides (per-year decay slope, floor, no-date multiplier). */
@@ -5460,6 +5488,23 @@ interface MemoryVaultSearchOptions {
5460
5488
  * prefix stays byte-identical.
5461
5489
  */
5462
5490
  decryptLast?: boolean;
5491
+ /**
5492
+ * A vector the caller already computed for THIS query, with the model named in
5493
+ * `embeddingOptions`. When set, the search uses it instead of embedding the
5494
+ * query a second time — `recall()` embeds once for its chunk lane and passes
5495
+ * the vector here. An EMPTY array means the caller's embed failed: the search
5496
+ * degrades to BM25 (reported as embeddings unavailable) without re-trying a
5497
+ * provider that just failed.
5498
+ */
5499
+ queryEmbedding?: number[];
5500
+ /**
5501
+ * Overall deadline, in ms, for embedding the QUERY (token read + all attempts
5502
+ * + backoff). On expiry the search degrades to BM25 and reports embeddings
5503
+ * unavailable. Unset = only the per-attempt deadlines apply. `recall()` sets
5504
+ * it (default 8000 — see `RecallOptions.queryEmbedTotalTimeoutMs`); row
5505
+ * (re)embeds are never subject to it.
5506
+ */
5507
+ queryEmbedTotalTimeoutMs?: number;
5463
5508
  /** Admission window multiplier for decrypt-last (`limit * admitFactor`). Default 3. */
5464
5509
  admitFactor?: number;
5465
5510
  /** Admission window floor for decrypt-last. Default 30. */
@@ -5476,7 +5521,14 @@ declare function preEmbedVaultMemories(vaultCtx: VaultMemoryOperationsContext, e
5476
5521
  * Eagerly embed a single piece of content and store it in the cache.
5477
5522
  * Call this when a vault memory is created or updated.
5478
5523
  */
5479
- declare function eagerEmbedContent(content: string, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, vaultCtx?: VaultMemoryOperationsContext, memoryId?: string): Promise<void>;
5524
+ declare function eagerEmbedContent(content: string, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, vaultCtx?: VaultMemoryOperationsContext, memoryId?: string,
5525
+ /**
5526
+ * `updatedAt` of the committed row this content belongs to. When given, the
5527
+ * cache entry is tied to that row version; without it the entry is
5528
+ * unversioned and a search re-resolves it from the stored column instead of
5529
+ * trusting it (see `vectorVersion.ts`).
5530
+ */
5531
+ updatedAt?: Date): Promise<void>;
5480
5532
  /**
5481
5533
  * A single vault search result with its similarity score.
5482
5534
  */
@@ -5517,21 +5569,6 @@ interface VaultSearchResult {
5517
5569
  * @returns Sorted results (empty array on invalid input or empty vault)
5518
5570
  */
5519
5571
  declare function searchVaultMemories(query: string, vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): Promise<VaultSearchResult[]>;
5520
- /**
5521
- * Creates a memory vault search tool for use with chat completions.
5522
- *
5523
- * The tool allows the LLM to search through vault memories using semantic
5524
- * similarity. Vault entries should have their embeddings pre-computed in the
5525
- * cache (via preEmbedVaultMemories or eagerEmbedContent). Any missing
5526
- * embeddings are computed on the fly as a fallback.
5527
- *
5528
- * @param vaultCtx - Vault operations context for database access
5529
- * @param embeddingOptions - Options for embedding generation (auth, base URL)
5530
- * @param cache - Pre-populated embedding cache
5531
- * @param searchOptions - Optional search configuration
5532
- * @returns A ToolConfig that can be passed to chat completion tools
5533
- */
5534
- declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): ToolConfig;
5535
5572
 
5536
5573
  /**
5537
5574
  * C2 — Observation trend labels.
@@ -5754,6 +5791,20 @@ interface RecallOptions {
5754
5791
  rerankTopN?: number;
5755
5792
  /** Multiplicative cross-encoder blend weight. Default: 0.1. */
5756
5793
  ceWeight?: number;
5794
+ /**
5795
+ * Max ms a `mid`/`high` recall waits for the cross-encoder's FIRST model load
5796
+ * before degrading to the fused ranking (reported as `rerank-unavailable`).
5797
+ * Default: 10000. The load keeps going in the background for later calls.
5798
+ */
5799
+ rerankLoadTimeoutMs?: number;
5800
+ /**
5801
+ * Overall deadline, in ms, for embedding the query — token read, every retry
5802
+ * attempt and the backoff between them. Default: 8000. On expiry the fact lane
5803
+ * degrades to BM25 and the (cosine-only) chunk lane is skipped, reported as
5804
+ * `embeddings-unavailable`, so an embeddings outage costs a turn at most this
5805
+ * long rather than ~4 x the per-attempt timeout. `0` disables it.
5806
+ */
5807
+ queryEmbedTotalTimeoutMs?: number;
5757
5808
  /** Recency boost slope in the fused ranker. Default: 1.0. */
5758
5809
  recencyAlpha?: number;
5759
5810
  /** Recency decay curve overrides (per-year decay slope, floor, no-date multiplier). */
@@ -5781,7 +5832,8 @@ interface RecallOptions {
5781
5832
  maxHops?: number;
5782
5833
  /** Max neighbor entities expanded per hop. Default: 8. */
5783
5834
  entityFanout?: number;
5784
- /** Hard cap on accumulated memory IDs across all hops. Default: 64. */
5835
+ /** Hard cap on graph-lane memory IDs — across all hops, and on the single-hop
5836
+ * lane `low`/`mid` run. Default: 64. */
5785
5837
  nodeBudget?: number;
5786
5838
  /**
5787
5839
  * PR5 — enable LLM graph path-refinement: at each traversal hop a model picks
@@ -6016,6 +6068,10 @@ interface RecallDiagnostics {
6016
6068
  * fast `vault_size = 0` population never established a baseline for this
6017
6069
  * cost, and why the ~850ms floor on the smallest NON-empty vaults had no
6018
6070
  * attributable owner.
6071
+ *
6072
+ * EXCEPTION — a mixed fact + chunk recall embeds the query ONCE, during
6073
+ * {@link prep}, and hands the vector to both lanes. There `queryEmbed` is
6074
+ * that shared embed and sits inside `prep`, not `factLane`.
6019
6075
  */
6020
6076
  queryEmbed: number;
6021
6077
  /** Chunk-lane search (`searchChunksOp`). */
@@ -7280,7 +7336,21 @@ declare function hardDeleteDecayedOp(ctx: VaultMemoryOperationsContext, id: stri
7280
7336
  hardDeleteWindowMs: number;
7281
7337
  now?: number;
7282
7338
  }): Promise<boolean>;
7283
- declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
7339
+ /**
7340
+ * What a re-embed was computed from. A search embeds a row it READ earlier, so
7341
+ * by the time the vector lands the row may have been edited (the tool clears
7342
+ * the embedding on an edit, a consolidation rewrites content under
7343
+ * preserveUpdatedAt); writing then would pin a vector for text that is gone.
7344
+ */
7345
+ interface VaultEmbeddingExpectation {
7346
+ /** Plaintext content the vector was computed from. */
7347
+ content?: string;
7348
+ /** `updatedAt` (ms) of the row as it was read. */
7349
+ updatedAt?: number;
7350
+ }
7351
+ declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string,
7352
+ /** When given, the write lands only if the row still matches it. */
7353
+ expected?: VaultEmbeddingExpectation): Promise<boolean>;
7284
7354
 
7285
7355
  /**
7286
7356
  * Ingest server-extracted photo memories into the local vault.
@@ -8747,7 +8817,7 @@ declare function reflect(query: string, ctx: RecallContext, options: ReflectOpti
8747
8817
  declare class RerankerUnavailableError extends Error {
8748
8818
  /** The underlying import failure, kept for debugging. */
8749
8819
  readonly reason: unknown;
8750
- constructor(reason: unknown);
8820
+ constructor(reason: unknown, message?: string);
8751
8821
  }
8752
8822
  /**
8753
8823
  * Whether the cross-encoder reranker can run in this environment.
@@ -9476,14 +9546,18 @@ interface DurableAutoExtractorOptions extends Omit<CreateAutoExtractorOptions, "
9476
9546
  retryDelayMs?: number;
9477
9547
  /**
9478
9548
  * Ceiling on one batch, from the extraction call through retention. Defaults
9479
- * to 180 seconds — deliberately above the extraction call's own budget
9480
- * (`timeoutMs`, 60s per attempt, x `maxAttempts`), so this is a backstop
9481
- * against a promise that never settles at all rather than a second timeout
9482
- * competing with that one. Use `timeoutMs`/`totalTimeoutMs` to bound the LLM
9483
- * call itself. Without a ceiling here, one unsettled promise latched the
9484
- * drain and killed the outbox for the rest of the session.
9549
+ * to the extraction call's own worst case — `extract.timeoutMs` (60s) x
9550
+ * `extract.maxAttempts` (3) plus backoff, or `extract.totalTimeoutMs` when
9551
+ * that is smaller — plus a fixed retain budget, so this is a backstop against
9552
+ * a promise that never settles rather than a second timeout competing with
9553
+ * the call's own. A batch past its ceiling is cancelled: its late writes are
9554
+ * refused, so the retry cannot race it into duplicate rows. Without a
9555
+ * ceiling, one unsettled promise latched the drain and killed the outbox for
9556
+ * the rest of the session.
9485
9557
  */
9486
9558
  batchTimeoutMs?: number;
9559
+ /** Clock for the failed-session spacing. Defaults to `Date.now`. */
9560
+ now?: () => number;
9487
9561
  }
9488
9562
  /** Durable client extraction. Call once per authenticated database session.
9489
9563
  * Resumes pending jobs on creation, reads bounded batches from encrypted
@@ -9888,6 +9962,38 @@ declare function encodeChunkVector(vector: ArrayLike<number>): string;
9888
9962
  */
9889
9963
  declare function decodeChunkVector(vector: number[] | string | null | undefined, onMalformed?: () => void): Float32Array<ArrayBuffer>;
9890
9964
 
9965
+ /**
9966
+ * `memory_vault_search` chat tool — the executor half of the vault search.
9967
+ *
9968
+ * Split out of `searchTool.ts` to break the `recall` <-> `searchTool` import
9969
+ * cycle: `recall()` statically imports the vault search from `searchTool.ts`,
9970
+ * and this executor routes through `recall()`. While both lived in one module
9971
+ * the executor reached recall through a dynamic `import()`, and the cycle it
9972
+ * papered over is what surfaced as the order-dependent
9973
+ * `Cannot access 'nowMs' before initialization` flake. With the executor here,
9974
+ * the graph is a straight line: executor -> recall -> searchTool.
9975
+ *
9976
+ * `searchTool.ts` must NOT import (or re-export) from this module, or the
9977
+ * cycle comes back. The public name is re-exported from the barrel
9978
+ * (`./index.ts`), which is the path every entry point already uses.
9979
+ */
9980
+
9981
+ /**
9982
+ * Creates a memory vault search tool for use with chat completions.
9983
+ *
9984
+ * The tool allows the LLM to search through vault memories using semantic
9985
+ * similarity. Vault entries should have their embeddings pre-computed in the
9986
+ * cache (via preEmbedVaultMemories or eagerEmbedContent). Any missing
9987
+ * embeddings are computed on the fly as a fallback.
9988
+ *
9989
+ * @param vaultCtx - Vault operations context for database access
9990
+ * @param embeddingOptions - Options for embedding generation (auth, base URL)
9991
+ * @param cache - Pre-populated embedding cache
9992
+ * @param searchOptions - Optional search configuration
9993
+ * @returns A ToolConfig that can be passed to chat completion tools
9994
+ */
9995
+ declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): ToolConfig;
9996
+
9891
9997
  /**
9892
9998
  * Memory Vault Tool
9893
9999
  *
@@ -10475,8 +10581,15 @@ declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageR
10475
10581
  * rolling a release back past v46 after a device has run it resets that
10476
10582
  * device's local database. Relevant to OTA, where a JS-only rollback can
10477
10583
  * land on a database the newer build already migrated
10584
+ * - v47: Added failed_sessions, failed_head, failed_at to
10585
+ * memory_extraction_jobs — the persisted poison count for a job's head batch
10586
+ * (how many worker sessions it failed in, which batch that count belongs to,
10587
+ * and when the last one was counted, so sessions minutes apart count once). Without it the retry
10588
+ * budget was in memory and reset on every turn, so one batch that could never
10589
+ * extract blocked its conversation's extraction forever. Additive, both
10590
+ * nullable, no backfill: NULL reads as "never failed"
10478
10591
  */
10479
- declare const SDK_SCHEMA_VERSION = 46;
10592
+ declare const SDK_SCHEMA_VERSION = 47;
10480
10593
  /**
10481
10594
  * Combined WatermelonDB schema for all SDK storage modules.
10482
10595
  *
@@ -11095,4 +11208,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
11095
11208
  */
11096
11209
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
11097
11210
 
11098
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
11211
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };