@anuma/sdk 6.33.2 → 6.34.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.
@@ -1490,13 +1490,13 @@ interface EmbeddingOptions {
1490
1490
  */
1491
1491
  tokenTimeoutMs?: number;
1492
1492
  /**
1493
- * Overall deadline, in ms, for one `generateEmbedding` call — the token read,
1493
+ * Overall deadline, in ms, for one `generateEmbedding` or `generateEmbeddings` call — the token read,
1494
1494
  * every retry attempt and the backoff between them. Unset (the default) means
1495
1495
  * only the per-attempt deadlines apply, which is right for background/bulk
1496
1496
  * embeds. The recall query path sets it (see
1497
1497
  * `RecallOptions.queryEmbedTotalTimeoutMs`) so an outage degrades a turn to
1498
- * BM25 within a few seconds instead of ~4 x `timeoutMs`. Not applied by
1499
- * `generateEmbeddings`.
1498
+ * BM25 within a few seconds instead of ~4 x `timeoutMs`. Batch calls share
1499
+ * one budget across authentication, all chunks, retries and backoff.
1500
1500
  */
1501
1501
  totalTimeoutMs?: number;
1502
1502
  }
@@ -5742,6 +5742,55 @@ interface VaultSearchResult {
5742
5742
  * these to suppress the originating chunk in the chunk lane. */
5743
5743
  sourceChunkIds?: string[] | null;
5744
5744
  }
5745
+ /**
5746
+ * Search + rank in one call. Thin wrapper over {@link prepareVaultCandidates} +
5747
+ * {@link rankPreparedVaultCandidates}; behavior is unchanged.
5748
+ */
5749
+ declare function searchVaultMemoriesWithSize(query: string, vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): Promise<{
5750
+ results: VaultSearchResult[];
5751
+ vaultSize: number;
5752
+ reranked: boolean;
5753
+ /**
5754
+ * Wall-clock ms this search spent inside the cross-encoder.
5755
+ *
5756
+ * 0 on every path that did not reach the CE, which `reranked` already
5757
+ * distinguishes from "ran and cost nothing". Reported because `factLane`
5758
+ * timing alone could not separate the rerank from the query embed, the vault
5759
+ * read and the fused ranking — see {@link RerankStats}.
5760
+ */
5761
+ rerankMs: number;
5762
+ hadV2Head: boolean;
5763
+ /** True when this search had no usable cosine lane and ranked on BM25 alone. */
5764
+ embeddingsUnavailable: boolean;
5765
+ /**
5766
+ * True when this search actually scored rows against a real query vector.
5767
+ *
5768
+ * NOT the inverse of `embeddingsUnavailable`. That flag answers "did cosine
5769
+ * break?", and it is `false` on the degenerate returns below — an invalid
5770
+ * query, an empty scope, nothing decryptable — where cosine did not break so
5771
+ * much as never run. A caller asking "can this lane vouch that semantic
5772
+ * ranking happened?" (recall's chunk-lane reconciliation) must not read those
5773
+ * as a healthy cosine pass.
5774
+ */
5775
+ rankedOnCosine: boolean;
5776
+ /**
5777
+ * Which vault read path ran — projected key scan (`true`) or legacy whole-vault
5778
+ * load (`false`). See {@link PreparedVaultCandidates.decryptLast}.
5779
+ */
5780
+ decryptLast: boolean;
5781
+ /**
5782
+ * Rows this search paid to decrypt. Read against `vaultSize` — see
5783
+ * {@link PreparedVaultCandidates.rowsDecrypted}.
5784
+ */
5785
+ rowsDecrypted: number;
5786
+ /**
5787
+ * Wall-clock ms spent embedding the query, and rows the lane had to re-embed
5788
+ * because their stored vector was unusable — see
5789
+ * {@link PreparedVaultCandidates.queryEmbedMs} and `rowsEmbedded`.
5790
+ */
5791
+ queryEmbedMs: number;
5792
+ rowsEmbedded: number;
5793
+ }>;
5745
5794
  /**
5746
5795
  * Search vault memories by semantic similarity. Returns structured results
5747
5796
  * sorted by descending similarity, filtered by threshold and limit.
@@ -6006,7 +6055,15 @@ interface RecallOptions {
6006
6055
  */
