@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.
@@ -2741,6 +2741,33 @@ interface CachedServerTools {
2741
2741
  /** Checksum from the server for cache invalidation */
2742
2742
  checksum?: string;
2743
2743
  }
2744
+ /**
2745
+ * Pluggable persistence for the fetched server-tools list.
2746
+ *
2747
+ * The default backend ({@link localStorageToolsCache}) writes to browser
2748
+ * `localStorage` and is a silent no-op where `localStorage` is undefined
2749
+ * (Node, React Native). Pass a custom backend to `getServerTools` to cache
2750
+ * somewhere that survives on those platforms — e.g. an AsyncStorage/MMKV
2751
+ * adapter on RN, or an in-memory `Map` on a server. Methods may be sync or
2752
+ * async; `getServerTools` awaits them either way.
2753
+ *
2754
+ * The stored payload carries a `version`; `getServerTools` discards any entry
2755
+ * whose version does not match the current cache format, so a stale custom
2756
+ * backend can never feed an incompatible shape back into selection.
2757
+ */
2758
+ interface ToolsCacheBackend {
2759
+ /** Return the cached payload, or null when absent/unreadable. */
2760
+ get(): CachedServerTools | null | Promise<CachedServerTools | null>;
2761
+ /** Persist the payload. Implementations should swallow write failures. */
2762
+ set(value: CachedServerTools): void | Promise<void>;
2763
+ /**
2764
+ * Remove the cached payload. Optional — a read/write-only backend may omit it,
2765
+ * in which case `clearServerToolsCache` (and the version-mismatch
2766
+ * invalidation) is a no-op for that backend. The default
2767
+ * {@link localStorageToolsCache} implements it.
2768
+ */
2769
+ clear?(): void | Promise<void>;
2770
+ }
2744
2771
  /**
2745
2772
  * Options for fetching server tools
2746
2773
  */
@@ -2755,6 +2782,12 @@ interface ServerToolsOptions {
2755
2782
  getToken?: () => Promise<string | null>;
2756
2783
  /** Direct API key for server-side usage (uses X-API-Key header) */
2757
2784
  apiKey?: string;
2785
+ /**
2786
+ * Where to read/write the cached tools list. Defaults to
2787
+ * {@link localStorageToolsCache} (browser `localStorage`; no-op elsewhere).
2788
+ * Provide a backend to enable caching on Node / React Native.
2789
+ */
2790
+ cache?: ToolsCacheBackend;
2758
2791
  }
2759
2792
  /** Default cache expiration: 1 day */
2760
2793
  declare const DEFAULT_CACHE_EXPIRATION_MS: number;
