@anuma/sdk 10.2.6 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/expo/index.cjs +192 -41
- package/dist/expo/index.d.mts +17 -2
- package/dist/expo/index.d.ts +17 -2
- package/dist/expo/index.mjs +192 -41
- package/dist/react/index.cjs +192 -41
- package/dist/react/index.d.mts +17 -2
- package/dist/react/index.d.ts +17 -2
- package/dist/react/index.mjs +192 -41
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -9360,6 +9360,12 @@ interface BaseUseChatStorageResult {
|
|
|
9360
9360
|
}
|
|
9361
9361
|
declare function generateConversationId(): string;
|
|
9362
9362
|
|
|
9363
|
+
/** Durable home for each account's sealed chat cache; `set(account, null)` deletes that account's entry. */
|
|
9364
|
+
interface ChatCacheStorage {
|
|
9365
|
+
get(account: string): Promise<string | null>;
|
|
9366
|
+
set(account: string, sealed: string | null): Promise<void>;
|
|
9367
|
+
}
|
|
9368
|
+
|
|
9363
9369
|
/** Durable home for sealed outbox slots, one per running backend, so writes survive a reload while vault is unreachable. */
|
|
9364
9370
|
interface ChatOutboxStorage {
|
|
9365
9371
|
slots(): Promise<string[]>;
|
|
@@ -9406,7 +9412,8 @@ interface VaultChatActivity {
|
|
|
9406
9412
|
subscribe(onChange: () => void): () => void;
|
|
9407
9413
|
}
|
|
9408
9414
|
interface VaultChatBackendOptions {
|
|
9409
|
-
store
|
|
9415
|
+
/** A connected store, or a function that connects one; with a seeded `cache`, reads serve cached chats until it resolves. */
|
|
9416
|
+
store: ChatStore | (() => Promise<ChatStore>);
|
|
9410
9417
|
/** Persists unsent writes, sealed with `seal`, so they survive a reload; `locks` defaults to `navigator.locks`. */
|
|
9411
9418
|
outbox?: {
|
|
9412
9419
|
storage: ChatOutboxStorage;
|
|
@@ -9418,6 +9425,12 @@ interface VaultChatBackendOptions {
|
|
|
9418
9425
|
pollIntervalMs?: number;
|
|
9419
9426
|
/** BroadcastChannel name shared by this account's tabs, so one tab's writes prompt the others to poll. */
|
|
9420
9427
|
channel?: string;
|
|
9428
|
+
/** Keeps `account`'s confirmed records and `/changes` cursor sealed with `seal`, so a cold start reads them before vault answers. */
|
|
9429
|
+
cache?: {
|
|
9430
|
+
storage: ChatCacheStorage;
|
|
9431
|
+
seal: Pick<SealingCipher, "encrypt" | "decrypt">;
|
|
9432
|
+
account: string;
|
|
9433
|
+
};
|
|
9421
9434
|
threadCacheSize?: number;
|
|
9422
9435
|
now?: () => number;
|
|
9423
9436
|
}
|
|
@@ -9444,6 +9457,8 @@ interface VaultChatBackend extends ChatBackend {
|
|
|
9444
9457
|
pending: number;
|
|
9445
9458
|
stopped?: string;
|
|
9446
9459
|
};
|
|
9460
|
+
/** Deletes this account's cached chats and stops caching; call it on logout or a wallet switch. */
|
|
9461
|
+
clearCache(): Promise<void>;
|
|
9447
9462
|
close(): void;
|
|
9448
9463
|
}
|
|
9449
9464
|
/** Creates a vault chat backend for one account and key; build a new one after a wallet or key change. */
|
|
@@ -16197,4 +16212,4 @@ type UseWalletBindingResult = {
|
|
|
16197
16212
|
*/
|
|
16198
16213
|
declare function useWalletBinding(options?: UseWalletBindingOptions): UseWalletBindingResult;
|
|
16199
16214
|
|
|
16200
|
-
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, type ChatAccount, type ChatAccountState, type ChatAttachment, type ChatAttachments, type ChatBackend, type ChatBackendFactory, type ChatBackendSigner, type ChatChanges, type ChatChunkSearchOptions, Conversation as ChatConversation, type ChatImport, type ChatJson, type ChatListOptions, Message as ChatMessage, type ChatMigrationOptions, type ChatMigrationProgress, type ChatMigrationResult, type ChatMigrationSkip, type ChatOutboxLocks, type ChatOutboxStorage, type ChatPage, type ChatPresignedUrl, type ChatRecord, type ChatRecordKind, type ChatRef, type ChatRevision, type ChatRole, type ChatSearchHit, type ChatSearchOptions, type ChatSnapshot, type ChatStorageAdapter, type ChatStorageObservable, type ChatStore, ChatStoreError, type ChatWrite, type ChunkSearchResult, type ChunkSearchStats, 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 CreateSelectPaymentWalletToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CreateWalletPaymentToolOptions, 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, type EmbeddingRepairOptions, type EmbeddingRepairResult, 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 ExtractionMessageSource, type ExtractionSourceMessage, type ExtractionSourceStatus, 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 MemoryCounts, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, 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 PaymentWallet, 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 RemoteChatStoreOptions, 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 RemoteMemoryTopic, type RemoteMemoryWorkKind, type RemoteMemoryWorkLease, type RemoteMemoryWorkPersistence, type RemoteTopicPersistence, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SELECT_PAYMENT_WALLET_TOOL_NAME, 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 SelectPaymentWalletResult, 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 VaultChatActivity, type VaultChatBackend, type VaultChatBackendOptions, type VaultChatEvent, 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, WALLET_PAYMENT_TOOL_NAME, type WalletPaymentOutcome, type WalletPaymentPassenger, type WalletPaymentRequest, type WalletPaymentResult, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, type WriteFailureReason, 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, createRemoteChatStore, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createSelectPaymentWalletTool, createServerToolsFilter, createStockPricePreProcessor, createVaultChatBackend, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWalletPaymentTool, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, decryptMessageEmbeddingFields, 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, localChatBackend, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateChatsToRemote, 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, sealLegacyMessageEmbeddingsOp, 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, vaultChatBackend, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
|
|
16215
|
+
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, type ChatAccount, type ChatAccountState, type ChatAttachment, type ChatAttachments, type ChatBackend, type ChatBackendFactory, type ChatBackendSigner, type ChatCacheStorage, type ChatChanges, type ChatChunkSearchOptions, Conversation as ChatConversation, type ChatImport, type ChatJson, type ChatListOptions, Message as ChatMessage, type ChatMigrationOptions, type ChatMigrationProgress, type ChatMigrationResult, type ChatMigrationSkip, type ChatOutboxLocks, type ChatOutboxStorage, type ChatPage, type ChatPresignedUrl, type ChatRecord, type ChatRecordKind, type ChatRef, type ChatRevision, type ChatRole, type ChatSearchHit, type ChatSearchOptions, type ChatSnapshot, type ChatStorageAdapter, type ChatStorageObservable, type ChatStore, ChatStoreError, type ChatWrite, type ChunkSearchResult, type ChunkSearchStats, 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 CreateSelectPaymentWalletToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CreateWalletPaymentToolOptions, 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, type EmbeddingRepairOptions, type EmbeddingRepairResult, 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 ExtractionMessageSource, type ExtractionSourceMessage, type ExtractionSourceStatus, 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 MemoryCounts, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, 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 PaymentWallet, 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 RemoteChatStoreOptions, 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 RemoteMemoryTopic, type RemoteMemoryWorkKind, type RemoteMemoryWorkLease, type RemoteMemoryWorkPersistence, type RemoteTopicPersistence, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SELECT_PAYMENT_WALLET_TOOL_NAME, 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 SelectPaymentWalletResult, 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 VaultChatActivity, type VaultChatBackend, type VaultChatBackendOptions, type VaultChatEvent, 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, WALLET_PAYMENT_TOOL_NAME, type WalletPaymentOutcome, type WalletPaymentPassenger, type WalletPaymentRequest, type WalletPaymentResult, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, type WriteFailureReason, 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, createRemoteChatStore, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSavedToolOp, createSelectPaymentWalletTool, createServerToolsFilter, createStockPricePreProcessor, createVaultChatBackend, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWalletPaymentTool, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, decryptMessageEmbeddingFields, 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, localChatBackend, maskScopedEmbeddingCache, mediaToStored, memoryCipher, migrateChatsToRemote, 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, sealLegacyMessageEmbeddingsOp, 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, vaultChatBackend, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
|
package/dist/react/index.mjs
CHANGED
|
@@ -12426,6 +12426,25 @@ async function migrateChatsToRemote(options) {
|
|
|
12426
12426
|
// src/lib/chatStore/vaultBackend.ts
|
|
12427
12427
|
import { v7 as uuidv73 } from "uuid";
|
|
12428
12428
|
|
|
12429
|
+
// src/lib/chatStore/vaultCache.ts
|
|
12430
|
+
async function saveChatCache(storage, encrypt, snapshot) {
|
|
12431
|
+
await storage.set(snapshot.account, await encrypt(JSON.stringify({ schema: 1, ...snapshot })));
|
|
12432
|
+
}
|
|
12433
|
+
async function loadChatCache(storage, account, decrypt) {
|
|
12434
|
+
const sealed2 = await storage.get(account);
|
|
12435
|
+
if (!sealed2) return void 0;
|
|
12436
|
+
const parsed = JSON.parse(await decrypt(sealed2));
|
|
12437
|
+
if (parsed.schema !== 1 || parsed.account !== account || typeof parsed.cursor !== "string" || !Array.isArray(parsed.records) || !Array.isArray(parsed.threads) || !Array.isArray(parsed.absent))
|
|
12438
|
+
return void 0;
|
|
12439
|
+
return {
|
|
12440
|
+
account,
|
|
12441
|
+
cursor: parsed.cursor,
|
|
12442
|
+
records: parsed.records,
|
|
12443
|
+
threads: parsed.threads,
|
|
12444
|
+
absent: parsed.absent
|
|
12445
|
+
};
|
|
12446
|
+
}
|
|
12447
|
+
|
|
12429
12448
|
// src/lib/chatStore/vaultOutbox.ts
|
|
12430
12449
|
function patchKey(patch) {
|
|
12431
12450
|
return `${patch.kind}/${patch.id}`;
|
|
@@ -12530,6 +12549,10 @@ async function loadOutbox(storage, slot, decrypt) {
|
|
|
12530
12549
|
|
|
12531
12550
|
// src/lib/chatStore/vaultBackend.ts
|
|
12532
12551
|
var terminalCodes = /* @__PURE__ */ new Set(["key_mismatch", "account_changed", "account_not_found"]);
|
|
12552
|
+
var cacheSaveDelayMs = 500;
|
|
12553
|
+
function cursorRejected(error) {
|
|
12554
|
+
return error instanceof ChatStoreError && (error.status === 400 || error.status === 410);
|
|
12555
|
+
}
|
|
12533
12556
|
function key2(kind, id2) {
|
|
12534
12557
|
return `${kind}/${id2}`;
|
|
12535
12558
|
}
|
|
@@ -12574,7 +12597,7 @@ function defaultActivity() {
|
|
|
12574
12597
|
};
|
|
12575
12598
|
}
|
|
12576
12599
|
function createVaultChatBackend(options) {
|
|
12577
|
-
const {
|
|
12600
|
+
const { cache } = options;
|
|
12578
12601
|
const now = options.now ?? Date.now;
|
|
12579
12602
|
const threadLimit = options.threadCacheSize ?? 30;
|
|
12580
12603
|
const pollIntervalMs = options.pollIntervalMs ?? 6e4;
|
|
@@ -12601,6 +12624,13 @@ function createVaultChatBackend(options) {
|
|
|
12601
12624
|
let persisting = Promise.resolve();
|
|
12602
12625
|
let readyPromise = null;
|
|
12603
12626
|
let adopting = null;
|
|
12627
|
+
let connected = typeof options.store === "function" ? void 0 : options.store;
|
|
12628
|
+
const complete = /* @__PURE__ */ new Set();
|
|
12629
|
+
let fromCache = false;
|
|
12630
|
+
let caching = false;
|
|
12631
|
+
let cacheOff = false;
|
|
12632
|
+
let cacheTimer;
|
|
12633
|
+
let saving = Promise.resolve();
|
|
12604
12634
|
const slot = uuidv73();
|
|
12605
12635
|
const locks = options.outbox?.locks ?? globalThis.navigator?.locks;
|
|
12606
12636
|
let releaseSlot;
|
|
@@ -12637,13 +12667,55 @@ function createVaultChatBackend(options) {
|
|
|
12637
12667
|
}
|
|
12638
12668
|
return out;
|
|
12639
12669
|
};
|
|
12670
|
+
const cacheSnapshot = () => {
|
|
12671
|
+
const kept = [...threads.keys()].filter((id2) => complete.has(id2) && confirmedLive(id2));
|
|
12672
|
+
const keep = new Set(kept);
|
|
12673
|
+
return {
|
|
12674
|
+
account: cache.account,
|
|
12675
|
+
cursor: cursor ?? "",
|
|
12676
|
+
records: [...confirmed.values()].filter(
|
|
12677
|
+
({ record: record2 }) => record2.kind === "conversation" || record2.kind !== "project" && keep.has(record2.conversationId)
|
|
12678
|
+
),
|
|
12679
|
+
threads: kept,
|
|
12680
|
+
absent: [...checked].filter((k) => {
|
|
12681
|
+
const [kind, ...rest] = k.split("/");
|
|
12682
|
+
return (kind === "summary" || kind === "memory_links") && !confirmed.has(k) && keep.has(rest.join("/"));
|
|
12683
|
+
})
|
|
12684
|
+
};
|
|
12685
|
+
};
|
|
12686
|
+
const saveCache = () => {
|
|
12687
|
+
if (!cache || !caching || cacheOff || closed || cacheTimer || cursor === void 0) return;
|
|
12688
|
+
cacheTimer = setTimeout(() => {
|
|
12689
|
+
cacheTimer = void 0;
|
|
12690
|
+
saving = saving.then(
|
|
12691
|
+
() => cacheOff || closed ? void 0 : saveChatCache(cache.storage, cache.seal.encrypt, cacheSnapshot())
|
|
12692
|
+
).catch(() => void 0);
|
|
12693
|
+
}, cacheSaveDelayMs);
|
|
12694
|
+
};
|
|
12695
|
+
const clearCache = async () => {
|
|
12696
|
+
fromCache = false;
|
|
12697
|
+
cacheOff = true;
|
|
12698
|
+
clearTimeout(cacheTimer);
|
|
12699
|
+
cacheTimer = void 0;
|
|
12700
|
+
await saving;
|
|
12701
|
+
if (cache) await cache.storage.set(cache.account, null);
|
|
12702
|
+
};
|
|
12703
|
+
const wipeIfTerminal = (error) => {
|
|
12704
|
+
if (error instanceof ChatStoreError && terminalCodes.has(error.code ?? ""))
|
|
12705
|
+
void clearCache().catch(() => void 0);
|
|
12706
|
+
};
|
|
12640
12707
|
const merge = (snapshot) => {
|
|
12641
12708
|
const k = key2(snapshot.record.kind, snapshot.record.id);
|
|
12642
12709
|
const known = confirmed.get(k);
|
|
12643
12710
|
if (known && known.version >= snapshot.version) return false;
|
|
12644
12711
|
confirmed.set(k, snapshot);
|
|
12712
|
+
saveCache();
|
|
12645
12713
|
return true;
|
|
12646
12714
|
};
|
|
12715
|
+
const remote = async () => {
|
|
12716
|
+
await ready();
|
|
12717
|
+
return connected;
|
|
12718
|
+
};
|
|
12647
12719
|
const persist = () => {
|
|
12648
12720
|
const storage = options.outbox;
|
|
12649
12721
|
if (!storage) return Promise.resolve();
|
|
@@ -12698,7 +12770,7 @@ function createVaultChatBackend(options) {
|
|
|
12698
12770
|
return { kind, id: rest.join("/") };
|
|
12699
12771
|
});
|
|
12700
12772
|
if (refs.length === 0) return;
|
|
12701
|
-
const found = await
|
|
12773
|
+
const found = await (await remote()).getMany(refs);
|
|
12702
12774
|
const seen = new Set(found.map((s) => key2(s.record.kind, s.record.id)));
|
|
12703
12775
|
for (const snapshot of found) merge(snapshot);
|
|
12704
12776
|
for (const ref3 of refs) {
|
|
@@ -12706,6 +12778,7 @@ function createVaultChatBackend(options) {
|
|
|
12706
12778
|
if (!seen.has(k)) confirmed.delete(k);
|
|
12707
12779
|
checked.add(k);
|
|
12708
12780
|
}
|
|
12781
|
+
saveCache();
|
|
12709
12782
|
};
|
|
12710
12783
|
const drop = (patch, reason) => {
|
|
12711
12784
|
inflight.delete(patchKey(patch));
|
|
@@ -12760,7 +12833,7 @@ function createVaultChatBackend(options) {
|
|
|
12760
12833
|
sent.push(patch);
|
|
12761
12834
|
}
|
|
12762
12835
|
if (writes.length === 0) return;
|
|
12763
|
-
const results = await
|
|
12836
|
+
const results = await (await remote()).putMany(writes);
|
|
12764
12837
|
results.forEach((snapshot, i) => {
|
|
12765
12838
|
merge(snapshot);
|
|
12766
12839
|
checked.add(patchKey(sent[i]));
|
|
@@ -12794,6 +12867,7 @@ function createVaultChatBackend(options) {
|
|
|
12794
12867
|
}
|
|
12795
12868
|
if (terminalCodes.has(error.code ?? "")) {
|
|
12796
12869
|
stopped = error.code;
|
|
12870
|
+
wipeIfTerminal(error);
|
|
12797
12871
|
reportOutbox();
|
|
12798
12872
|
return "stop";
|
|
12799
12873
|
}
|
|
@@ -12860,6 +12934,7 @@ function createVaultChatBackend(options) {
|
|
|
12860
12934
|
const forget = (k) => {
|
|
12861
12935
|
confirmed.delete(k);
|
|
12862
12936
|
checked.delete(k);
|
|
12937
|
+
saveCache();
|
|
12863
12938
|
};
|
|
12864
12939
|
const forgetConversation = (conversationId) => {
|
|
12865
12940
|
threads.delete(conversationId);
|
|
@@ -12886,9 +12961,10 @@ function createVaultChatBackend(options) {
|
|
|
12886
12961
|
}
|
|
12887
12962
|
const loading = (async () => {
|
|
12888
12963
|
if (!confirmedLive(conversationId)) return;
|
|
12964
|
+
const source = await remote();
|
|
12889
12965
|
let page;
|
|
12890
12966
|
do {
|
|
12891
|
-
const result = await
|
|
12967
|
+
const result = await source.list({
|
|
12892
12968
|
kind: "message",
|
|
12893
12969
|
conversationId,
|
|
12894
12970
|
limit: 200,
|
|
@@ -12898,7 +12974,15 @@ function createVaultChatBackend(options) {
|
|
|
12898
12974
|
page = result.nextCursor;
|
|
12899
12975
|
} while (page);
|
|
12900
12976
|
})();
|
|
12901
|
-
loading.
|
|
12977
|
+
void loading.then(
|
|
12978
|
+
() => {
|
|
12979
|
+
if (threads.get(conversationId) !== loading) return;
|
|
12980
|
+
complete.add(conversationId);
|
|
12981
|
+
saveCache();
|
|
12982
|
+
},
|
|
12983
|
+
() => threads.delete(conversationId)
|
|
12984
|
+
);
|
|
12985
|
+
complete.delete(conversationId);
|
|
12902
12986
|
threads.set(conversationId, loading);
|
|
12903
12987
|
evict();
|
|
12904
12988
|
return loading;
|
|
@@ -12916,20 +13000,58 @@ function createVaultChatBackend(options) {
|
|
|
12916
13000
|
const relevant2 = threads.has(record2.conversationId) || confirmed.has(k) || checked.has(k) && record2.kind !== "message";
|
|
12917
13001
|
if (relevant2 && merge(snapshot)) announce([record2]);
|
|
12918
13002
|
};
|
|
13003
|
+
const listIndex = async (source) => {
|
|
13004
|
+
const index = [];
|
|
13005
|
+
let page;
|
|
13006
|
+
do {
|
|
13007
|
+
const result = await source.list({
|
|
13008
|
+
kind: "conversation",
|
|
13009
|
+
limit: 200,
|
|
13010
|
+
...page ? { cursor: page } : {}
|
|
13011
|
+
});
|
|
13012
|
+
index.push(...result.items);
|
|
13013
|
+
page = result.nextCursor;
|
|
13014
|
+
} while (page);
|
|
13015
|
+
return index;
|
|
13016
|
+
};
|
|
13017
|
+
const catchUp = async (source) => {
|
|
13018
|
+
let next = cursor ?? "";
|
|
13019
|
+
for (; ; ) {
|
|
13020
|
+
const page = await source.changes(next || void 0, { limit: 200 });
|
|
13021
|
+
page.items.forEach(applyRemote);
|
|
13022
|
+
next = page.nextCursor ?? page.changesCursor;
|
|
13023
|
+
if (!page.nextCursor) break;
|
|
13024
|
+
}
|
|
13025
|
+
cursor = next;
|
|
13026
|
+
};
|
|
13027
|
+
const refetch = async (source) => {
|
|
13028
|
+
const account = await source.account();
|
|
13029
|
+
const index = await listIndex(source);
|
|
13030
|
+
const reopened = [...threads.keys()];
|
|
13031
|
+
confirmed.clear();
|
|
13032
|
+
checked.clear();
|
|
13033
|
+
threads.clear();
|
|
13034
|
+
complete.clear();
|
|
13035
|
+
cursor = account.changesCursor ?? "";
|
|
13036
|
+
index.forEach(merge);
|
|
13037
|
+
emit({ type: "conversations", origin: "remote" });
|
|
13038
|
+
for (const conversationId of reopened)
|
|
13039
|
+
emit({ type: "messages", conversationId, origin: "remote" });
|
|
13040
|
+
};
|
|
12919
13041
|
const poll = () => {
|
|
12920
13042
|
polling ?? (polling = (async () => {
|
|
12921
|
-
await
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
}
|
|
12929
|
-
cursor = next;
|
|
13043
|
+
const source = await remote();
|
|
13044
|
+
try {
|
|
13045
|
+
await catchUp(source);
|
|
13046
|
+
} catch (error) {
|
|
13047
|
+
if (!cursorRejected(error)) throw error;
|
|
13048
|
+
await refetch(source);
|
|
13049
|
+
}
|
|
12930
13050
|
pollFailures = 0;
|
|
12931
|
-
|
|
13051
|
+
saveCache();
|
|
13052
|
+
})().catch((error) => {
|
|
12932
13053
|
pollFailures++;
|
|
13054
|
+
wipeIfTerminal(error);
|
|
12933
13055
|
}).finally(() => {
|
|
12934
13056
|
polling = null;
|
|
12935
13057
|
schedulePoll();
|
|
@@ -12945,26 +13067,27 @@ function createVaultChatBackend(options) {
|
|
|
12945
13067
|
};
|
|
12946
13068
|
const ready = () => {
|
|
12947
13069
|
readyPromise ?? (readyPromise = (async () => {
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
});
|
|
12957
|
-
result.items.forEach(merge);
|
|
12958
|
-
page = result.nextCursor;
|
|
12959
|
-
} while (page);
|
|
13070
|
+
await seeding;
|
|
13071
|
+
if (!connected && typeof options.store === "function") connected = await options.store();
|
|
13072
|
+
const source = connected;
|
|
13073
|
+
const account = await source.account();
|
|
13074
|
+
if (!fromCache) {
|
|
13075
|
+
cursor = account.changesCursor ?? "";
|
|
13076
|
+
(await listIndex(source)).forEach(merge);
|
|
13077
|
+
}
|
|
12960
13078
|
await adopt();
|
|
12961
13079
|
schedulePoll();
|
|
12962
13080
|
})());
|
|
12963
|
-
readyPromise.catch(() => {
|
|
13081
|
+
readyPromise.catch((error) => {
|
|
12964
13082
|
readyPromise = null;
|
|
13083
|
+
wipeIfTerminal(error);
|
|
12965
13084
|
});
|
|
12966
13085
|
return readyPromise;
|
|
12967
13086
|
};
|
|
13087
|
+
const available2 = async () => {
|
|
13088
|
+
await seeding;
|
|
13089
|
+
if (!fromCache) await ready();
|
|
13090
|
+
};
|
|
12968
13091
|
const adoptSlot = async (outbox, other) => {
|
|
12969
13092
|
const patches = await loadOutbox(outbox.storage, other, outbox.seal.decrypt);
|
|
12970
13093
|
for (const patch of patches) {
|
|
@@ -13009,20 +13132,20 @@ function createVaultChatBackend(options) {
|
|
|
13009
13132
|
});
|
|
13010
13133
|
if (channel) channel.onmessage = () => void poll();
|
|
13011
13134
|
const conversation = async (conversationId) => {
|
|
13012
|
-
await
|
|
13135
|
+
await available2();
|
|
13013
13136
|
const k = key2("conversation", conversationId);
|
|
13014
13137
|
if (!view(k) && !checked.has(k)) {
|
|
13015
|
-
const found = await
|
|
13138
|
+
const found = await (await remote()).get("conversation", conversationId);
|
|
13016
13139
|
checked.add(k);
|
|
13017
13140
|
if (found) merge(found);
|
|
13018
13141
|
}
|
|
13019
13142
|
return view(k);
|
|
13020
13143
|
};
|
|
13021
13144
|
const message = async (uniqueId) => {
|
|
13022
|
-
await
|
|
13145
|
+
await available2();
|
|
13023
13146
|
const k = key2("message", uniqueId);
|
|
13024
13147
|
if (!view(k) && !checked.has(k)) {
|
|
13025
|
-
const found = await
|
|
13148
|
+
const found = await (await remote()).get("message", uniqueId);
|
|
13026
13149
|
checked.add(k);
|
|
13027
13150
|
if (found) merge(found);
|
|
13028
13151
|
}
|
|
@@ -13030,17 +13153,18 @@ function createVaultChatBackend(options) {
|
|
|
13030
13153
|
return record2 && !record2.isDeleted && conversationLive(record2.conversationId) ? record2 : void 0;
|
|
13031
13154
|
};
|
|
13032
13155
|
const child = async (kind, conversationId) => {
|
|
13033
|
-
await
|
|
13156
|
+
await available2();
|
|
13034
13157
|
const k = key2(kind, conversationId);
|
|
13035
13158
|
if (!view(k) && !checked.has(k) && conversationLive(conversationId)) {
|
|
13036
|
-
const found = await
|
|
13159
|
+
const found = await (await remote()).get(kind, conversationId);
|
|
13037
13160
|
checked.add(k);
|
|
13038
13161
|
if (found) merge(found);
|
|
13162
|
+
saveCache();
|
|
13039
13163
|
}
|
|
13040
13164
|
return view(k);
|
|
13041
13165
|
};
|
|
13042
13166
|
const thread = async (conversationId) => {
|
|
13043
|
-
await
|
|
13167
|
+
await available2();
|
|
13044
13168
|
if (!conversationLive(conversationId)) return [];
|
|
13045
13169
|
await loadThread(conversationId);
|
|
13046
13170
|
return all("message", conversationId).sort(
|
|
@@ -13104,7 +13228,7 @@ function createVaultChatBackend(options) {
|
|
|
13104
13228
|
return record2 && !record2.isDeleted ? toConversation(record2) : null;
|
|
13105
13229
|
},
|
|
13106
13230
|
async getConversations(query) {
|
|
13107
|
-
await
|
|
13231
|
+
await available2();
|
|
13108
13232
|
return all("conversation").map(toConversation).filter(
|
|
13109
13233
|
(c) => query?.projectId === void 0 || (query.projectId === null ? !c.projectId : c.projectId === query.projectId)
|
|
13110
13234
|
).sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
|
|
@@ -13174,7 +13298,7 @@ function createVaultChatBackend(options) {
|
|
|
13174
13298
|
return toSkeletons(await thread(conversationId));
|
|
13175
13299
|
},
|
|
13176
13300
|
async getMessagesByIds(uniqueIds) {
|
|
13177
|
-
await
|
|
13301
|
+
await available2();
|
|
13178
13302
|
const ids = [...new Set(uniqueIds)];
|
|
13179
13303
|
const unknown = ids.map((id2) => key2("message", id2)).filter((k) => !view(k) && !checked.has(k));
|
|
13180
13304
|
await refresh(unknown);
|
|
@@ -13306,7 +13430,7 @@ function createVaultChatBackend(options) {
|
|
|
13306
13430
|
);
|
|
13307
13431
|
},
|
|
13308
13432
|
async getAllFiles(query) {
|
|
13309
|
-
await
|
|
13433
|
+
await available2();
|
|
13310
13434
|
if (query?.conversationId) await loadThread(query.conversationId);
|
|
13311
13435
|
const files = [];
|
|
13312
13436
|
for (const record2 of all("message", query?.conversationId)) {
|
|
@@ -13331,7 +13455,7 @@ function createVaultChatBackend(options) {
|
|
|
13331
13455
|
const vector2 = acceptedVector(queryVector);
|
|
13332
13456
|
if (!vector2) return [];
|
|
13333
13457
|
await flush();
|
|
13334
|
-
const hits = await
|
|
13458
|
+
const hits = await (await remote()).search(vector2, {
|
|
13335
13459
|
limit: Math.min(50, limit),
|
|
13336
13460
|
kinds: ["message"],
|
|
13337
13461
|
...conversationId ? { conversationId } : {},
|
|
@@ -13438,8 +13562,9 @@ function createVaultChatBackend(options) {
|
|
|
13438
13562
|
let messageCount = 0;
|
|
13439
13563
|
try {
|
|
13440
13564
|
for (const batch of batches(conversations))
|
|
13441
|
-
conversationCount += await
|
|
13442
|
-
for (const batch of batches(messages))
|
|
13565
|
+
conversationCount += await connected.importRecords(batch);
|
|
13566
|
+
for (const batch of batches(messages))
|
|
13567
|
+
messageCount += await connected.importRecords(batch);
|
|
13443
13568
|
} finally {
|
|
13444
13569
|
for (const { record: record2 } of messages) checked.delete(key2("message", record2.id));
|
|
13445
13570
|
await refresh(conversations.map(({ record: record2 }) => key2("conversation", record2.id))).catch(
|
|
@@ -13454,8 +13579,10 @@ function createVaultChatBackend(options) {
|
|
|
13454
13579
|
return { conversations: conversationCount, messages: messageCount };
|
|
13455
13580
|
},
|
|
13456
13581
|
status: () => ({ pending: pending.size + inflight.size, ...stopped ? { stopped } : {} }),
|
|
13582
|
+
clearCache,
|
|
13457
13583
|
close() {
|
|
13458
13584
|
closed = true;
|
|
13585
|
+
clearTimeout(cacheTimer);
|
|
13459
13586
|
clearTimeout(flushTimer);
|
|
13460
13587
|
clearTimeout(retryTimer);
|
|
13461
13588
|
clearTimeout(pollTimer);
|
|
@@ -13472,7 +13599,31 @@ function createVaultChatBackend(options) {
|
|
|
13472
13599
|
emit({ type: "conversations", origin: "local" });
|
|
13473
13600
|
return true;
|
|
13474
13601
|
};
|
|
13602
|
+
const seed = async () => {
|
|
13603
|
+
if (!cache) return;
|
|
13604
|
+
try {
|
|
13605
|
+
const snapshot = await loadChatCache(cache.storage, cache.account, cache.seal.decrypt).catch(
|
|
13606
|
+
() => void 0
|
|
13607
|
+
);
|
|
13608
|
+
if (!snapshot || cacheOff) return;
|
|
13609
|
+
snapshot.records.forEach(merge);
|
|
13610
|
+
for (const conversationId of snapshot.threads) {
|
|
13611
|
+
if (!confirmedLive(conversationId)) continue;
|
|
13612
|
+
threads.set(conversationId, Promise.resolve());
|
|
13613
|
+
complete.add(conversationId);
|
|
13614
|
+
}
|
|
13615
|
+
evict();
|
|
13616
|
+
for (const k of snapshot.absent) checked.add(k);
|
|
13617
|
+
cursor = snapshot.cursor;
|
|
13618
|
+
fromCache = true;
|
|
13619
|
+
await adopt().catch(() => void 0);
|
|
13620
|
+
} finally {
|
|
13621
|
+
caching = true;
|
|
13622
|
+
}
|
|
13623
|
+
};
|
|
13624
|
+
const seeding = seed();
|
|
13475
13625
|
void ready().catch(() => void 0);
|
|
13626
|
+
if (cache) void seeding.then(() => fromCache ? poll() : void 0);
|
|
13476
13627
|
return backend;
|
|
13477
13628
|
}
|
|
13478
13629
|
function vaultChatBackend(backend) {
|