6007
6056
  graphRefine?: boolean;
6008
6057
  }
6058
+ /** A fact source supplies bounded candidates; recall owns ranking and result handling. */
6059
+ interface RecallFactSource {
6060
+ search: (query: string, options?: MemoryVaultSearchOptions) => ReturnType<typeof searchVaultMemoriesWithSize>;
6061
+ graphRanking: (query: string, traverse: boolean, options: RecallOptions) => Promise<string[]>;
6062
+ temporalRanking: (query: string, now?: number) => Promise<string[]>;
6063
+ }
6009
6064
  interface RecallContext {
6065
+ /** Alternative to a WatermelonDB vault for fact-only recall. */
6066
+ factSource?: RecallFactSource;
6010
6067
  /** Required when `types` includes 'fact'. */
6011
6068
  vaultCtx?: VaultMemoryOperationsContext;
6012
6069
  /** Required when `types` includes 'chunk'. */
@@ -9141,6 +9198,163 @@ interface LocalMemoryStoreOptions {
9141
9198
  */
9142
9199
  declare function createLocalMemoryStore(options: LocalMemoryStoreOptions): MemoryStore;
9143
9200
 
9201
+ /** The nearby private-memory row. Content and kind_value are plaintext ONLY on the device. */
9202
+ interface RemoteMemoryRow {
9203
+ memory_id: string;
9204
+ content: string;
9205
+ scope: string;
9206
+ created_at: number;
9207
+ updated_at: number;
9208
+ is_deleted: boolean;
9209
+ embedding?: number[];
9210
+ embedding_model?: string;
9211
+ kind?: string;
9212
+ kind_value?: string;
9213
+ level?: string;
9214
+ folder_id?: string;
9215
+ source_chunk_ids?: string;
9216
+ proof_count?: number;
9217
+ source?: string;
9218
+ event_time_start?: number;
9219
+ event_time_end?: number;
9220
+ event_time_kind?: string;
9221
+ topics_user_managed?: boolean;
9222
+ topics?: string;
9223
+ topics_updated_at?: number;
9224
+ media?: string;
9225
+ topics_extracted_at?: number;
9226
+ topics_extracted_version?: number;
9227
+ superseded_by?: string;
9228
+ superseded_at?: number;
9229
+ last_observed_at?: number;
9230
+ fact_type?: string;
9231
+ archived_at?: number;
9232
+ trust_tier?: string;
9233
+ visibility?: string;
9234
+ twin_opt_in?: boolean;
9235
+ published_at?: number;
9236
+ geohash?: string;
9237
+ }
9238
+ /** A server snapshot. Pass its version back when writing; device timestamps are not a CAS token. */
9239
+ interface RemoteMemoryRecord {
9240
+ memory: RemoteMemoryRow;
9241
+ version: number;
9242
+ server_updated_at: string;
9243
+ score?: number;
9244
+ }
9245
+ interface RemoteMemoryReadFilters {
9246
+ include_archived?: boolean;
9247
+ include_quarantined?: boolean;
9248
+ include_superseded?: boolean;
9249
+ fact_types?: string[];
9250
+ }
9251
+ interface RemoteMemoryListOptions extends Omit<RemoteMemoryReadFilters, "fact_types"> {
9252
+ include_deleted?: boolean;
9253
+ include_embeddings?: boolean;
9254
+ cursor?: string;
9255
+ limit?: number;
9256
+ signal?: AbortSignal;
9257
+ }
9258
+ interface RemoteMemoryDecodeFailure {
9259
+ memory_id: string;
9260
+ version: number;
9261
+ error: Error;
9262
+ }
9263
+ interface RemoteMemoryPage {
9264
+ items: RemoteMemoryRecord[];
9265
+ failed: RemoteMemoryDecodeFailure[];
9266
+ next_cursor?: string;
9267
+ }
9268
+ interface RemoteMemoryCandidateOptions extends RemoteMemoryReadFilters {
9269
+ scopes?: string[];
9270
+ memory_ids?: string[];
9271
+ embedding_model?: string;
9272
+ strict_model?: boolean;
9273
+ include_deleted?: boolean;
9274
+ deleted_only?: boolean;
9275
+ limit?: number;
9276
+ force_ids?: string[];
9277
+ signal?: AbortSignal;
9278
+ }
9279
+ /**
9280
+ * The caller supplies the canonical account key's field encryption on the device.
9281
+ * These callbacks and authentication credentials never enter a request body.
9282
+ * The encryption format must be the SDK's enc:vN:<hex> field format.
9283
+ */
9284
+ interface RemoteMemoryPersistenceOptions {
9285
+ baseUrl: string;
9286
+ getToken: () => Promise<string | null>;
9287
+ keyId: string;
9288
+ encrypt: (plaintext: string) => Promise<string>;
9289
+ decrypt: (ciphertext: string) => Promise<string>;
9290
+ fetch?: typeof globalThis.fetch;
9291
+ /** Cancellation for the initial account/key check. Individual operations take their own signal. */
9292
+ signal?: AbortSignal;
9293
+ timeoutMs?: number;
9294
+ }
9295
+ /** HTTP failures remain distinguishable, particularly version_conflict and key_mismatch. */
9296
+ declare class RemoteMemoryError extends Error {
9297
+ readonly status: number;
9298
+ readonly code?: string | undefined;
9299
+ constructor(message: string, status: number, code?: string | undefined);
9300
+ }
9301
+ /**
9302
+ * Remote persistence foundation for MemoryStore, not yet its recall/retain implementation.
9303
+ * Nearby is authoritative: every read reaches it and writes use explicit server versions.
9304
+ * No local database or replica, import/activation, automatic conflict retry or rollback.
9305
+ * Migration must have activated the account under the canonical key before construction.
9306
+ */
9307
+ interface RemoteMemoryPersistence {
9308
+ get(memoryId: string, signal?: AbortSignal): Promise<RemoteMemoryRecord | null>;
9309
+ /** One stable memory-id page; follow next_cursor to enumerate. Embeddings are opt-in. */
9310
+ list(options?: RemoteMemoryListOptions): Promise<RemoteMemoryPage>;
9311
+ /** Whole-row write. Pass a returned snapshot to avoid GET; a number retains the read-before-write path. Version 0 creates. is_deleted writes a tombstone. */
9312
+ put(memory: RemoteMemoryRow, expectedVersion: number | RemoteMemoryRecord, signal?: AbortSignal): Promise<RemoteMemoryRecord>;
9313
+ /** 1–50 writes in one server transaction; never split or replay a batch. */
9314
+ putMany(writes: {
9315
+ memory: RemoteMemoryRow;
9316
+ expectedVersion: number | RemoteMemoryRecord;
9317
+ }[], signal?: AbortSignal): Promise<RemoteMemoryRecord[]>;
9318
+ /** Candidate window plus counts for distinguishing empty storage from unavailable vectors. */
9319
+ candidateSet(embedding: number[], options?: RemoteMemoryCandidateOptions): Promise<{
9320
+ items: RemoteMemoryRecord[];
9321
+ failed: RemoteMemoryDecodeFailure[];
9322
+ total_count: number;
9323
+ unavailable_count: number;
9324
+ }>;
9325
+ /** Nearby ranks ciphertext using a query vector and metadata; returned winners decrypt on-device. */
9326
+ candidates(embedding: number[], options?: RemoteMemoryCandidateOptions): Promise<{
9327
+ items: RemoteMemoryRecord[];
9328
+ failed: RemoteMemoryDecodeFailure[];
9329
+ }>;
9330
+ }
9331
+ /**
9332
+ * Connect to an already-active account. Encryption/key failures fail closed; a
9333
+ * failed write is never replayed automatically because its outcome may be unknown.
9334
+ * @public
9335
+ */
9336
+ declare function createRemoteMemoryPersistence(options: RemoteMemoryPersistenceOptions): Promise<RemoteMemoryPersistence>;
9337
+
9338
+ interface RemoteMemoryPipelineOptions {
9339
+ persistence: RemoteMemoryPersistence;
9340
+ embeddingOptions: EmbeddingOptions;
9341
+ /** Server-backed metadata lanes. These callbacks execute on the device. */
9342
+ graphRanking: RecallFactSource["graphRanking"];
9343
+ temporalRanking: RecallFactSource["temporalRanking"];
9344
+ }
9345
+ interface RemoteMemoryPipeline {
9346
+ recall(query: string, options?: MemoryRecallOptions): Promise<RecallResult>;
9347
+ retain(content: string, options?: MemoryRetainOptions): Promise<RetainResult>;
9348
+ }
9349
+ /**
9350
+ * Shared recall/retain on bounded server candidates; this is not a complete
9351
+ * MemoryStore or client cutover. Supply server-backed graph/temporal lanes:
9352
+ * there is deliberately no local-vault fallback. BM25 sees only admitted rows,
9353
+ * so a query-embedding outage fails rather than pretending to search the vault.
9354
+ * @public
9355
+ */
9356
+ declare function createRemoteMemoryPipeline(options: RemoteMemoryPipelineOptions): RemoteMemoryPipeline;
9357
+
9144
9358
  /** Bump when the ProfileDoc / section shape changes incompatibly. */
9145
9359
  declare const PROFILE_DOC_VERSION = 1;
9146
9360
  /** The facets a profile decomposes into (dating-app-style, per the People
@@ -10739,4 +10953,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
10739
10953
  */
10740
10954
  declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
10741
10955
 
10742
- 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 FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryUpdate, 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 NotionMcpCaller, 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 StreamSmoothingConfig, 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, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, 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, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, formatFileProcessingNotes, 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, isAttachedFilesText, 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, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
10956
+ 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 FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryUpdate, 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 NotionMcpCaller, 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 RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryPage, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, 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 StreamSmoothingConfig, 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, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, 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, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, formatFileProcessingNotes, 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, isAttachedFilesText, 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, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
@@ -1490,13 +1490,13 @@ interface EmbeddingOptions {
1490
1490
  */
1491
1491
  tokenTimeoutMs?: number;
1492
1492
  /**
1493
- * Overall deadline, in ms, for one `generateEmbedding` call — the token read,
1493
+ * Overall deadline, in ms, for one `generateEmbedding` or `generateEmbeddings` call — the token read,
1494
1494
  * every retry attempt and the backoff between them. Unset (the default) means
1495
1495
  * only the per-attempt deadlines apply, which is right for background/bulk
1496
1496
  * embeds. The recall query path sets it (see
1497
1497
  * `RecallOptions.queryEmbedTotalTimeoutMs`) so an outage degrades a turn to
1498
- * BM25 within a few seconds instead of ~4 x `timeoutMs`. Not applied by
1499
- * `generateEmbeddings`.
1498
+ * BM25 within a few seconds instead of ~4 x `timeoutMs`. Batch calls share
1499
+ * one budget across authentication, all chunks, retries and backoff.
1500
1500
  */
1501
1501
  totalTimeoutMs?: number;
1502
1502
  }
@@ -5742,6 +5742,55 @@ interface VaultSearchResult {
5742
5742
  * these to suppress the originating chunk in the chunk lane. */
5743
5743
  sourceChunkIds?: string[] | null;
5744
5744
  }
5745
+ /**
5746
+ * Search + rank in one call. Thin wrapper over {@link prepareVaultCandidates} +
5747
+ * {@link rankPreparedVaultCandidates}; behavior is unchanged.
5748
+ */
5749
+ declare function searchVaultMemoriesWithSize(query: string, vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): Promise<{
5750
+ results: VaultSearchResult[];
5751
+ vaultSize: number;
5752
+ reranked: boolean;
5753
+ /**
5754
+ * Wall-clock ms this search spent inside the cross-encoder.
5755
+ *
5756
+ * 0 on every path that did not reach the CE, which `reranked` already
5757
+ * distinguishes from "ran and cost nothing". Reported because `factLane`
5758
+ * timing alone could not separate the rerank from the query embed, the vault
5759
+ * read and the fused ranking — see {@link RerankStats}.
5760
+ */
5761
+ rerankMs: number;
5762
+ hadV2Head: boolean;
5763
+ /** True when this search had no usable cosine lane and ranked on BM25 alone. */
5764
+ embeddingsUnavailable: boolean;
5765
+ /**
5766
+ * True when this search actually scored rows against a real query vector.
5767
+ *
5768
+ * NOT the inverse of `embeddingsUnavailable`. That flag answers "did cosine
5769
+ * break?", and it is `false` on the degenerate returns below — an invalid
5770
+ * query, an empty scope, nothing decryptable — where cosine did not break so
5771
+ * much as never run. A caller asking "can this lane vouch that semantic
5772
+ * ranking happened?" (recall's chunk-lane reconciliation) must not read those
5773
+ * as a healthy cosine pass.
5774
+ */
5775
+ rankedOnCosine: boolean;
5776
+ /**
5777
+ * Which vault read path ran — projected key scan (`true`) or legacy whole-vault
5778
+ * load (`false`). See {@link PreparedVaultCandidates.decryptLast}.
5779
+ */
5780
+ decryptLast: boolean;
5781
+ /**
5782
+ * Rows this search paid to decrypt. Read against `vaultSize` — see
5783
+ * {@link PreparedVaultCandidates.rowsDecrypted}.
5784
+ */
5785
+ rowsDecrypted: number;
5786
+ /**
5787
+ * Wall-clock ms spent embedding the query, and rows the lane had to re-embed
5788
+ * because their stored vector was unusable — see
5789
+ * {@link PreparedVaultCandidates.queryEmbedMs} and `rowsEmbedded`.
5790
+ */
5791
+ queryEmbedMs: number;
5792
+ rowsEmbedded: number;
5793
+ }>;
5745
5794
  /**
5746
5795
  * Search vault memories by semantic similarity. Returns structured results
5747
5796
  * sorted by descending similarity, filtered by threshold and limit.
@@ -6006,7 +6055,15 @@ interface RecallOptions {
6006
6055
  */
6007
6056
  graphRefine?: boolean;
6008
6057
  }
6058
+ /** A fact source supplies bounded candidates; recall owns ranking and result handling. */
6059
+ interface RecallFactSource {
6060
+ search: (query: string, options?: MemoryVaultSearchOptions) => ReturnType<typeof searchVaultMemoriesWithSize>;
6061
+ graphRanking: (query: string, traverse: boolean, options: RecallOptions) => Promise<string[]>;
6062
+ temporalRanking: (query: string, now?: number) => Promise<string[]>;
6063
+ }
6009
6064
  interface RecallContext {
6065
+ /** Alternative to a WatermelonDB vault for fact-only recall. */
6066
+ factSource?: RecallFactSource;
6010
6067
  /** Required when `types` includes 'fact'. */
6011
6068
  vaultCtx?: VaultMemoryOperationsContext;
6012
6069
  /** Required when `types` includes 'chunk'. */
@@ -9141,6 +9198,163 @@ interface LocalMemoryStoreOptions {
9141
9198
  */
9142
9199
  declare function createLocalMemoryStore(options: LocalMemoryStoreOptions): MemoryStore;
9143
9200
 
9201
+ /** The nearby private-memory row. Content and kind_value are plaintext ONLY on the device. */
9202
+ interface RemoteMemoryRow {
9203
+ memory_id: string;
9204
+ content: string;
9205
+ scope: string;
9206
+ created_at: number;
9207
+ updated_at: number;
9208
+ is_deleted: boolean;
9209
+ embedding?: number[];
9210
+ embedding_model?: string;
9211
+ kind?: string;
9212
+ kind_value?: string;
9213
+ level?: string;
9214
+ folder_id?: string;
9215
+ source_chunk_ids?: string;
9216
+ proof_count?: number;
9217
+ source?: string;
9218
+ event_time_start?: number;
9219
+ event_time_end?: number;
9220
+ event_time_kind?: string;
9221
+ topics_user_managed?: boolean;
9222
+ topics?: string;
9223
+ topics_updated_at?: number;
9224
+ media?: string;
9225
+ topics_extracted_at?: number;
9226
+ topics_extracted_version?: number;
9227
+ superseded_by?: string;
9228
+ superseded_at?: number;
9229
+ last_observed_at?: number;
9230
+ fact_type?: string;
9231
+ archived_at?: number;
9232
+ trust_tier?: string;
9233
+ visibility?: string;
9234
+ twin_opt_in?: boolean;
9235
+ published_at?: number;
9236
+ geohash?: string;
9237
+ }
9238
+ /** A server snapshot. Pass its version back when writing; device timestamps are not a CAS token. */
9239
+ interface RemoteMemoryRecord {
9240
+ memory: RemoteMemoryRow;
9241
+ version: number;
9242
+ server_updated_at: string;
9243
+ score?: number;
9244
+ }
9245
+ interface RemoteMemoryReadFilters {
9246
+ include_archived?: boolean;
9247
+ include_quarantined?: boolean;
9248
+ include_superseded?: boolean;
9249
+ fact_types?: string[];
9250
+ }
9251
+ interface RemoteMemoryListOptions extends Omit<RemoteMemoryReadFilters, "fact_types"> {
9252
+ include_deleted?: boolean;
9253
+ include_embeddings?: boolean;
9254
+ cursor?: string;
9255
+ limit?: number;
9256
+ signal?: AbortSignal;
9257
+ }
9258
+ interface RemoteMemoryDecodeFailure {
9259
+ memory_id: string;
9260
+ version: number;
9261
+ error: Error;
9262
+ }
9263
+ interface RemoteMemoryPage {
9264
+ items: RemoteMemoryRecord[];
9265
+ failed: RemoteMemoryDecodeFailure[];
9266
+ next_cursor?: string;
9267
+ }
9268
+ interface RemoteMemoryCandidateOptions extends RemoteMemoryReadFilters {
9269
+ scopes?: string[];
9270
+ memory_ids?: string[];
9271
+ embedding_model?: string;
9272
+ strict_model?: boolean;
9273
+ include_deleted?: boolean;
9274
+ deleted_only?: boolean;
9275
+ limit?: number;
9276
+ force_ids?: string[];
9277
+ signal?: AbortSignal;
9278
+ }
9279
+ /**
9280
+ * The caller supplies the canonical account key's field encryption on the device.
9281
+ * These callbacks and authentication credentials never enter a request body.
9282
+ * The encryption format must be the SDK's enc:vN:<hex> field format.
9283
+ */
9284
+ interface RemoteMemoryPersistenceOptions {
9285
+ baseUrl: string;
9286
+ getToken: () => Promise<string | null>;
9287
+ keyId: string;
9288
+ encrypt: (plaintext: string) => Promise<string>;
9289
+ decrypt: (ciphertext: string) => Promise<string>;
9290
+ fetch?: typeof globalThis.fetch;
9291
+ /** Cancellation for the initial account/key check. Individual operations take their own signal. */
9292
+ signal?: AbortSignal;
9293
+ timeoutMs?: number;
9294
+ }
9295
+ /** HTTP failures remain distinguishable, particularly version_conflict and key_mismatch. */
9296
+ declare class RemoteMemoryError extends Error {
9297
+ readonly status: number;
9298
+ readonly code?: string | undefined;
9299
+ constructor(message: string, status: number, code?: string | undefined);
9300
+ }
9301
+ /**
9302
+ * Remote persistence foundation for MemoryStore, not yet its recall/retain implementation.
9303
+ * Nearby is authoritative: every read reaches it and writes use explicit server versions.
9304
+ * No local database or replica, import/activation, automatic conflict retry or rollback.
9305
+ * Migration must have activated the account under the canonical key before construction.
9306
+ */
9307
+ interface RemoteMemoryPersistence {
9308
+ get(memoryId: string, signal?: AbortSignal): Promise<RemoteMemoryRecord | null>;
9309
+ /** One stable memory-id page; follow next_cursor to enumerate. Embeddings are opt-in. */
9310
+ list(options?: RemoteMemoryListOptions): Promise<RemoteMemoryPage>;
9311
+ /** Whole-row write. Pass a returned snapshot to avoid GET; a number retains the read-before-write path. Version 0 creates. is_deleted writes a tombstone. */
9312
+ put(memory: RemoteMemoryRow, expectedVersion: number | RemoteMemoryRecord, signal?: AbortSignal): Promise<RemoteMemoryRecord>;
9313
+ /** 1–50 writes in one server transaction; never split or replay a batch. */
9314
+ putMany(writes: {
9315
+ memory: RemoteMemoryRow;
9316
+ expectedVersion: number | RemoteMemoryRecord;
9317
+ }[], signal?: AbortSignal): Promise<RemoteMemoryRecord[]>;
9318
+ /** Candidate window plus counts for distinguishing empty storage from unavailable vectors. */
9319
+ candidateSet(embedding: number[], options?: RemoteMemoryCandidateOptions): Promise<{
9320
+ items: RemoteMemoryRecord[];
9321
+ failed: RemoteMemoryDecodeFailure[];
9322
+ total_count: number;
9323
+ unavailable_count: number;
9324
+ }>;
9325
+ /** Nearby ranks ciphertext using a query vector and metadata; returned winners decrypt on-device. */
9326
+ candidates(embedding: number[], options?: RemoteMemoryCandidateOptions): Promise<{
9327
+ items: RemoteMemoryRecord[];
9328
+ failed: RemoteMemoryDecodeFailure[];
9329
+ }>;
9330
+ }
9331
+ /**
9332
+ * Connect to an already-active account. Encryption/key failures fail closed; a
9333
+ * failed write is never replayed automatically because its outcome may be unknown.
9334
+ * @public
9335
+ */
9336
+ declare function createRemoteMemoryPersistence(options: RemoteMemoryPersistenceOptions): Promise<RemoteMemoryPersistence>;
9337
+
9338
+ interface RemoteMemoryPipelineOptions {
9339
+ persistence: RemoteMemoryPersistence;
9340
+ embeddingOptions: EmbeddingOptions;
9341
+ /** Server-backed metadata lanes. These callbacks execute on the device. */
9342
+ graphRanking: RecallFactSource["graphRanking"];
9343
+ temporalRanking: RecallFactSource["temporalRanking"];
9344
+ }
9345
+ interface RemoteMemoryPipeline {
9346
+ recall(query: string, options?: MemoryRecallOptions): Promise<RecallResult>;
9347
+ retain(content: string, options?: MemoryRetainOptions): Promise<RetainResult>;
9348
+ }
9349
+ /**
9350
+ * Shared recall/retain on bounded server candidates; this is not a complete
9351
+ * MemoryStore or client cutover. Supply server-backed graph/temporal lanes:
9352
+ * there is deliberately no local-vault fallback. BM25 sees only admitted rows,
9353
+ * so a query-embedding outage fails rather than pretending to search the vault.
9354
+ * @public
9355
+ */
9356
+ declare function createRemoteMemoryPipeline(options: RemoteMemoryPipelineOptions): RemoteMemoryPipeline;
9357
+
9144
9358
  /** Bump when the ProfileDoc / section shape changes incompatibly. */
9145
9359
  declare const PROFILE_DOC_VERSION = 1;
9146
9360
  /** The facets a profile decomposes into (dating-app-style, per the People
@@ -10739,4 +10953,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
10739
10953
  */
10740
10954
  declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
10741
10955
 
10742
- 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 FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryUpdate, 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 NotionMcpCaller, 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 StreamSmoothingConfig, 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, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, 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, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, formatFileProcessingNotes, 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, isAttachedFilesText, 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, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
10956
+ 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 FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryUpdate, 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 NotionMcpCaller, 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 RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryPage, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, 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 StreamSmoothingConfig, 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, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, 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, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, formatFileProcessingNotes, 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, isAttachedFilesText, 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, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };