@anuma/sdk 3.1.2 → 3.2.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.
@@ -4470,6 +4470,8 @@ declare class VaultMemory extends Model {
4470
4470
  /** Extraction-logic version this memory was last stamped under. Null (pre-v38)
4471
4471
  * reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
4472
4472
  topicsExtractedVersion: number | null;
4473
+ /** C3 re-observation watermark: Unix ms of the last retain() merge, or null. */
4474
+ lastObservedAt: number | null;
4473
4475
  createdAt: Date;
4474
4476
  updatedAt: Date;
4475
4477
  isDeleted: boolean;
@@ -4587,6 +4589,11 @@ interface StoredVaultMemory {
4587
4589
  /** Extraction-logic version this memory was last stamped under. Null (pre-v38)
4588
4590
  * reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
4589
4591
  topicsExtractedVersion: number | null;
4592
+ /** C3 re-observation watermark: Unix ms of the last retain() merge into this
4593
+ * fact. Distinct from `updatedAt` (which merges preserve). Null = never
4594
+ * re-observed since the column was added; synthesis falls back to
4595
+ * `updatedAt` in that case. */
4596
+ lastObservedAt: number | null;
4590
4597
  createdAt: Date;
4591
4598
  updatedAt: Date;
4592
4599
  isDeleted: boolean;
@@ -4660,6 +4667,11 @@ interface UpdateVaultMemoryOptions {
4660
4667
  * without inflating recency on top.
4661
4668
  */
4662
4669
  preserveUpdatedAt?: boolean;
4670
+ /** C3: Unix ms to stamp as the re-observation watermark (`last_observed_at`).
4671
+ * Set by retain() merge/consolidate paths so a re-observation records "seen
4672
+ * again now" without touching `updated_at` (which `preserveUpdatedAt` keeps
4673
+ * pinned). Omit to leave the existing value untouched. */
4674
+ lastObservedAt?: number;
4663
4675
  /** If provided, sets whether the user has taken manual control of this
4664
4676
  * memory's topics. Set by {@link setMemoryEntitiesOp}. */
4665
4677
  topicsUserManaged?: boolean;
@@ -6170,6 +6182,129 @@ declare class RerankerUnavailableError extends Error {
6170
6182
  */
6171
6183
  declare function isRerankerAvailable(): boolean | undefined;
6172
6184
 
6185
+ /**
6186
+ * synthesizeProfile — client-side profile synthesis for People Nearby (C1).
6187
+ *
6188
+ * The vault is E2E-encrypted and device-authoritative; the server cannot read
6189
+ * it. So the shareable profile is synthesized ON-DEVICE here, in the SDK, from
6190
+ * the user's vault facts. The client then publishes the result (PII-redacted,
6191
+ * then server-side moderated in `nearby`) to the server-authoritative profile
6192
+ * store. The SDK stays STATELESS: no profile table, no persistence — the caller
6193
+ * owns storage and passes the prior doc back via `options.previous` for delta
6194
+ * refresh.
6195
+ *
6196
+ * Shape: the profile is decomposed into independent facets (bio, interests,
6197
+ * work/role, …). Each facet is one grounded `reflect()` pass over the vault, so
6198
+ * every section carries the `sourceMemoryIds` it was built from — enabling both
6199
+ * provenance and cheap delta refresh (only regenerate sections whose source
6200
+ * facts changed since the previous doc's `vaultWatermark`).
6201
+ *
6202
+ * Facet decomposition, per-facet synthesis, delta refresh, and the PII gate are
6203
+ * wired end-to-end. New facts are attributed to the facets they're relevant to
6204
+ * (by embedding similarity to each facet query) so an unrelated new fact doesn't
6205
+ * force a full re-synthesis — see {@link attributeFacts}.
6206
+ */
6207
+
6208
+ /** Bump when the ProfileDoc / section shape changes incompatibly. */
6209
+ declare const PROFILE_DOC_VERSION = 1;
6210
+ /** The facets a profile decomposes into (dating-app-style, per the People
6211
+ * Nearby plan). Configurable via {@link SynthesizeProfileOptions.facets}. */
6212
+ type ProfileFacetKey = "bio" | "interests" | "work_role" | "location_context" | "communication_style" | "recent_activity";
6213
+ /** One profile facet: how to recall its evidence and steer its synthesis. */
6214
+ interface ProfileFacet {
6215
+ key: ProfileFacetKey;
6216
+ /** Human-readable section label. */
6217
+ label: string;
6218
+ /** Recall query that pulls the vault facts relevant to this facet. */
6219
+ query: string;
6220
+ /** Facet-specific guidance appended to the synthesis system prompt. */
6221
+ guidance: string;
6222
+ }
6223
+ /** Default dating-app facet set. Order is display order. */
6224
+ declare const DEFAULT_PROFILE_FACETS: ProfileFacet[];
6225
+ /** A synthesized profile section, grounded in specific vault facts. */
6226
+ interface ProfileSection {
6227
+ key: ProfileFacetKey;
6228
+ label: string;
6229
+ /** Synthesized prose (PII-redacted when a redactor is supplied). Empty when
6230
+ * the vault has no evidence for this facet. */
6231
+ text: string;
6232
+ /** Vault memory ids this section was grounded on — provenance + delta refresh. */
6233
+ sourceMemoryIds: string[];
6234
+ /** Unix ms this section was generated. */
6235
+ generatedAt: number;
6236
+ /** True when regeneration failed and a prior section value was carried
6237
+ * forward (e.g. LLM returned empty) — the caller may choose to retry. */
6238
+ stale?: boolean;
6239
+ }
6240
+ /** Fingerprint of the config that produced a {@link ProfileDoc}. Delta reuse
6241
+ * (both the wholesale fast path and per-section reuse) is only valid when the
6242
+ * current call's config matches — otherwise reused sections could carry the
6243
+ * wrong scope's evidence, un-redacted text under a now-present redactor, or an
6244
+ * old section shape. */
6245
+ interface ProfileConfigFingerprint {
6246
+ /** Facet keys present in the doc, sorted. */
6247
+ facetKeys: ProfileFacetKey[];
6248
+ /** Order-independent digest of each facet's full definition (key + label +
6249
+ * query + guidance). Reuse must invalidate when a facet's PROMPT changes, not
6250
+ * just its key set — otherwise reused sections carry text generated under the
6251
+ * old definition. Facet display order does NOT invalidate (sections are
6252
+ * rebuilt in facet order and reused by key). */
6253
+ facetsSignature: string;
6254
+ /** Scopes the facts were drawn from, sorted. */
6255
+ scopes: string[];
6256
+ /** Whether a PII redactor gated the section text. Reusing un-gated text under
6257
+ * a now-present redactor would leak PII, so this flips the fingerprint. */
6258
+ redacted: boolean;
6259
+ }
6260
+ /** A synthesized profile. Server-authoritative once published; the client
6261
+ * caches it and passes it back as {@link SynthesizeProfileOptions.previous}. */
6262
+ interface ProfileDoc {
6263
+ /** {@link PROFILE_DOC_VERSION} at synthesis time. */
6264
+ version: number;
6265
+ /** One section per requested facet (in facet order). */
6266
+ sections: ProfileSection[];
6267
+ /** Max change-time across all vault facts (incl. deleted/superseded) at
6268
+ * synthesis time. Delta refresh regenerates only sections whose source facts
6269
+ * changed since a previous doc's watermark. */
6270
+ vaultWatermark: number;
6271
+ /** The config that produced this doc — see {@link ProfileConfigFingerprint}. */
6272
+ config: ProfileConfigFingerprint;
6273
+ /** Unix ms this doc was produced. */
6274
+ generatedAt: number;
6275
+ }
6276
+ /** Options for {@link synthesizeProfile}. Auth is the dual {@link PortalLlmAuth}
6277
+ * pattern — one of `apiKey` / `getToken` is required at runtime. */
6278
+ interface SynthesizeProfileOptions extends PortalLlmAuth {
6279
+ /** Facets to synthesize. Defaults to {@link DEFAULT_PROFILE_FACETS}. */
6280
+ facets?: ProfileFacet[];
6281
+ /** Prior doc for delta refresh. Unchanged sections are reused verbatim. */
6282
+ previous?: ProfileDoc;
6283
+ /** Synthesis model. Default: open-weights ling-2.6-flash. */
6284
+ llmModel?: string;
6285
+ /** LLM endpoint override. */
6286
+ baseUrl?: string;
6287
+ /** Scopes to draw facts from. Default: ["private"]. */
6288
+ scopes?: string[];
6289
+ /** Facts recalled per facet before synthesis. Default: 20. */
6290
+ limit?: number;
6291
+ /** Override fetch (tests). */
6292
+ fetchFn?: typeof fetch;
6293
+ /** Pre-publish PII gate. When supplied, each section's text is run through
6294
+ * {@link PiiRedactor.redactTextAsync} (regex + NER) before it's returned.
6295
+ * Omit only when the caller redacts downstream — `nearby` also moderates
6296
+ * server-side, but the client should never publish un-gated text. */
6297
+ redactor?: PiiRedactor;
6298
+ }
6299
+ /**
6300
+ * Synthesize a shareable {@link ProfileDoc} from the user's vault, on-device.
6301
+ *
6302
+ * Stateless: pass `options.previous` to reuse unchanged sections (delta refresh)
6303
+ * and the caller persists the result. On per-facet LLM failure the section
6304
+ * falls back to its prior value (marked `stale`) or an empty section.
6305
+ */
6306
+ declare function synthesizeProfile(ctx: RecallContext, options?: SynthesizeProfileOptions): Promise<ProfileDoc>;
6307
+
6173
6308
  /**
6174
6309
  * Standalone topic (entity) extraction for EXISTING memories.
6175
6310
  *
@@ -7012,8 +7147,12 @@ declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageR
7012
7147
  * logic version a memory was last stamped under. Bumping TOPICS_EXTRACTION_VERSION
7013
7148
  * (new prompt/model) makes the worker re-extract every row whose stored version
7014
7149
  * is behind, so topic-quality improvements propagate across the existing vault
7150
+ * - v39: Added last_observed_at column to memory_vault (C3) — a re-observation
7151
+ * watermark stamped each time retain() merges into an existing fact, kept
7152
+ * distinct from updated_at (which merges preserve). Lets profile synthesis
7153
+ * weight facts by recency of reinforcement rather than last edit.
7015
7154
  */
7016
- declare const SDK_SCHEMA_VERSION = 38;
7155
+ declare const SDK_SCHEMA_VERSION = 39;
7017
7156
  /**
7018
7157
  * Combined WatermelonDB schema for all SDK storage modules.
7019
7158
  *
@@ -7094,6 +7233,8 @@ declare const sdkSchema: Readonly<{
7094
7233
  * - v34 → v35: Added `conversation_memory` table (conversation ↔ recalled memory ids)
7095
7234
  * - v35 → v36: Added `topics_extracted_at` column to memory_vault (watermark for the background topic-extraction worker; null + existing links grandfathered as extracted)
7096
7235
  * - v36 → v37: Added `superseded_by` + `superseded_at` columns to memory_vault (write-time supersession; null = live, excluded from recall/dedup when set)
7236
+ * - v37 → v38: Added `topics_extracted_version` column to memory_vault (extraction-logic version; null read as 0 so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows)
7237
+ * - v38 → v39: Added `last_observed_at` column to memory_vault (C3 re-observation watermark; stamped on retain merge, distinct from updated_at)
7097
7238
  */
7098
7239
  declare const sdkMigrations: Readonly<{
7099
7240
  validated: true;
@@ -7615,4 +7756,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
7615
7756
  */
7616
7757
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
7617
7758
 
7618
- export { type AutoExtractMessage, type AutoExtractor, type Budget, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, 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_MIN_CHUNK_SIZE, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type Logger, LoggerProvider, type LoggerProviderProps, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageRedactionResult, type MessageSkeleton, NOTION_OAUTH_CONFIG, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, PII_PATTERNS, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PromptPreProcessor, type PromptPreProcessorContext, type QuantizedEmbedding, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, buildNotionAuthUrl, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, hasEncryptionKey, isPiiRedactor, isRerankerAvailable, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, preEmbedVaultMemories, quantizeEmbedding, queueManager, recall, reflect, refreshNotionAccessToken, registerNotionClient, requestEncryptionKey, resolvePiiRedactor, resumeStream, retain, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, setLogger, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, supersedeVaultMemoryOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, xhrTransport };
7759
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, 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_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type Logger, LoggerProvider, type LoggerProviderProps, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageRedactionResult, type MessageSkeleton, NOTION_OAUTH_CONFIG, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, PII_PATTERNS, PROFILE_DOC_VERSION, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type QuantizedEmbedding, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, buildNotionAuthUrl, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, hasEncryptionKey, isPiiRedactor, isRerankerAvailable, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, preEmbedVaultMemories, quantizeEmbedding, queueManager, recall, reflect, refreshNotionAccessToken, registerNotionClient, requestEncryptionKey, resolvePiiRedactor, resumeStream, retain, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, setLogger, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, supersedeVaultMemoryOp, synthesizeProfile, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, xhrTransport };
@@ -4470,6 +4470,8 @@ declare class VaultMemory extends Model {
4470
4470
  /** Extraction-logic version this memory was last stamped under. Null (pre-v38)
4471
4471
  * reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
4472
4472
  topicsExtractedVersion: number | null;
4473
+ /** C3 re-observation watermark: Unix ms of the last retain() merge, or null. */
4474
+ lastObservedAt: number | null;
4473
4475
  createdAt: Date;
4474
4476
  updatedAt: Date;
4475
4477
  isDeleted: boolean;
@@ -4587,6 +4589,11 @@ interface StoredVaultMemory {
4587
4589
  /** Extraction-logic version this memory was last stamped under. Null (pre-v38)
4588
4590
  * reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
4589
4591
  topicsExtractedVersion: number | null;
4592
+ /** C3 re-observation watermark: Unix ms of the last retain() merge into this
4593
+ * fact. Distinct from `updatedAt` (which merges preserve). Null = never
4594
+ * re-observed since the column was added; synthesis falls back to
4595
+ * `updatedAt` in that case. */
4596
+ lastObservedAt: number | null;
4590
4597
  createdAt: Date;
4591
4598
  updatedAt: Date;
4592
4599
  isDeleted: boolean;
@@ -4660,6 +4667,11 @@ interface UpdateVaultMemoryOptions {
4660
4667
  * without inflating recency on top.
4661
4668
  */
4662
4669
  preserveUpdatedAt?: boolean;
4670
+ /** C3: Unix ms to stamp as the re-observation watermark (`last_observed_at`).
4671
+ * Set by retain() merge/consolidate paths so a re-observation records "seen
4672
+ * again now" without touching `updated_at` (which `preserveUpdatedAt` keeps
4673
+ * pinned). Omit to leave the existing value untouched. */
4674
+ lastObservedAt?: number;
4663
4675
  /** If provided, sets whether the user has taken manual control of this
4664
4676
  * memory's topics. Set by {@link setMemoryEntitiesOp}. */
4665
4677
  topicsUserManaged?: boolean;
@@ -6170,6 +6182,129 @@ declare class RerankerUnavailableError extends Error {
6170
6182
  */
6171
6183
  declare function isRerankerAvailable(): boolean | undefined;
6172
6184
 
6185
+ /**
6186
+ * synthesizeProfile — client-side profile synthesis for People Nearby (C1).
6187
+ *
6188
+ * The vault is E2E-encrypted and device-authoritative; the server cannot read
6189
+ * it. So the shareable profile is synthesized ON-DEVICE here, in the SDK, from
6190
+ * the user's vault facts. The client then publishes the result (PII-redacted,
6191
+ * then server-side moderated in `nearby`) to the server-authoritative profile
6192
+ * store. The SDK stays STATELESS: no profile table, no persistence — the caller
6193
+ * owns storage and passes the prior doc back via `options.previous` for delta
6194
+ * refresh.
6195
+ *
6196
+ * Shape: the profile is decomposed into independent facets (bio, interests,
6197
+ * work/role, …). Each facet is one grounded `reflect()` pass over the vault, so
6198
+ * every section carries the `sourceMemoryIds` it was built from — enabling both
6199
+ * provenance and cheap delta refresh (only regenerate sections whose source
6200
+ * facts changed since the previous doc's `vaultWatermark`).
6201
+ *
6202
+ * Facet decomposition, per-facet synthesis, delta refresh, and the PII gate are
6203
+ * wired end-to-end. New facts are attributed to the facets they're relevant to
6204
+ * (by embedding similarity to each facet query) so an unrelated new fact doesn't
6205
+ * force a full re-synthesis — see {@link attributeFacts}.
6206
+ */
6207
+
6208
+ /** Bump when the ProfileDoc / section shape changes incompatibly. */
6209
+ declare const PROFILE_DOC_VERSION = 1;
6210
+ /** The facets a profile decomposes into (dating-app-style, per the People
6211
+ * Nearby plan). Configurable via {@link SynthesizeProfileOptions.facets}. */
6212
+ type ProfileFacetKey = "bio" | "interests" | "work_role" | "location_context" | "communication_style" | "recent_activity";
6213
+ /** One profile facet: how to recall its evidence and steer its synthesis. */
6214
+ interface ProfileFacet {
6215
+ key: ProfileFacetKey;
6216
+ /** Human-readable section label. */
6217
+ label: string;
6218
+ /** Recall query that pulls the vault facts relevant to this facet. */
6219
+ query: string;
6220
+ /** Facet-specific guidance appended to the synthesis system prompt. */
6221
+ guidance: string;
6222
+ }
6223
+ /** Default dating-app facet set. Order is display order. */
6224
+ declare const DEFAULT_PROFILE_FACETS: ProfileFacet[];
6225
+ /** A synthesized profile section, grounded in specific vault facts. */
6226
+ interface ProfileSection {
6227
+ key: ProfileFacetKey;
6228
+ label: string;
6229
+ /** Synthesized prose (PII-redacted when a redactor is supplied). Empty when
6230
+ * the vault has no evidence for this facet. */
6231
+ text: string;
6232
+ /** Vault memory ids this section was grounded on — provenance + delta refresh. */
6233
+ sourceMemoryIds: string[];
6234
+ /** Unix ms this section was generated. */
6235
+ generatedAt: number;
6236
+ /** True when regeneration failed and a prior section value was carried
6237
+ * forward (e.g. LLM returned empty) — the caller may choose to retry. */
6238
+ stale?: boolean;
6239
+ }
6240
+ /** Fingerprint of the config that produced a {@link ProfileDoc}. Delta reuse
6241
+ * (both the wholesale fast path and per-section reuse) is only valid when the
6242
+ * current call's config matches — otherwise reused sections could carry the
6243
+ * wrong scope's evidence, un-redacted text under a now-present redactor, or an
6244
+ * old section shape. */
6245
+ interface ProfileConfigFingerprint {
6246
+ /** Facet keys present in the doc, sorted. */
6247
+ facetKeys: ProfileFacetKey[];
6248
+ /** Order-independent digest of each facet's full definition (key + label +
6249
+ * query + guidance). Reuse must invalidate when a facet's PROMPT changes, not
6250
+ * just its key set — otherwise reused sections carry text generated under the
6251
+ * old definition. Facet display order does NOT invalidate (sections are
6252
+ * rebuilt in facet order and reused by key). */
6253
+ facetsSignature: string;
6254
+ /** Scopes the facts were drawn from, sorted. */
6255
+ scopes: string[];
6256
+ /** Whether a PII redactor gated the section text. Reusing un-gated text under
6257
+ * a now-present redactor would leak PII, so this flips the fingerprint. */
6258
+ redacted: boolean;
6259
+ }
6260
+ /** A synthesized profile. Server-authoritative once published; the client
6261
+ * caches it and passes it back as {@link SynthesizeProfileOptions.previous}. */
6262
+ interface ProfileDoc {
6263
+ /** {@link PROFILE_DOC_VERSION} at synthesis time. */
6264
+ version: number;
6265
+ /** One section per requested facet (in facet order). */
6266
+ sections: ProfileSection[];
6267
+ /** Max change-time across all vault facts (incl. deleted/superseded) at
6268
+ * synthesis time. Delta refresh regenerates only sections whose source facts
6269
+ * changed since a previous doc's watermark. */
6270
+ vaultWatermark: number;
6271
+ /** The config that produced this doc — see {@link ProfileConfigFingerprint}. */
6272
+ config: ProfileConfigFingerprint;
6273
+ /** Unix ms this doc was produced. */
6274
+ generatedAt: number;
6275
+ }
6276
+ /** Options for {@link synthesizeProfile}. Auth is the dual {@link PortalLlmAuth}
6277
+ * pattern — one of `apiKey` / `getToken` is required at runtime. */
6278
+ interface SynthesizeProfileOptions extends PortalLlmAuth {
6279
+ /** Facets to synthesize. Defaults to {@link DEFAULT_PROFILE_FACETS}. */
6280
+ facets?: ProfileFacet[];
6281
+ /** Prior doc for delta refresh. Unchanged sections are reused verbatim. */
6282
+ previous?: ProfileDoc;
6283
+ /** Synthesis model. Default: open-weights ling-2.6-flash. */
6284
+ llmModel?: string;
6285
+ /** LLM endpoint override. */
6286
+ baseUrl?: string;
6287
+ /** Scopes to draw facts from. Default: ["private"]. */
6288
+ scopes?: string[];
6289
+ /** Facts recalled per facet before synthesis. Default: 20. */
6290
+ limit?: number;
6291
+ /** Override fetch (tests). */
6292
+ fetchFn?: typeof fetch;
6293
+ /** Pre-publish PII gate. When supplied, each section's text is run through
6294
+ * {@link PiiRedactor.redactTextAsync} (regex + NER) before it's returned.
6295
+ * Omit only when the caller redacts downstream — `nearby` also moderates
6296
+ * server-side, but the client should never publish un-gated text. */
6297
+ redactor?: PiiRedactor;
6298
+ }
6299
+ /**
6300
+ * Synthesize a shareable {@link ProfileDoc} from the user's vault, on-device.
6301
+ *
6302
+ * Stateless: pass `options.previous` to reuse unchanged sections (delta refresh)
6303
+ * and the caller persists the result. On per-facet LLM failure the section
6304
+ * falls back to its prior value (marked `stale`) or an empty section.
6305
+ */
6306
+ declare function synthesizeProfile(ctx: RecallContext, options?: SynthesizeProfileOptions): Promise<ProfileDoc>;
6307
+
6173
6308
  /**
6174
6309
  * Standalone topic (entity) extraction for EXISTING memories.
6175
6310
  *
@@ -7012,8 +7147,12 @@ declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageR
7012
7147
  * logic version a memory was last stamped under. Bumping TOPICS_EXTRACTION_VERSION
7013
7148
  * (new prompt/model) makes the worker re-extract every row whose stored version
7014
7149
  * is behind, so topic-quality improvements propagate across the existing vault
7150
+ * - v39: Added last_observed_at column to memory_vault (C3) — a re-observation
7151
+ * watermark stamped each time retain() merges into an existing fact, kept
7152
+ * distinct from updated_at (which merges preserve). Lets profile synthesis
7153
+ * weight facts by recency of reinforcement rather than last edit.
7015
7154
  */
7016
- declare const SDK_SCHEMA_VERSION = 38;
7155
+ declare const SDK_SCHEMA_VERSION = 39;
7017
7156
  /**
7018
7157
  * Combined WatermelonDB schema for all SDK storage modules.
7019
7158
  *
@@ -7094,6 +7233,8 @@ declare const sdkSchema: Readonly<{
7094
7233
  * - v34 → v35: Added `conversation_memory` table (conversation ↔ recalled memory ids)
7095
7234
  * - v35 → v36: Added `topics_extracted_at` column to memory_vault (watermark for the background topic-extraction worker; null + existing links grandfathered as extracted)
7096
7235
  * - v36 → v37: Added `superseded_by` + `superseded_at` columns to memory_vault (write-time supersession; null = live, excluded from recall/dedup when set)
7236
+ * - v37 → v38: Added `topics_extracted_version` column to memory_vault (extraction-logic version; null read as 0 so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows)
7237
+ * - v38 → v39: Added `last_observed_at` column to memory_vault (C3 re-observation watermark; stamped on retain merge, distinct from updated_at)
7097
7238
  */
7098
7239
  declare const sdkMigrations: Readonly<{
7099
7240
  validated: true;
@@ -7615,4 +7756,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
7615
7756
  */
7616
7757
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
7617
7758
 
7618
- export { type AutoExtractMessage, type AutoExtractor, type Budget, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, 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_MIN_CHUNK_SIZE, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type Logger, LoggerProvider, type LoggerProviderProps, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageRedactionResult, type MessageSkeleton, NOTION_OAUTH_CONFIG, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, PII_PATTERNS, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PromptPreProcessor, type PromptPreProcessorContext, type QuantizedEmbedding, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, buildNotionAuthUrl, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, hasEncryptionKey, isPiiRedactor, isRerankerAvailable, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, preEmbedVaultMemories, quantizeEmbedding, queueManager, recall, reflect, refreshNotionAccessToken, registerNotionClient, requestEncryptionKey, resolvePiiRedactor, resumeStream, retain, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, setLogger, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, supersedeVaultMemoryOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, xhrTransport };
7759
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, 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_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type Logger, LoggerProvider, type LoggerProviderProps, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageRedactionResult, type MessageSkeleton, NOTION_OAUTH_CONFIG, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, PII_PATTERNS, PROFILE_DOC_VERSION, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type QuantizedEmbedding, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, 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, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, buildNotionAuthUrl, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, hasEncryptionKey, isPiiRedactor, isRerankerAvailable, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, preEmbedVaultMemories, quantizeEmbedding, queueManager, recall, reflect, refreshNotionAccessToken, registerNotionClient, requestEncryptionKey, resolvePiiRedactor, resumeStream, retain, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, setLogger, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, supersedeVaultMemoryOp, synthesizeProfile, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, xhrTransport };