@@ -2770,14 +2803,21 @@ interface ParsedServerToolsResponse {
2770
2803
  */
2771
2804
  declare function getCachedServerTools(): CachedServerTools | null;
2772
2805
  /**
2773
- * Clear the server tools cache
2806
+ * Clear the cached server tools. Defaults to the browser-`localStorage` backend;
2807
+ * pass the SAME {@link ToolsCacheBackend} you gave `getServerTools` to invalidate
2808
+ * a custom backend (a no-op when that backend defines no `clear`). Returns the
2809
+ * backend's clear result, which may be async.
2774
2810
  */
2775
2811
  declare function clearServerToolsCache(): void;
2812
+ declare function clearServerToolsCache(cache: ToolsCacheBackend): void | Promise<void>;
2776
2813
  /**
2777
- * Get the checksum of currently cached tools.
2778
- * Returns undefined if no cache or no checksum stored.
2814
+ * Get the checksum of the currently cached tools, or undefined when there is no
2815
+ * cache / no stored checksum. Defaults to the browser-`localStorage` backend;
2816
+ * pass the SAME backend you gave `getServerTools` to read a custom backend's
2817
+ * checksum (an async backend yields a promise).
2779
2818
  */
2780
2819
  declare function getToolsChecksum(): string | undefined;
2820
+ declare function getToolsChecksum(cache: ToolsCacheBackend): string | undefined | Promise<string | undefined>;
2781
2821
  /**
2782
2822
  * Check if tools should be refreshed based on checksum comparison.
2783
2823
  * Returns true if:
@@ -2789,11 +2829,12 @@ declare function getToolsChecksum(): string | undefined;
2789
2829
  * - Checksums match
2790
2830
  */
2791
2831
  declare function shouldRefreshTools(responseChecksum: string | undefined): boolean;
2832
+ declare function shouldRefreshTools(responseChecksum: string | undefined, cache: ToolsCacheBackend | undefined): boolean | Promise<boolean>;
2792
2833
  /**
2793
2834
  * Get server tools with caching support.
2794
2835
  *
2795
2836
  * Flow:
2796
- * 1. Check localStorage cache
2837
+ * 1. Check the cache backend (localStorage by default; override via `cache`)
2797
2838
  * 2. If cache valid and not force refresh, return cached tools
2798
2839
  * 3. Otherwise, fetch from API, cache, and return
2799
2840
  * 4. On fetch failure, return cached tools if available (stale-while-error)
@@ -3085,6 +3126,11 @@ interface SelectServerToolsForPromptOptions {
3085
3126
  embeddingModel?: string;
3086
3127
  /** Cache expiration in ms for the server-tools catalog fetch. */
3087
3128
  cacheExpirationMs?: number;
3129
+ /**
3130
+ * Where to read/write the cached catalog. Defaults to browser `localStorage`
3131
+ * (a no-op on Node/RN); pass a backend to persist on those platforms.
3132
+ */
3133
+ cache?: ToolsCacheBackend;
3088
3134
  /**
3089
3135
  * Phase 3 defer-loading. When `enabled`, this helper returns the FULL catalog (skipping semantic/
3090
3136
  * static filtering) to mirror useChatStorage's responses send path, which swaps in the full catalog
@@ -3266,6 +3312,32 @@ interface SearchSource {
3266
3312
  snippet?: string;
3267
3313
  date?: string;
3268
3314
  }
3315
+ /** Options for keyset-paginated conversation-list reads ({@link getConversationsPageOp}). */
3316
+ interface GetConversationsPageOptions {
3317
+ /**
3318
+ * Upper-bound `created_at` cursor (epoch ms). Without
3319
+ * `boundaryExcludeUniqueIds` it is EXCLUSIVE: only conversations with
3320
+ * `createdAt < before` are returned. Omit to fetch the newest page.
3321
+ */
3322
+ before?: number;
3323
+ /**
3324
+ * uniqueIds of the rows the caller already holds AT the `before` boundary.
3325
+ * `created_at` is NOT unique (a bulk restore/import writes many rows with the
3326
+ * same timestamp) — with an exclusive cursor, an unseen row sharing the
3327
+ * boundary timestamp would be silently skipped by every page. When provided,
3328
+ * the boundary timestamp is fetched INCLUSIVELY and these known rows are
3329
+ * filtered out, so a boundary-timestamp row is returned exactly once. Mirrors
3330
+ * {@link GetMessagesPageOptions.boundaryExcludeUniqueIds}.
3331
+ */
3332
+ boundaryExcludeUniqueIds?: string[];
3333
+ /**
3334
+ * Maximum rows to return — the NEWEST `limit` rows of the matching range.
3335
+ * Defaults to 200. A non-positive or non-finite value yields an EMPTY page
3336
+ * (never an unbounded read — SQLite treats `LIMIT -1` as "no limit");
3337
+ * fractional values are floored.
3338
+ */
3339
+ limit?: number;
3340
+ }
3269
3341
  interface StoredMessage {
3270
3342
  uniqueId: string;
3271
3343
  messageId: number;
@@ -3593,6 +3665,19 @@ declare function getEncryptionKey(address: string, version?: EncryptionKeyVersio
3593
3665
  * @category Encryption
3594
3666
  */
3595
3667
  declare function encryptData(plaintext: string | Uint8Array, address: string): Promise<string>;
3668
+ /**
3669
+ * Like {@link encryptData} but takes raw bytes and returns the raw encrypted
3670
+ * `[IV][ciphertext+tag]` Uint8Array instead of a hex string. Avoids the hex
3671
+ * round-trip (`encryptData` returns hex, which callers immediately convert back
3672
+ * to bytes) — for large binary media that hex string is a ~1.37x copy of the
3673
+ * whole payload. Use for binary uploads (e.g. enc:v3 media frames).
3674
+ *
3675
+ * @param plaintext - The raw bytes to encrypt
3676
+ * @param address - The wallet address associated with the encryption key
3677
+ * @returns Encrypted data as raw bytes (IV + ciphertext + auth tag)
3678
+ * @category Encryption
3679
+ */
3680
+ declare function encryptDataBytes(plaintext: Uint8Array, address: string): Promise<Uint8Array>;
3596
3681
  /**
3597
3682
  * Decrypts data using AES-GCM with the stored encryption key.
3598
3683
  *
@@ -3629,6 +3714,21 @@ declare function decryptData(encryptedHex: string, address: string, version?: En
3629
3714
  * @returns Decrypted data as Uint8Array
3630
3715
  */
3631
3716
  declare function decryptDataBytes(encryptedHex: string, address: string, version?: EncryptionKeyVersion): Promise<Uint8Array>;
3717
+ /**
3718
+ * Like {@link decryptDataBytes} but takes the raw encrypted bytes
3719
+ * (`[IV][ciphertext+tag]`) directly instead of a hex string. Skips the
3720
+ * `hexToBytes` conversion — for large binary media the hex string the caller
3721
+ * would otherwise build is a ~1.37x copy of the whole payload (a ~1GB string
3722
+ * for a 500MB video), plus this avoids a second byte copy. Same key resolution
3723
+ * as decryptDataBytes.
3724
+ *
3725
+ * @param encrypted - Raw encrypted bytes (IV + ciphertext + auth tag), no hex
3726
+ * @param address - The wallet address associated with the encryption key
3727
+ * @param version - Encryption key version to decrypt with (defaults to "v3")
3728
+ * @returns Decrypted data as Uint8Array
3729
+ * @category Encryption
3730
+ */
3731
+ declare function decryptDataBytesFromBytes(encrypted: Uint8Array, address: string, version?: EncryptionKeyVersion): Promise<Uint8Array>;
3632
3732
  /**
3633
3733
  * Checks if an encryption key exists in memory for the given wallet address
3634
3734
  */
@@ -3796,6 +3896,20 @@ declare function getConversationsOp(ctx: StorageOperationsContext): Promise<Stor
3796
3896
  * for `decryptField` is exactly zero.
3797
3897
  */
3798
3898
  declare function getConversationsLazyOp(ctx: StorageOperationsContext): Promise<LazyStoredConversation[]>;
3899
+ /**
3900
+ * Keyset-paginated, lazy (no-decrypt) variant of {@link getConversationsLazyOp}.
3901
+ *
3902
+ * Returns at most `limit` conversations (newest first by `created_at`), each
3903
+ * with its raw stored title under `encryptedTitle` — pair with
3904
+ * {@link decryptConversationTitle} to decrypt on render. Page through older
3905
+ * threads by passing the oldest loaded `createdAt` as `before` plus the
3906
+ * uniqueIds held at that boundary as `boundaryExcludeUniqueIds`.
3907
+ *
3908
+ * Decrypts nothing and builds no WatermelonDB Model (the never-evicted
3909
+ * RecordCache stays empty — web Pile-2). Sort order, soft-delete filtering,
3910
+ * and the encrypted-title projection all match `getConversationsLazyOp`.
3911
+ */
3912
+ declare function getConversationsPageOp(ctx: StorageOperationsContext, options?: GetConversationsPageOptions): Promise<LazyStoredConversation[]>;
3799
3913
  /**
3800
3914
  * Lazy variant of {@link getConversationsByProjectOp}.
3801
3915
  *
@@ -5275,8 +5389,13 @@ interface EmbeddingOptions {
5275
5389
  * are looked up in this map before calling the API, and new embeddings
5276
5390
  * are stored after generation. Useful when the same texts are embedded
5277
5391
  * repeatedly (e.g., across eval iterations or re-indexing runs).
5392
+ *
5393
+ * Values are stored as `Float32Array` (the embedding model's native
5394
+ * precision) rather than a float64 `number[]`, halving the resident RAM of
5395
+ * the cache with no precision loss. `generateEmbedding(s)` still return
5396
+ * `number[]` at the API boundary, so callers are unaffected.
5278
5397
  */
5279
- cache?: Map<string, number[]>;
5398
+ cache?: Map<string, Float32Array>;
5280
5399
  /** Called after each embedding API call with the token usage from the response. */
5281
5400
  onUsage?: (usage: {
5282
5401
  promptTokens: number;
@@ -5293,11 +5412,26 @@ interface EmbeddingOptions {
5293
5412
  }
5294
5413
 
5295
5414
  /**
5296
- * Memory Retrieval Embeddings
5415
+ * Embedding generation — dependency-free core.
5297
5416
  *
5298
- * Functions for generating and storing embeddings for conversation messages.
5417
+ * The raw "text → embedding" calls, split out of `embeddings.ts` so they can be
5418
+ * imported by node/React-Native-safe modules (the server-tool + client-tool
5419
+ * selection engine in `../tools`) WITHOUT pulling in the WatermelonDB-backed
5420
+ * `db/chat/operations` that `embeddings.ts` needs for its message-persistence
5421
+ * helpers (`embedMessage`, `embedAllMessages`, `chunkAndEmbed*`).
5422
+ *
5423
+ * Nothing here touches the database; the only I/O is the HTTP embeddings
5424
+ * endpoint. `embeddings.ts` re-exports these so existing importers of
5425
+ * `../memoryEngine/embeddings` (and the `../memoryEngine` barrel) keep working.
5299
5426
  */
5300
5427
 
5428
+ /**
5429
+ * Generate an embedding for text using the API
5430
+ *
5431
+ * Supports two auth methods:
5432
+ * - `apiKey`: Uses X-API-Key header (for server-side/CLI usage)
5433
+ * - `getToken`: Uses Authorization: Bearer header (for Privy identity tokens)
5434
+ */
5301
5435
  declare function generateEmbedding(text: string, options: EmbeddingOptions): Promise<number[]>;
5302
5436
  /**
5303
5437
  * Generate embeddings for multiple texts, automatically chunking large inputs.
@@ -5312,6 +5446,18 @@ declare function generateEmbedding(text: string, options: EmbeddingOptions): Pro
5312
5446
  * @returns Array of embeddings in the same order as input texts
5313
5447
  */
5314
5448
  declare function generateEmbeddings(texts: string[], options: EmbeddingOptions): Promise<number[][]>;
5449
+
5450
+ /**
5451
+ * Memory Retrieval Embeddings
5452
+ *
5453
+ * Message-level embedding + persistence helpers: find messages via the
5454
+ * WatermelonDB-backed `db/chat/operations`, embed their content, and store the
5455
+ * vectors/chunks back. The raw "text → embedding" calls live in `./generate`
5456
+ * (dependency-free so the tool-selection engine can import them without the DB
5457
+ * layer) and are re-exported here so existing importers of
5458
+ * `../memoryEngine/embeddings` and the `../memoryEngine` barrel keep working.
5459
+ */
5460
+
5315
5461
  /**
5316
5462
  * Embed a single message and store the embedding in the database
5317
5463
  *
@@ -6510,14 +6656,14 @@ declare function createChunkVectorCache(maxSize?: number): ChunkVectorCache;
6510
6656
  declare function recall(query: string, ctx: RecallContext, options?: RecallOptions): Promise<RecallResult>;
6511
6657
 
6512
6658
  /**
6513
- * Unified Recall Tool
6659
+ * Recall tool constants — deliberately dependency-free.
6514
6660
  *
6515
- * Single chat-completion tool that searches both vault facts and
6516
- * conversation chunks via `recall()`. Replaces the legacy pair of
6517
- * `memory_vault_search` (facts) + `search_memory` (chunks) — the LLM no
6518
- * longer has to route between two tools.
6661
+ * Split out of `recallTool.ts` so the tool NAME can be referenced from
6662
+ * node/React-Native-safe modules (e.g. the client-tool selector in
6663
+ * `../tools/clientToolSelection`) without dragging `recall()` and its
6664
+ * WatermelonDB-backed operations into the module graph. `recallTool.ts`
6665
+ * re-exports these to preserve their public identity.
6519
6666
  */
6520
-
6521
6667
  /** Tool name surfaced to the LLM. Exported so bench harnesses and chat
6522
6668
  * clients reference the same string — drift between prod and bench would
6523
6669
  * mask tool-routing bugs in eval. */
@@ -6525,6 +6671,16 @@ declare const RECALL_TOOL_NAME = "recall_memory";
6525
6671
  /** Maximum results the executor will return to the LLM, regardless of
6526
6672
  * the LLM-supplied `limit`. */
6527
6673
  declare const RECALL_MAX_LIMIT = 50;
6674
+
6675
+ /**
6676
+ * Unified Recall Tool
6677
+ *
6678
+ * Single chat-completion tool that searches both vault facts and
6679
+ * conversation chunks via `recall()`. Replaces the legacy pair of
6680
+ * `memory_vault_search` (facts) + `search_memory` (chunks) — the LLM no
6681
+ * longer has to route between two tools.
6682
+ */
6683
+
6528
6684
  interface RecallToolOptions {
6529
6685
  /** Lanes to search. Default: ["fact", "chunk"]. */
6530
6686
  types?: MemoryKind[];
@@ -7781,4 +7937,4 @@ declare function sanitizeQuotes(s: string): string;
7781
7937
  declare function renderTemplate(value: string | null | undefined, template: string): string | null;
7782
7938
  declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
7783
7939
 
7784
- export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, 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 ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
7940
+ export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, 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 ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };