@anuma/sdk 7.0.0 → 7.0.1

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.
@@ -4684,6 +4684,13 @@ declare function deleteMessageOp(ctx: StorageOperationsContext, uniqueId: string
4684
4684
  * @returns Number of rows stripped.
4685
4685
  */
4686
4686
  declare function stripLegacyChunkTextOp(ctx: StorageOperationsContext): Promise<number>;
4687
+ /**
4688
+ * Encrypts tool call arguments and results still stored in plaintext and
4689
+ * returns how many rows changed, giving each touched conversation a new
4690
+ * `updatedAt` so backups re-upload it, which moves it to the top of any list
4691
+ * sorted by `updatedAt`.
4692
+ */
4693
+ declare function encryptToolCallEventsOp(ctx: StorageOperationsContext): Promise<number>;
4687
4694
  /**
4688
4695
  * Update the feedback (like/dislike) for a message.
4689
4696
  * Each regenerated response can have its own independent feedback.
@@ -15530,4 +15537,4 @@ type UseWalletBindingResult = {
15530
15537
  */
15531
15538
  declare function useWalletBinding(options?: UseWalletBindingOptions): UseWalletBindingResult;
15532
15539
 
15533
- export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DurableAutoExtractorOptions, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, INTERNAL_FLOW_MARKER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TopicSource, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, buildAttachedFilesText, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearConversationMemoriesOp, clearEncryptionKey, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearModelsCache, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, extractMCPImageUrls, extractReservationReceipts, fileExists, findById, findMatchingTools, findParentOfId, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getEntitiesByMemoryIdsOp, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateDisplayResult, migrateMemoriesToRemote, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, primaryTopic, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, stampTopicsExtractedAtOp, startNotionAuth, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useEncryption, useExportPdf, useFiles, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
15540
+ export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DurableAutoExtractorOptions, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, INTERNAL_FLOW_MARKER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TopicSource, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, buildAttachedFilesText, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearConversationMemoriesOp, clearEncryptionKey, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearModelsCache, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, encryptToolCallEventsOp, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, extractMCPImageUrls, extractReservationReceipts, fileExists, findById, findMatchingTools, findParentOfId, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getEntitiesByMemoryIdsOp, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateDisplayResult, migrateMemoriesToRemote, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, primaryTopic, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, stampTopicsExtractedAtOp, startNotionAuth, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useEncryption, useExportPdf, useFiles, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
@@ -4684,6 +4684,13 @@ declare function deleteMessageOp(ctx: StorageOperationsContext, uniqueId: string
4684
4684
  * @returns Number of rows stripped.
4685
4685
  */
4686
4686
  declare function stripLegacyChunkTextOp(ctx: StorageOperationsContext): Promise<number>;
4687
+ /**
4688
+ * Encrypts tool call arguments and results still stored in plaintext and
4689
+ * returns how many rows changed, giving each touched conversation a new
4690
+ * `updatedAt` so backups re-upload it, which moves it to the top of any list
4691
+ * sorted by `updatedAt`.
4692
+ */
4693
+ declare function encryptToolCallEventsOp(ctx: StorageOperationsContext): Promise<number>;
4687
4694
  /**
4688
4695
  * Update the feedback (like/dislike) for a message.
4689
4696
  * Each regenerated response can have its own independent feedback.
@@ -15530,4 +15537,4 @@ type UseWalletBindingResult = {
15530
15537
  */
15531
15538
  declare function useWalletBinding(options?: UseWalletBindingOptions): UseWalletBindingResult;
15532
15539
 
15533
- export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DurableAutoExtractorOptions, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, INTERNAL_FLOW_MARKER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TopicSource, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, buildAttachedFilesText, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearConversationMemoriesOp, clearEncryptionKey, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearModelsCache, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, extractMCPImageUrls, extractReservationReceipts, fileExists, findById, findMatchingTools, findParentOfId, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getEntitiesByMemoryIdsOp, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateDisplayResult, migrateMemoriesToRemote, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, primaryTopic, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, stampTopicsExtractedAtOp, startNotionAuth, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useEncryption, useExportPdf, useFiles, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
15540
+ export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DurableAutoExtractorOptions, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, INTERNAL_FLOW_MARKER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TopicSource, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, buildAttachedFilesText, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearConversationMemoriesOp, clearEncryptionKey, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearModelsCache, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteMessageOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, encryptToolCallEventsOp, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, extractMCPImageUrls, extractReservationReceipts, fileExists, findById, findMatchingTools, findParentOfId, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getEntitiesByMemoryIdsOp, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateDisplayResult, migrateMemoriesToRemote, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, primaryTopic, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRecallMemory, shouldRefreshTools, stampTopicsExtractedAtOp, startNotionAuth, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useEncryption, useExportPdf, useFiles, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
@@ -1821,6 +1821,11 @@ function isEncrypted(value) {
1821
1821
  const payload = value.slice(prefix.length);
1822
1822
  return payload.length >= 56 && /^[0-9a-f]+$/i.test(payload);
1823
1823
  }
1824
+ function hasEncryptedToolPayload(event) {
1825
+ return [event.arguments, event.output].some(
1826
+ (value) => typeof value === "string" && isEncrypted(value)
1827
+ );
1828
+ }
1824
1829
  function detectEncryptionVersion(value) {
1825
1830
  if (value.startsWith("enc:v3:")) {
1826
1831
  return { version: "v3", encryptedData: value.slice("enc:v3:".length) };
@@ -1956,6 +1961,12 @@ async function encryptMessageFields(message, address, signMessage, embeddedWalle
1956
1961
  const encryptedChunks = msg.chunks ? await encryptJsonField(msg.chunks, address, signMessage, embeddedWalletSigner, true) : void 0;
1957
1962
  const encryptedSources = msg.sources ? await encryptJsonField(msg.sources, address, signMessage, embeddedWalletSigner, true) : void 0;
1958
1963
  const encryptedThoughtProcess = msg.thoughtProcess ? await encryptJsonField(msg.thoughtProcess, address, signMessage, embeddedWalletSigner, true) : void 0;
1964
+ const encryptedToolCallEvents = Array.isArray(msg.toolCallEvents) ? await encryptToolCallEvents(
1965
+ msg.toolCallEvents,
1966
+ address,
1967
+ signMessage,
1968
+ embeddedWalletSigner
1969
+ ) : void 0;
1959
1970
  return {
1960
1971
  ...message,
1961
1972
  ...encryptedContent !== void 0 && { content: encryptedContent },
@@ -1963,13 +1974,31 @@ async function encryptMessageFields(message, address, signMessage, embeddedWalle
1963
1974
  ...encryptedVector !== void 0 && { vector: encryptedVector },
1964
1975
  ...encryptedChunks !== void 0 && { chunks: encryptedChunks },
1965
1976
  ...encryptedSources !== void 0 && { sources: encryptedSources },
1966
- ...encryptedThoughtProcess !== void 0 && { thoughtProcess: encryptedThoughtProcess }
1977
+ ...encryptedThoughtProcess !== void 0 && { thoughtProcess: encryptedThoughtProcess },
1978
+ ...encryptedToolCallEvents !== void 0 && { toolCallEvents: encryptedToolCallEvents }
1967
1979
  };
1968
1980
  } catch (error) {
1969
1981
  getLogger().warn("Failed to encrypt message fields:", error);
1970
1982
  throw error;
1971
1983
  }
1972
1984
  }
1985
+ function mapToolCallPayloads(events, transform) {
1986
+ return Promise.all(
1987
+ events.map(async (event) => {
1988
+ if (!event || typeof event !== "object") return event;
1989
+ const mapped = { ...event };
1990
+ if (typeof event.arguments === "string") mapped.arguments = await transform(event.arguments);
1991
+ if (typeof event.output === "string") mapped.output = await transform(event.output);
1992
+ return mapped;
1993
+ })
1994
+ );
1995
+ }
1996
+ function encryptToolCallEvents(events, address, signMessage, embeddedWalletSigner) {
1997
+ return mapToolCallPayloads(
1998
+ events,
1999
+ (value) => encryptField(value, address, signMessage, embeddedWalletSigner, true)
2000
+ );
2001
+ }
1973
2002
  async function decryptMaybeJsonFieldDetailed(value, address) {
1974
2003
  if (value === void 0) return { value: void 0, status: "plaintext" };
1975
2004
  if (value === null) return { value, status: "plaintext" };
@@ -2055,6 +2084,10 @@ async function assembleDecryptedMessage(message, address) {
2055
2084
  message.thoughtProcess,
2056
2085
  address
2057
2086
  );
2087
+ const toolCallEventsResult = await decryptMaybeJsonFieldDetailed(
2088
+ message.toolCallEvents,
2089
+ address
2090
+ );
2058
2091
  let decryptionStatus;
2059
2092
  let refreshProbe;
2060
2093
  const consider = (status, probe) => {
@@ -2073,6 +2106,14 @@ async function assembleDecryptedMessage(message, address) {
2073
2106
  if (thoughtProcessResult.probe) {
2074
2107
  consider(thoughtProcessResult.status, thoughtProcessResult.probe);
2075
2108
  }
2109
+ if (toolCallEventsResult.probe) {
2110
+ consider(toolCallEventsResult.status, toolCallEventsResult.probe);
2111
+ }
2112
+ const toolCallEvents = Array.isArray(toolCallEventsResult.value) ? await mapToolCallPayloads(toolCallEventsResult.value, async (value) => {
2113
+ const detailed = await decryptFieldDetailed(value, address);
2114
+ consider(detailed.status, isEncrypted(value) ? value : void 0);
2115
+ return detailed.value;
2116
+ }) : void 0;
2076
2117
  const statusForConsumer = decryptionStatus === "ok" || decryptionStatus === "plaintext" || !decryptionStatus ? void 0 : decryptionStatus;
2077
2118
  const result = {
2078
2119
  ...message,
@@ -2081,7 +2122,8 @@ async function assembleDecryptedMessage(message, address) {
2081
2122
  vector: vectorResult.value,
2082
2123
  chunks: chunksResult.value,
2083
2124
  sources: sourcesResult.value,
2084
- thoughtProcess: thoughtProcessResult.value
2125
+ thoughtProcess: thoughtProcessResult.value,
2126
+ toolCallEvents
2085
2127
  };
2086
2128
  if (statusForConsumer) {
2087
2129
  result.decryptionStatus = statusForConsumer;
@@ -2875,7 +2917,7 @@ async function updateMessageChunksOp(ctx, uniqueId, chunks3, embeddingModel) {
2875
2917
  });
2876
2918
  return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
2877
2919
  }
2878
- var STRIP_CHUNK_TEXT_PAGE_SIZE = 100;
2920
+ var RAW_REPAIR_PAGE_SIZE = 100;
2879
2921
  function chunksWithoutText(raw) {
2880
2922
  if (typeof raw !== "string") return null;
2881
2923
  let parsed;
@@ -2898,8 +2940,8 @@ function chunksWithoutText(raw) {
2898
2940
  async function stripLegacyChunkTextOp(ctx) {
2899
2941
  const candidateIds = await ctx.messagesCollection.query(Q.where("chunks", Q.like(`%${Q.sanitizeLikeString('"text":')}%`))).fetchIds();
2900
2942
  let stripped = 0;
2901
- for (let start = 0; start < candidateIds.length; start += STRIP_CHUNK_TEXT_PAGE_SIZE) {
2902
- const pageIds = candidateIds.slice(start, start + STRIP_CHUNK_TEXT_PAGE_SIZE);
2943
+ for (let start = 0; start < candidateIds.length; start += RAW_REPAIR_PAGE_SIZE) {
2944
+ const pageIds = candidateIds.slice(start, start + RAW_REPAIR_PAGE_SIZE);
2903
2945
  const rows = await ctx.messagesCollection.query(Q.where("id", Q.oneOf(pageIds))).unsafeFetchRaw();
2904
2946
  const changedIds = rows.filter((row) => chunksWithoutText(row.chunks) !== null).map((row) => String(row.id));
2905
2947
  if (changedIds.length === 0) continue;
@@ -2923,6 +2965,88 @@ async function stripLegacyChunkTextOp(ctx) {
2923
2965
  }
2924
2966
  return stripped;
2925
2967
  }
2968
+ async function encryptedToolCallEventsColumn(raw, address, signMessage, embeddedWalletSigner) {
2969
+ if (typeof raw !== "string") return null;
2970
+ let parsed;
2971
+ try {
2972
+ parsed = JSON.parse(raw);
2973
+ } catch {
2974
+ return null;
2975
+ }
2976
+ if (!Array.isArray(parsed)) return null;
2977
+ const column = JSON.stringify(
2978
+ await encryptToolCallEvents(
2979
+ parsed,
2980
+ address,
2981
+ signMessage,
2982
+ embeddedWalletSigner
2983
+ )
2984
+ );
2985
+ return column === JSON.stringify(parsed) ? null : column;
2986
+ }
2987
+ async function encryptToolCallEventsOp(ctx) {
2988
+ const { walletAddress: address, signMessage, embeddedWalletSigner } = ctx;
2989
+ if (!address || !signMessage) return 0;
2990
+ if (!await requestEncryptionKey(address, signMessage, embeddedWalletSigner)) return 0;
2991
+ if (!hasEncryptionKey(address)) return 0;
2992
+ if (!await savedKeyOpensExistingData(ctx, address, signMessage, embeddedWalletSigner)) {
2993
+ return 0;
2994
+ }
2995
+ const candidateIds = await ctx.messagesCollection.query(
2996
+ Q.where("tool_call_events", Q.notEq(null)),
2997
+ Q.where("tool_call_events", Q.notIn(["", "[]"]))
2998
+ ).fetchIds();
2999
+ let encrypted = 0;
3000
+ for (let start = 0; start < candidateIds.length; start += RAW_REPAIR_PAGE_SIZE) {
3001
+ const pageIds = candidateIds.slice(start, start + RAW_REPAIR_PAGE_SIZE);
3002
+ const rows = await ctx.messagesCollection.query(Q.where("id", Q.oneOf(pageIds))).unsafeFetchRaw();
3003
+ const repairs = /* @__PURE__ */ new Map();
3004
+ for (const row of rows) {
3005
+ const column = await encryptedToolCallEventsColumn(
3006
+ row.tool_call_events,
3007
+ address,
3008
+ signMessage,
3009
+ embeddedWalletSigner
3010
+ );
3011
+ if (column !== null) repairs.set(String(row.id), { raw: row.tool_call_events, column });
3012
+ }
3013
+ if (repairs.size === 0) continue;
3014
+ await ctx.database.write(async () => {
3015
+ const messages = (await ctx.messagesCollection.query(Q.where("id", Q.oneOf([...repairs.keys()]))).fetch()).filter(
3016
+ (message) => message._raw.tool_call_events === repairs.get(message.id)?.raw
3017
+ );
3018
+ if (messages.length === 0) return;
3019
+ const conversationIds = [...new Set(messages.map((message) => message.conversationId))];
3020
+ const conversations = await ctx.conversationsCollection.query(Q.where("conversation_id", Q.oneOf(conversationIds))).fetch();
3021
+ await ctx.database.batch(
3022
+ ...messages.map(
3023
+ (message) => message.prepareUpdate((msg) => {
3024
+ msg._setRaw("tool_call_events", repairs.get(message.id).column);
3025
+ })
3026
+ ),
3027
+ ...conversations.map((conversation) => conversation.prepareUpdate(() => {
3028
+ }))
3029
+ );
3030
+ encrypted += messages.length;
3031
+ });
3032
+ }
3033
+ return encrypted;
3034
+ }
3035
+ async function savedKeyOpensExistingData(ctx, address, signMessage, embeddedWalletSigner) {
3036
+ const v3Probe = await findEncryptedContent(ctx, "enc:v3:%");
3037
+ if (v3Probe) {
3038
+ const { status } = await decryptFieldDetailed(v3Probe, address);
3039
+ if (status !== "auth_mismatch" && status !== "key_missing") return true;
3040
+ return refreshEncryptionKeyIfMatches(address, v3Probe, signMessage, embeddedWalletSigner);
3041
+ }
3042
+ const v2Probe = await findEncryptedContent(ctx, "enc:v2:%");
3043
+ if (!v2Probe) return true;
3044
+ return refreshEncryptionKeyIfMatches(address, v2Probe, signMessage, embeddedWalletSigner);
3045
+ }
3046
+ async function findEncryptedContent(ctx, pattern) {
3047
+ const [row] = await ctx.messagesCollection.query(Q.where("content", Q.like(pattern)), Q.take(1)).unsafeFetchRaw();
3048
+ return row ? String(row.content) : null;
3049
+ }
2926
3050
  async function updateMessageErrorOp(ctx, uniqueId, error) {
2927
3051
  let message;
2928
3052
  try {
@@ -4795,7 +4919,8 @@ function extractReservationReceipts(toolCallEvents) {
4795
4919
  for (const event of toolCallEvents ?? []) {
4796
4920
  const action = ACTIONS.find((a) => event.name?.endsWith(a.tool));
4797
4921
  const output = event.output ?? "";
4798
- if (!action || !output || NOT_AN_ATTEMPT.test(output)) continue;
4922
+ if (!action || !output || hasEncryptedToolPayload(event) || NOT_AN_ATTEMPT.test(output))
4923
+ continue;
4799
4924
  const kept = latest.get(action.kind)?.status;
4800
4925
  if (kept === "made") continue;
4801
4926
  const receipt = toReceipt(action, event.arguments ?? "", output);
@@ -30185,11 +30310,12 @@ async function storedToLlmapiMessage(stored2, encryptionKey, resolveMediaByIds)
30185
30310
  textContent = textContent.replace(/\n{3,}/g, "\n\n").trim();
30186
30311
  const content = [{ type: "text", text: textContent }, ...imageParts];
30187
30312
  const messages = [];
30188
- if (stored2.role === "assistant" && stored2.toolCallEvents?.length) {
30313
+ const toolCallEvents = Array.isArray(stored2.toolCallEvents) ? stored2.toolCallEvents.filter((event) => !hasEncryptedToolPayload(event)) : [];
30314
+ if (stored2.role === "assistant" && toolCallEvents.length) {
30189
30315
  messages.push({
30190
30316
  role: stored2.role,
30191
30317
  content: void 0,
30192
- tool_calls: stored2.toolCallEvents.map((event) => ({
30318
+ tool_calls: toolCallEvents.map((event) => ({
30193
30319
  id: event.id,
30194
30320
  type: "function",
30195
30321
  function: {
@@ -30198,7 +30324,7 @@ async function storedToLlmapiMessage(stored2, encryptionKey, resolveMediaByIds)
30198
30324
  }
30199
30325
  }))
30200
30326
  });
30201
- for (const event of stored2.toolCallEvents) {
30327
+ for (const event of toolCallEvents) {
30202
30328
  if (event.id && event.output !== void 0 && event.output !== null) {
30203
30329
  messages.push({
30204
30330
  role: "tool",
@@ -35190,6 +35316,7 @@ export {
35190
35316
  encryptDataBatch,
35191
35317
  encryptDataBytes,
35192
35318
  encryptDataWithKey,
35319
+ encryptToolCallEventsOp,
35193
35320
  ensureDefaultFoldersOp,
35194
35321
  expandToolSetsAdditive,
35195
35322
  exportElementToPdf,
@@ -16424,6 +16424,7 @@ __export(index_exports, {
16424
16424
  encryptDataBatch: () => encryptDataBatch,
16425
16425
  encryptDataBytes: () => encryptDataBytes,
16426
16426
  encryptDataWithKey: () => encryptDataWithKey,
16427
+ encryptToolCallEventsOp: () => encryptToolCallEventsOp,
16427
16428
  estimateMessagesTokens: () => estimateMessagesTokens,
16428
16429
  estimateTokens: () => estimateTokens,
16429
16430
  exportPublicKey: () => exportPublicKey,
@@ -17814,6 +17815,12 @@ async function encryptMessageFields(message, address, signMessage, embeddedWalle
17814
17815
  const encryptedChunks = msg.chunks ? await encryptJsonField(msg.chunks, address, signMessage, embeddedWalletSigner, true) : void 0;
17815
17816
  const encryptedSources = msg.sources ? await encryptJsonField(msg.sources, address, signMessage, embeddedWalletSigner, true) : void 0;
17816
17817
  const encryptedThoughtProcess = msg.thoughtProcess ? await encryptJsonField(msg.thoughtProcess, address, signMessage, embeddedWalletSigner, true) : void 0;
17818
+ const encryptedToolCallEvents = Array.isArray(msg.toolCallEvents) ? await encryptToolCallEvents(
17819
+ msg.toolCallEvents,
17820
+ address,
17821
+ signMessage,
17822
+ embeddedWalletSigner
17823
+ ) : void 0;
17817
17824
  return {
17818
17825
  ...message,
17819
17826
  ...encryptedContent !== void 0 && { content: encryptedContent },
@@ -17821,13 +17828,31 @@ async function encryptMessageFields(message, address, signMessage, embeddedWalle
17821
17828
  ...encryptedVector !== void 0 && { vector: encryptedVector },
17822
17829
  ...encryptedChunks !== void 0 && { chunks: encryptedChunks },
17823
17830
  ...encryptedSources !== void 0 && { sources: encryptedSources },
17824
- ...encryptedThoughtProcess !== void 0 && { thoughtProcess: encryptedThoughtProcess }
17831
+ ...encryptedThoughtProcess !== void 0 && { thoughtProcess: encryptedThoughtProcess },
17832
+ ...encryptedToolCallEvents !== void 0 && { toolCallEvents: encryptedToolCallEvents }
17825
17833
  };
17826
17834
  } catch (error) {
17827
17835
  getLogger().warn("Failed to encrypt message fields:", error);
17828
17836
  throw error;
17829
17837
  }
17830
17838
  }
17839
+ function mapToolCallPayloads(events, transform) {
17840
+ return Promise.all(
17841
+ events.map(async (event) => {
17842
+ if (!event || typeof event !== "object") return event;
17843
+ const mapped = { ...event };
17844
+ if (typeof event.arguments === "string") mapped.arguments = await transform(event.arguments);
17845
+ if (typeof event.output === "string") mapped.output = await transform(event.output);
17846
+ return mapped;
17847
+ })
17848
+ );
17849
+ }
17850
+ function encryptToolCallEvents(events, address, signMessage, embeddedWalletSigner) {
17851
+ return mapToolCallPayloads(
17852
+ events,
17853
+ (value) => encryptField(value, address, signMessage, embeddedWalletSigner, true)
17854
+ );
17855
+ }
17831
17856
  async function decryptMaybeJsonFieldDetailed(value, address) {
17832
17857
  if (value === void 0) return { value: void 0, status: "plaintext" };
17833
17858
  if (value === null) return { value, status: "plaintext" };
@@ -17913,6 +17938,10 @@ async function assembleDecryptedMessage(message, address) {
17913
17938
  message.thoughtProcess,
17914
17939
  address
17915
17940
  );
17941
+ const toolCallEventsResult = await decryptMaybeJsonFieldDetailed(
17942
+ message.toolCallEvents,
17943
+ address
17944
+ );
17916
17945
  let decryptionStatus;
17917
17946
  let refreshProbe;
17918
17947
  const consider = (status, probe) => {
@@ -17931,6 +17960,14 @@ async function assembleDecryptedMessage(message, address) {
17931
17960
  if (thoughtProcessResult.probe) {
17932
17961
  consider(thoughtProcessResult.status, thoughtProcessResult.probe);
17933
17962
  }
17963
+ if (toolCallEventsResult.probe) {
17964
+ consider(toolCallEventsResult.status, toolCallEventsResult.probe);
17965
+ }
17966
+ const toolCallEvents = Array.isArray(toolCallEventsResult.value) ? await mapToolCallPayloads(toolCallEventsResult.value, async (value) => {
17967
+ const detailed = await decryptFieldDetailed(value, address);
17968
+ consider(detailed.status, isEncrypted(value) ? value : void 0);
17969
+ return detailed.value;
17970
+ }) : void 0;
17934
17971
  const statusForConsumer = decryptionStatus === "ok" || decryptionStatus === "plaintext" || !decryptionStatus ? void 0 : decryptionStatus;
17935
17972
  const result = {
17936
17973
  ...message,
@@ -17939,7 +17976,8 @@ async function assembleDecryptedMessage(message, address) {
17939
17976
  vector: vectorResult.value,
17940
17977
  chunks: chunksResult.value,
17941
17978
  sources: sourcesResult.value,
17942
- thoughtProcess: thoughtProcessResult.value
17979
+ thoughtProcess: thoughtProcessResult.value,
17980
+ toolCallEvents
17943
17981
  };
17944
17982
  if (statusForConsumer) {
17945
17983
  result.decryptionStatus = statusForConsumer;
@@ -18505,7 +18543,7 @@ async function updateMessageChunksOp(ctx, uniqueId, chunks, embeddingModel) {
18505
18543
  });
18506
18544
  return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
18507
18545
  }
18508
- var STRIP_CHUNK_TEXT_PAGE_SIZE = 100;
18546
+ var RAW_REPAIR_PAGE_SIZE = 100;
18509
18547
  function chunksWithoutText(raw) {
18510
18548
  if (typeof raw !== "string") return null;
18511
18549
  let parsed;
@@ -18528,8 +18566,8 @@ function chunksWithoutText(raw) {
18528
18566
  async function stripLegacyChunkTextOp(ctx) {
18529
18567
  const candidateIds = await ctx.messagesCollection.query(import_watermelondb2.Q.where("chunks", import_watermelondb2.Q.like(`%${import_watermelondb2.Q.sanitizeLikeString('"text":')}%`))).fetchIds();
18530
18568
  let stripped = 0;
18531
- for (let start = 0; start < candidateIds.length; start += STRIP_CHUNK_TEXT_PAGE_SIZE) {
18532
- const pageIds = candidateIds.slice(start, start + STRIP_CHUNK_TEXT_PAGE_SIZE);
18569
+ for (let start = 0; start < candidateIds.length; start += RAW_REPAIR_PAGE_SIZE) {
18570
+ const pageIds = candidateIds.slice(start, start + RAW_REPAIR_PAGE_SIZE);
18533
18571
  const rows = await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf(pageIds))).unsafeFetchRaw();
18534
18572
  const changedIds = rows.filter((row) => chunksWithoutText(row.chunks) !== null).map((row) => String(row.id));
18535
18573
  if (changedIds.length === 0) continue;
@@ -18553,6 +18591,88 @@ async function stripLegacyChunkTextOp(ctx) {
18553
18591
  }
18554
18592
  return stripped;
18555
18593
  }
18594
+ async function encryptedToolCallEventsColumn(raw, address, signMessage, embeddedWalletSigner) {
18595
+ if (typeof raw !== "string") return null;
18596
+ let parsed;
18597
+ try {
18598
+ parsed = JSON.parse(raw);
18599
+ } catch {
18600
+ return null;
18601
+ }
18602
+ if (!Array.isArray(parsed)) return null;
18603
+ const column = JSON.stringify(
18604
+ await encryptToolCallEvents(
18605
+ parsed,
18606
+ address,
18607
+ signMessage,
18608
+ embeddedWalletSigner
18609
+ )
18610
+ );
18611
+ return column === JSON.stringify(parsed) ? null : column;
18612
+ }
18613
+ async function encryptToolCallEventsOp(ctx) {
18614
+ const { walletAddress: address, signMessage, embeddedWalletSigner } = ctx;
18615
+ if (!address || !signMessage) return 0;
18616
+ if (!await requestEncryptionKey(address, signMessage, embeddedWalletSigner)) return 0;
18617
+ if (!hasEncryptionKey(address)) return 0;
18618
+ if (!await savedKeyOpensExistingData(ctx, address, signMessage, embeddedWalletSigner)) {
18619
+ return 0;
18620
+ }
18621
+ const candidateIds = await ctx.messagesCollection.query(
18622
+ import_watermelondb2.Q.where("tool_call_events", import_watermelondb2.Q.notEq(null)),
18623
+ import_watermelondb2.Q.where("tool_call_events", import_watermelondb2.Q.notIn(["", "[]"]))
18624
+ ).fetchIds();
18625
+ let encrypted = 0;
18626
+ for (let start = 0; start < candidateIds.length; start += RAW_REPAIR_PAGE_SIZE) {
18627
+ const pageIds = candidateIds.slice(start, start + RAW_REPAIR_PAGE_SIZE);
18628
+ const rows = await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf(pageIds))).unsafeFetchRaw();
18629
+ const repairs = /* @__PURE__ */ new Map();
18630
+ for (const row of rows) {
18631
+ const column = await encryptedToolCallEventsColumn(
18632
+ row.tool_call_events,
18633
+ address,
18634
+ signMessage,
18635
+ embeddedWalletSigner
18636
+ );
18637
+ if (column !== null) repairs.set(String(row.id), { raw: row.tool_call_events, column });
18638
+ }
18639
+ if (repairs.size === 0) continue;
18640
+ await ctx.database.write(async () => {
18641
+ const messages = (await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf([...repairs.keys()]))).fetch()).filter(
18642
+ (message) => message._raw.tool_call_events === repairs.get(message.id)?.raw
18643
+ );
18644
+ if (messages.length === 0) return;
18645
+ const conversationIds = [...new Set(messages.map((message) => message.conversationId))];
18646
+ const conversations = await ctx.conversationsCollection.query(import_watermelondb2.Q.where("conversation_id", import_watermelondb2.Q.oneOf(conversationIds))).fetch();
18647
+ await ctx.database.batch(
18648
+ ...messages.map(
18649
+ (message) => message.prepareUpdate((msg) => {
18650
+ msg._setRaw("tool_call_events", repairs.get(message.id).column);
18651
+ })
18652
+ ),
18653
+ ...conversations.map((conversation) => conversation.prepareUpdate(() => {
18654
+ }))
18655
+ );
18656
+ encrypted += messages.length;
18657
+ });
18658
+ }
18659
+ return encrypted;
18660
+ }
18661
+ async function savedKeyOpensExistingData(ctx, address, signMessage, embeddedWalletSigner) {
18662
+ const v3Probe = await findEncryptedContent(ctx, "enc:v3:%");
18663
+ if (v3Probe) {
18664
+ const { status } = await decryptFieldDetailed(v3Probe, address);
18665
+ if (status !== "auth_mismatch" && status !== "key_missing") return true;
18666
+ return refreshEncryptionKeyIfMatches(address, v3Probe, signMessage, embeddedWalletSigner);
18667
+ }
18668
+ const v2Probe = await findEncryptedContent(ctx, "enc:v2:%");
18669
+ if (!v2Probe) return true;
18670
+ return refreshEncryptionKeyIfMatches(address, v2Probe, signMessage, embeddedWalletSigner);
18671
+ }
18672
+ async function findEncryptedContent(ctx, pattern) {
18673
+ const [row] = await ctx.messagesCollection.query(import_watermelondb2.Q.where("content", import_watermelondb2.Q.like(pattern)), import_watermelondb2.Q.take(1)).unsafeFetchRaw();
18674
+ return row ? String(row.content) : null;
18675
+ }
18556
18676
  async function updateMessageErrorOp(ctx, uniqueId, error) {
18557
18677
  let message;
18558
18678
  try {
@@ -39427,6 +39547,7 @@ function serverPlatformStorage() {
39427
39547
  encryptDataBatch,
39428
39548
  encryptDataBytes,
39429
39549
  encryptDataWithKey,
39550
+ encryptToolCallEventsOp,
39430
39551
  estimateMessagesTokens,
39431
39552
  estimateTokens,
39432
39553
  exportPublicKey,