@anuma/sdk 2.7.0 → 3.1.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.
@@ -1308,8 +1308,13 @@ interface EmbeddingOptions {
1308
1308
  * are looked up in this map before calling the API, and new embeddings
1309
1309
  * are stored after generation. Useful when the same texts are embedded
1310
1310
  * repeatedly (e.g., across eval iterations or re-indexing runs).
1311
+ *
1312
+ * Values are stored as `Float32Array` (the embedding model's native
1313
+ * precision) rather than a float64 `number[]`, halving the resident RAM of
1314
+ * the cache with no precision loss. `generateEmbedding(s)` still return
1315
+ * `number[]` at the API boundary, so callers are unaffected.
1311
1316
  */
1312
- cache?: Map<string, number[]>;
1317
+ cache?: Map<string, Float32Array>;
1313
1318
  /** Called after each embedding API call with the token usage from the response. */
1314
1319
  onUsage?: (usage: {
1315
1320
  promptTokens: number;
@@ -2781,6 +2786,13 @@ type SendMessageArgs = BaseSendMessageArgs & {
2781
2786
  * This is typically extracted text from preprocessed file attachments.
2782
2787
  */
2783
2788
  fileContext?: string;
2789
+ /**
2790
+ * Tool-set guidance to inject as a system message — the persona/usage prompt
2791
+ * for whichever tool sets activated this turn (e.g. the app-builder prompt).
2792
+ * Additive: composes with the other context messages, never replaces them.
2793
+ * Mirrors react's useChat toolGuidance channel.
2794
+ */
2795
+ toolGuidance?: string;
2784
2796
  /**
2785
2797
  * Override the API type for this request only.
2786
2798
  * Useful when different models need different APIs.
@@ -3125,6 +3137,33 @@ interface CachedServerTools {
3125
3137
  /** Checksum from the server for cache invalidation */
3126
3138
  checksum?: string;
3127
3139
  }
3140
+ /**
3141
+ * Pluggable persistence for the fetched server-tools list.
3142
+ *
3143
+ * The default backend ({@link localStorageToolsCache}) writes to browser
3144
+ * `localStorage` and is a silent no-op where `localStorage` is undefined
3145
+ * (Node, React Native). Pass a custom backend to `getServerTools` to cache
3146
+ * somewhere that survives on those platforms — e.g. an AsyncStorage/MMKV
3147
+ * adapter on RN, or an in-memory `Map` on a server. Methods may be sync or
3148
+ * async; `getServerTools` awaits them either way.
3149
+ *
3150
+ * The stored payload carries a `version`; `getServerTools` discards any entry
3151
+ * whose version does not match the current cache format, so a stale custom
3152
+ * backend can never feed an incompatible shape back into selection.
3153
+ */
3154
+ interface ToolsCacheBackend {
3155
+ /** Return the cached payload, or null when absent/unreadable. */
3156
+ get(): CachedServerTools | null | Promise<CachedServerTools | null>;
3157
+ /** Persist the payload. Implementations should swallow write failures. */
3158
+ set(value: CachedServerTools): void | Promise<void>;
3159
+ /**
3160
+ * Remove the cached payload. Optional — a read/write-only backend may omit it,
3161
+ * in which case `clearServerToolsCache` (and the version-mismatch
3162
+ * invalidation) is a no-op for that backend. The default
3163
+ * {@link localStorageToolsCache} implements it.
3164
+ */
3165
+ clear?(): void | Promise<void>;
3166
+ }
3128
3167
  /**
3129
3168
  * Options for fetching server tools
3130
3169
  */
@@ -3139,6 +3178,12 @@ interface ServerToolsOptions {
3139
3178
  getToken?: () => Promise<string | null>;
3140
3179
  /** Direct API key for server-side usage (uses X-API-Key header) */
3141
3180
  apiKey?: string;
3181
+ /**
3182
+ * Where to read/write the cached tools list. Defaults to
3183
+ * {@link localStorageToolsCache} (browser `localStorage`; no-op elsewhere).
3184
+ * Provide a backend to enable caching on Node / React Native.
3185
+ */
3186
+ cache?: ToolsCacheBackend;
3142
3187
  }
3143
3188
  /** Default cache expiration: 1 day */
3144
3189
  declare const DEFAULT_CACHE_EXPIRATION_MS: number;
@@ -3147,14 +3192,18 @@ declare const DEFAULT_CACHE_EXPIRATION_MS: number;
3147
3192
  */
3148
3193
  declare function getCachedServerTools(): CachedServerTools | null;
3149
3194
  /**
3150
- * Clear the server tools cache
3195
+ * Clear the cached server tools. Defaults to the browser-`localStorage` backend;
3196
+ * pass the SAME {@link ToolsCacheBackend} you gave `getServerTools` to invalidate
3197
+ * a custom backend (a no-op when that backend defines no `clear`). Returns the
3198
+ * backend's clear result, which may be async.
3151
3199
  */
3152
3200
  declare function clearServerToolsCache(): void;
3201
+ declare function clearServerToolsCache(cache: ToolsCacheBackend): void | Promise<void>;
3153
3202
  /**
3154
3203
  * Get server tools with caching support.
3155
3204
  *
3156
3205
  * Flow:
3157
- * 1. Check localStorage cache
3206
+ * 1. Check the cache backend (localStorage by default; override via `cache`)
3158
3207
  * 2. If cache valid and not force refresh, return cached tools
3159
3208
  * 3. Otherwise, fetch from API, cache, and return
3160
3209
  * 4. On fetch failure, return cached tools if available (stale-while-error)
@@ -3174,6 +3223,52 @@ interface DeferLoadingConfig {
3174
3223
  /** Server-tool names to keep non-deferred (besides the tool-search tool), in priority order. */
3175
3224
  hotToolNames: readonly string[];
3176
3225
  }
3226
+ /**
3227
+ * A tool set defines a group of tools that work together. When any "anchor"
3228
+ * tool in the set is matched semantically (with a score at or above
3229
+ * `anchorMinSimilarity`), the set is activated and all of its members are
3230
+ * pulled into the selection.
3231
+ *
3232
+ * Two activation strategies consume this interface:
3233
+ * - `expandToolSetsAdditive` (used by `useChatStorage` and
3234
+ * `createServerToolsFilter`) keeps all original matches and adds the
3235
+ * set's members on top — non-set tools are never dropped.
3236
+ * - `applyToolSets` is exclusive: it keeps only set members plus non-set
3237
+ * tools that scored above `independentThreshold`.
3238
+ *
3239
+ * Pick `expandToolSetsAdditive` when you want recall over precision
3240
+ * (typical), and `applyToolSets` when you specifically want non-set
3241
+ * matches stripped on activation.
3242
+ */
3243
+ interface ToolSet {
3244
+ /** Human-readable name for logging/debugging */
3245
+ name: string;
3246
+ /** All tool names in the set */
3247
+ members: string[];
3248
+ /**
3249
+ * Tools that trigger the set when selected. If any anchor appears in the
3250
+ * semantic match results with a score at or above `anchorMinSimilarity`,
3251
+ * all members are pulled in.
3252
+ */
3253
+ anchors: string[];
3254
+ /**
3255
+ * Minimum similarity an anchor must reach to activate the set.
3256
+ * Prevents false activation on prompts where the anchor barely passes
3257
+ * the global minSimilarity threshold. Default: 0.60
3258
+ */
3259
+ anchorMinSimilarity?: number;
3260
+ /**
3261
+ * System-prompt fragment to APPEND to the base prompt when this set
3262
+ * activates. Additive, never a replacement — it composes with the host's
3263
+ * persona / memory. Gated on genuine activation (anchor score ≥
3264
+ * `anchorMinSimilarity`, or a forced set) via {@link activatedToolSetNames} →
3265
+ * {@link toolSetSystemPrompts}, NOT on mere anchor presence — a borderline
3266
+ * anchor kept by recall-over-precision must not drag this persona in. Write
3267
+ * it to be self-limiting too (condition its behavior on the user actually
3268
+ * wanting what the set does), so a borderline activation doesn't bias the turn.
3269
+ */
3270
+ systemPrompt?: string;
3271
+ }
3177
3272
 
3178
3273
  /**
3179
3274
  * Function type for dynamic server tools filtering based on prompt embeddings.
@@ -3284,6 +3379,32 @@ interface GetMessagesPageOptions {
3284
3379
  */
3285
3380
  limit: number;
3286
3381
  }
3382
+ /** Options for keyset-paginated conversation-list reads ({@link getConversationsPageOp}). */
3383
+ interface GetConversationsPageOptions {
3384
+ /**
3385
+ * Upper-bound `created_at` cursor (epoch ms). Without
3386
+ * `boundaryExcludeUniqueIds` it is EXCLUSIVE: only conversations with
3387
+ * `createdAt < before` are returned. Omit to fetch the newest page.
3388
+ */
3389
+ before?: number;
3390
+ /**
3391
+ * uniqueIds of the rows the caller already holds AT the `before` boundary.
3392
+ * `created_at` is NOT unique (a bulk restore/import writes many rows with the
3393
+ * same timestamp) — with an exclusive cursor, an unseen row sharing the
3394
+ * boundary timestamp would be silently skipped by every page. When provided,
3395
+ * the boundary timestamp is fetched INCLUSIVELY and these known rows are
3396
+ * filtered out, so a boundary-timestamp row is returned exactly once. Mirrors
3397
+ * {@link GetMessagesPageOptions.boundaryExcludeUniqueIds}.
3398
+ */
3399
+ boundaryExcludeUniqueIds?: string[];
3400
+ /**
3401
+ * Maximum rows to return — the NEWEST `limit` rows of the matching range.
3402
+ * Defaults to 200. A non-positive or non-finite value yields an EMPTY page
3403
+ * (never an unbounded read — SQLite treats `LIMIT -1` as "no limit");
3404
+ * fractional values are floored.
3405
+ */
3406
+ limit?: number;
3407
+ }
3287
3408
  /**
3288
3409
  * Lightweight, mostly-undecrypted projection of a message row. Contains just
3289
3410
  * enough for consumers to build the conversation's branch tree (parent/child
@@ -3510,6 +3631,13 @@ interface BaseUseChatStorageOptions {
3510
3631
  * {@link DeferLoadingConfig}.
3511
3632
  */
3512
3633
  deferLoading?: DeferLoadingConfig;
3634
+ /**
3635
+ * Where to read/write the cached server-tools catalog. Defaults to browser
3636
+ * `localStorage`, which is a silent no-op on React Native — so on RN pass an
3637
+ * AsyncStorage/MMKV-backed {@link ToolsCacheBackend} here or every send
3638
+ * refetches the whole catalog. Forwarded to `getServerTools`.
3639
+ */
3640
+ cache?: ToolsCacheBackend;
3513
3641
  };
3514
3642
  /**
3515
3643
  * Automatically generate embeddings for messages after saving.
@@ -4220,6 +4348,20 @@ interface StorageOperationsContext {
4220
4348
  * for `decryptField` is exactly zero.
4221
4349
  */
4222
4350
  declare function getConversationsLazyOp(ctx: StorageOperationsContext): Promise<LazyStoredConversation[]>;
4351
+ /**
4352
+ * Keyset-paginated, lazy (no-decrypt) variant of {@link getConversationsLazyOp}.
4353
+ *
4354
+ * Returns at most `limit` conversations (newest first by `created_at`), each
4355
+ * with its raw stored title under `encryptedTitle` — pair with
4356
+ * {@link decryptConversationTitle} to decrypt on render. Page through older
4357
+ * threads by passing the oldest loaded `createdAt` as `before` plus the
4358
+ * uniqueIds held at that boundary as `boundaryExcludeUniqueIds`.
4359
+ *
4360
+ * Decrypts nothing and builds no WatermelonDB Model (the never-evicted
4361
+ * RecordCache stays empty — web Pile-2). Sort order, soft-delete filtering,
4362
+ * and the encrypted-title projection all match `getConversationsLazyOp`.
4363
+ */
4364
+ declare function getConversationsPageOp(ctx: StorageOperationsContext, options?: GetConversationsPageOptions): Promise<LazyStoredConversation[]>;
4223
4365
  /**
4224
4366
  * Lazy variant of {@link getConversationsByProjectOp}.
4225
4367
  *
@@ -5847,14 +5989,14 @@ declare function createChunkVectorCache(maxSize?: number): ChunkVectorCache;
5847
5989
  declare function recall(query: string, ctx: RecallContext, options?: RecallOptions): Promise<RecallResult>;
5848
5990
 
5849
5991
  /**
5850
- * Unified Recall Tool
5992
+ * Recall tool constants — deliberately dependency-free.
5851
5993
  *
5852
- * Single chat-completion tool that searches both vault facts and
5853
- * conversation chunks via `recall()`. Replaces the legacy pair of
5854
- * `memory_vault_search` (facts) + `search_memory` (chunks) — the LLM no
5855
- * longer has to route between two tools.
5994
+ * Split out of `recallTool.ts` so the tool NAME can be referenced from
5995
+ * node/React-Native-safe modules (e.g. the client-tool selector in
5996
+ * `../tools/clientToolSelection`) without dragging `recall()` and its
5997
+ * WatermelonDB-backed operations into the module graph. `recallTool.ts`
5998
+ * re-exports these to preserve their public identity.
5856
5999
  */
5857
-
5858
6000
  /** Tool name surfaced to the LLM. Exported so bench harnesses and chat
5859
6001
  * clients reference the same string — drift between prod and bench would
5860
6002
  * mask tool-routing bugs in eval. */
@@ -5862,6 +6004,16 @@ declare const RECALL_TOOL_NAME = "recall_memory";
5862
6004
  /** Maximum results the executor will return to the LLM, regardless of
5863
6005
  * the LLM-supplied `limit`. */
5864
6006
  declare const RECALL_MAX_LIMIT = 50;
6007
+
6008
+ /**
6009
+ * Unified Recall Tool
6010
+ *
6011
+ * Single chat-completion tool that searches both vault facts and
6012
+ * conversation chunks via `recall()`. Replaces the legacy pair of
6013
+ * `memory_vault_search` (facts) + `search_memory` (chunks) — the LLM no
6014
+ * longer has to route between two tools.
6015
+ */
6016
+
5865
6017
  interface RecallToolOptions {
5866
6018
  /** Lanes to search. Default: ["fact", "chunk"]. */
5867
6019
  types?: MemoryKind[];
@@ -6165,11 +6317,26 @@ declare function chunkText(text: string, options?: ChunkingOptions): TextChunk[]
6165
6317
  declare function shouldChunkMessage(content: string, chunkSize?: number): boolean;
6166
6318
 
6167
6319
  /**
6168
- * Memory Retrieval Embeddings
6320
+ * Embedding generation — dependency-free core.
6169
6321
  *
6170
- * Functions for generating and storing embeddings for conversation messages.
6322
+ * The raw "text → embedding" calls, split out of `embeddings.ts` so they can be
6323
+ * imported by node/React-Native-safe modules (the server-tool + client-tool
6324
+ * selection engine in `../tools`) WITHOUT pulling in the WatermelonDB-backed
6325
+ * `db/chat/operations` that `embeddings.ts` needs for its message-persistence
6326
+ * helpers (`embedMessage`, `embedAllMessages`, `chunkAndEmbed*`).
6327
+ *
6328
+ * Nothing here touches the database; the only I/O is the HTTP embeddings
6329
+ * endpoint. `embeddings.ts` re-exports these so existing importers of
6330
+ * `../memoryEngine/embeddings` (and the `../memoryEngine` barrel) keep working.
6171
6331
  */
6172
6332
 
6333
+ /**
6334
+ * Generate an embedding for text using the API
6335
+ *
6336
+ * Supports two auth methods:
6337
+ * - `apiKey`: Uses X-API-Key header (for server-side/CLI usage)
6338
+ * - `getToken`: Uses Authorization: Bearer header (for Privy identity tokens)
6339
+ */
6173
6340
  declare function generateEmbedding(text: string, options: EmbeddingOptions): Promise<number[]>;
6174
6341
  /**
6175
6342
  * Generate embeddings for multiple texts, automatically chunking large inputs.
@@ -6184,6 +6351,18 @@ declare function generateEmbedding(text: string, options: EmbeddingOptions): Pro
6184
6351
  * @returns Array of embeddings in the same order as input texts
6185
6352
  */
6186
6353
  declare function generateEmbeddings(texts: string[], options: EmbeddingOptions): Promise<number[][]>;
6354
+
6355
+ /**
6356
+ * Memory Retrieval Embeddings
6357
+ *
6358
+ * Message-level embedding + persistence helpers: find messages via the
6359
+ * WatermelonDB-backed `db/chat/operations`, embed their content, and store the
6360
+ * vectors/chunks back. The raw "text → embedding" calls live in `./generate`
6361
+ * (dependency-free so the tool-selection engine can import them without the DB
6362
+ * layer) and are re-exported here so existing importers of
6363
+ * `../memoryEngine/embeddings` and the `../memoryEngine` barrel keep working.
6364
+ */
6365
+
6187
6366
  /**
6188
6367
  * Embed a single message and store the embedding in the database
6189
6368
  *
@@ -6478,6 +6657,31 @@ interface UseChatStorageOptions extends BaseUseChatStorageOptions {
6478
6657
  * Auto-flush queued operations when key becomes available. @default true
6479
6658
  */
6480
6659
  autoFlushOnKeyAvailable?: boolean;
6660
+ /**
6661
+ * Additional tool sets to apply on top of the built-in ones (app-generation,
6662
+ * slides, github). When any anchor tool in a custom set is selected by
6663
+ * semantic matching, all members of that set are included automatically.
6664
+ *
6665
+ * Treated as static config — set once at hook setup. Changing it across
6666
+ * renders does not affect in-flight `sendMessage` calls; use
6667
+ * `activeToolSets` for dynamic, conversation-state-driven overrides.
6668
+ */
6669
+ extraToolSets?: ToolSet[];
6670
+ /**
6671
+ * Tool set names that should expand unconditionally for this request,
6672
+ * bypassing the anchor-similarity check. Use when conversation state
6673
+ * implies a set should be present regardless of how the prompt is phrased
6674
+ * — e.g., pass `["documents"]` when the conversation already contains a
6675
+ * generated document, so short follow-up prompts ("make the background red")
6676
+ * still get the full document toolkit.
6677
+ *
6678
+ * Read via a ref so updates are visible to in-flight `sendMessage` calls
6679
+ * without rebuilding the callback.
6680
+ *
6681
+ * Names must match a set's `name` from `BUILT_IN_TOOL_SETS` or
6682
+ * `extraToolSets`. Unknown names are ignored.
6683
+ */
6684
+ activeToolSets?: string[];
6481
6685
  /**
6482
6686
  * Opt into resumable streaming. When `true`, `sendMessage` sends the
6483
6687
  * resumable capability header, a stable `assistantUniqueId` is allocated for
@@ -6513,6 +6717,16 @@ interface UseChatStorageOptions extends BaseUseChatStorageOptions {
6513
6717
  model?: string;
6514
6718
  round?: number;
6515
6719
  }) => void;
6720
+ /**
6721
+ * Observability hook fired once per send with the tools actually selected for
6722
+ * the turn (after server + client filtering). Never throws into the send path.
6723
+ * Mirrors react's onToolSelection.
6724
+ */
6725
+ onToolSelection?: (info: {
6726
+ prompt: string;
6727
+ clientToolNames: string[];
6728
+ serverToolNames: string[];
6729
+ }) => void;
6516
6730
  }
6517
6731
  /**
6518
6732
  * Arguments for sendMessage with storage (Expo version)
@@ -7401,4 +7615,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
7401
7615
  */
7402
7616
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
7403
7617
 
7404
- 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 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, 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 };
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 };