@anuma/sdk 10.4.2 → 10.5.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 +91 -8
- package/dist/expo/index.d.mts +20 -2
- package/dist/expo/index.d.ts +20 -2
- package/dist/expo/index.mjs +89 -8
- package/dist/index.cjs +69 -4
- package/dist/index.d.mts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.mjs +67 -4
- package/dist/react/index.cjs +146 -47
- package/dist/react/index.d.mts +20 -2
- package/dist/react/index.d.ts +20 -2
- package/dist/react/index.mjs +144 -47
- package/dist/server/index.cjs +17 -0
- package/dist/server/index.mjs +17 -0
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -9172,7 +9172,7 @@ interface BaseUseChatStorageResult {
|
|
|
9172
9172
|
}
|
|
9173
9173
|
declare function generateConversationId(): string;
|
|
9174
9174
|
|
|
9175
|
-
type ChatRecordKind = "conversation" | "message" | "summary" | "project" | "memory_links";
|
|
9175
|
+
type ChatRecordKind = "conversation" | "message" | "summary" | "project" | "memory_links" | "setting";
|
|
9176
9176
|
type ChatJson = null | boolean | number | string | ChatJson[] | {
|
|
9177
9177
|
[key: string]: ChatJson;
|
|
9178
9178
|
};
|
|
@@ -9298,8 +9298,10 @@ interface ChatStore {
|
|
|
9298
9298
|
importRecords(records: readonly ChatImport[], signal?: AbortSignal): Promise<number>;
|
|
9299
9299
|
verify(revisions: readonly ChatRevision[], signal?: AbortSignal): Promise<ChatRef[]>;
|
|
9300
9300
|
activate(signal?: AbortSignal): Promise<boolean>;
|
|
9301
|
+
/** Without `kinds`, vault returns every kind except `setting`. */
|
|
9301
9302
|
changes(cursor?: string, options?: {
|
|
9302
9303
|
limit?: number;
|
|
9304
|
+
kinds?: readonly ChatRecordKind[];
|
|
9303
9305
|
signal?: AbortSignal;
|
|
9304
9306
|
}): Promise<ChatChanges>;
|
|
9305
9307
|
search(embedding: readonly number[], options?: ChatSearchOptions): Promise<ChatSearchHit[]>;
|
|
@@ -9370,6 +9372,22 @@ declare function migrateChatsToRemote(options: ChatMigrationOptions): Promise<Ch
|
|
|
9370
9372
|
/** Connect to owner-scoped server storage using the account's canonical device-held cipher. */
|
|
9371
9373
|
declare function createRemoteChatStore(options: RemoteChatStoreOptions): Promise<ChatStore>;
|
|
9372
9374
|
|
|
9375
|
+
interface Setting {
|
|
9376
|
+
section: string;
|
|
9377
|
+
data: {
|
|
9378
|
+
[key: string]: ChatJson;
|
|
9379
|
+
};
|
|
9380
|
+
version: number;
|
|
9381
|
+
createdAt: number;
|
|
9382
|
+
updatedAt: number;
|
|
9383
|
+
}
|
|
9384
|
+
/** Every stored settings section, keyed by section name. */
|
|
9385
|
+
declare function loadSettings(store: ChatStore, signal?: AbortSignal): Promise<Map<string, Setting>>;
|
|
9386
|
+
/** Replaces one section with `data`; the last save of a section wins across devices. */
|
|
9387
|
+
declare function saveSetting(store: ChatStore, section: string, data: {
|
|
9388
|
+
[key: string]: ChatJson;
|
|
9389
|
+
}, signal?: AbortSignal): Promise<Setting>;
|
|
9390
|
+
|
|
9373
9391
|
/**
|
|
9374
9392
|
* AES-GCM keys derived from one wallet signature over `SIGN_MESSAGE`.
|
|
9375
9393
|
* @public
|
|
@@ -16295,4 +16313,4 @@ type UseWalletBindingResult = {
|
|
|
16295
16313
|
*/
|
|
16296
16314
|
declare function useWalletBinding(options?: UseWalletBindingOptions): UseWalletBindingResult;
|
|
16297
16315
|
|
|
16298
|
-
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 LocalMessageAttachment, 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 MessageAttachmentMigrationOptions, type MessageAttachmentMigrationResult, 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 VaultAttachmentCache, type VaultAttachmentJournal, type VaultAttachmentOwner, type VaultAttachmentRef, type VaultAttachmentUploadOptions, type VaultAttachments, type VaultAttachmentsOptions, 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, createVaultAttachments, 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, maxVaultAttachmentBytes, mediaToStored, memoryCipher, migrateChatsToRemote, migrateDisplayResult, migrateMemoriesToRemote, migrateMessageAttachments, 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, vaultAttachmentRefs, vaultChatBackend, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
|
|
16316
|
+
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 LocalMessageAttachment, 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 MessageAttachmentMigrationOptions, type MessageAttachmentMigrationResult, 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 Setting, 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 VaultAttachmentCache, type VaultAttachmentJournal, type VaultAttachmentOwner, type VaultAttachmentRef, type VaultAttachmentUploadOptions, type VaultAttachments, type VaultAttachmentsOptions, 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, createVaultAttachments, 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, loadSettings, localChatBackend, maskScopedEmbeddingCache, maxVaultAttachmentBytes, mediaToStored, memoryCipher, migrateChatsToRemote, migrateDisplayResult, migrateMemoriesToRemote, migrateMessageAttachments, 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, saveSetting, 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, vaultAttachmentRefs, vaultChatBackend, verifyMemoriesForPublish, walk, webPlatformStorage, withActiveToolSetServerTools, withInternalFlowMarker, writeEncryptedFile };
|
package/dist/react/index.mjs
CHANGED
|
@@ -86,6 +86,7 @@ function notifyKeyAvailable(address) {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
var keyPairStore = /* @__PURE__ */ new Map();
|
|
89
|
+
var pendingKeyPairRequests = /* @__PURE__ */ new Map();
|
|
89
90
|
function getStoredKeyByVersion(address, version) {
|
|
90
91
|
const keys = encryptionKeyStore.get(address);
|
|
91
92
|
if (!keys) return null;
|
|
@@ -108,6 +109,7 @@ function clearAllEncryptionState() {
|
|
|
108
109
|
cryptoKeyCache.clear();
|
|
109
110
|
keyAvailableCallbacks.clear();
|
|
110
111
|
pendingKeyRequests.clear();
|
|
112
|
+
pendingKeyPairRequests.clear();
|
|
111
113
|
pendingCandidateDerives.clear();
|
|
112
114
|
refreshCandidatesByAddress.clear();
|
|
113
115
|
divergentDeriveAddresses.clear();
|
|
@@ -775,6 +777,21 @@ async function requestKeyPair(walletAddress, signMessage, embeddedWalletSigner)
|
|
|
775
777
|
if (existingKeyPair) {
|
|
776
778
|
return;
|
|
777
779
|
}
|
|
780
|
+
const pending = pendingKeyPairRequests.get(walletAddress);
|
|
781
|
+
if (pending) {
|
|
782
|
+
return pending;
|
|
783
|
+
}
|
|
784
|
+
const promise = loadOrCreateKeyPair(walletAddress, signMessage, embeddedWalletSigner);
|
|
785
|
+
pendingKeyPairRequests.set(walletAddress, promise);
|
|
786
|
+
try {
|
|
787
|
+
await promise;
|
|
788
|
+
} finally {
|
|
789
|
+
if (pendingKeyPairRequests.get(walletAddress) === promise) {
|
|
790
|
+
pendingKeyPairRequests.delete(walletAddress);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
async function loadOrCreateKeyPair(walletAddress, signMessage, embeddedWalletSigner) {
|
|
778
795
|
const startEpoch = sessionEpoch;
|
|
779
796
|
try {
|
|
780
797
|
const persistedKeyPair = await loadPersistedKeyPair(walletAddress);
|
|
@@ -11608,7 +11625,7 @@ var ChatStoreError = class extends Error {
|
|
|
11608
11625
|
};
|
|
11609
11626
|
|
|
11610
11627
|
// src/lib/chatStore/remote.ts
|
|
11611
|
-
var kinds = /* @__PURE__ */ new Set(["conversation", "message", "summary", "project", "memory_links"]);
|
|
11628
|
+
var kinds = /* @__PURE__ */ new Set(["conversation", "message", "summary", "project", "memory_links", "setting"]);
|
|
11612
11629
|
var cipherPattern = /^enc:v\d+:(?:[0-9a-f]{2}){28,}$/i;
|
|
11613
11630
|
var maxPayload = 2 * 1024 * 1024;
|
|
11614
11631
|
var storedDims2 = 1536;
|
|
@@ -11664,9 +11681,12 @@ function validRecord(value) {
|
|
|
11664
11681
|
(key3) => ![...metadata, "data"].includes(key3)
|
|
11665
11682
|
))
|
|
11666
11683
|
return false;
|
|
11667
|
-
const root = value.kind
|
|
11684
|
+
const root = rootKind(value.kind);
|
|
11668
11685
|
return root ? value.conversationId === "" : id(value.conversationId);
|
|
11669
11686
|
}
|
|
11687
|
+
function rootKind(kind) {
|
|
11688
|
+
return kind === "conversation" || kind === "project" || kind === "setting";
|
|
11689
|
+
}
|
|
11670
11690
|
function embeddings(write) {
|
|
11671
11691
|
if (write.embeddings === void 0) return true;
|
|
11672
11692
|
return Array.isArray(write.embeddings) && !write.record.isDeleted && (write.record.kind === "message" || write.record.kind === "summary") && write.embeddings.length <= maxChunksPerRecord && (write.embeddingModel === void 0 || typeof write.embeddingModel === "string" && write.embeddingModel.length <= 256) && Array.from({ length: write.embeddings.length }, (_, i) => i).every(
|
|
@@ -11874,7 +11894,7 @@ async function createRemoteChatStore(options) {
|
|
|
11874
11894
|
async list(query) {
|
|
11875
11895
|
const limit = query.limit ?? 20;
|
|
11876
11896
|
const parent = query.conversationId ?? "";
|
|
11877
|
-
if (!kinds.has(query.kind) || !integer(limit, 1) || query.includeDeleted !== void 0 && typeof query.includeDeleted !== "boolean" || limit > 200 || (query.cursor?.length ?? 0) > 2048 || (query.kind
|
|
11897
|
+
if (!kinds.has(query.kind) || !integer(limit, 1) || query.includeDeleted !== void 0 && typeof query.includeDeleted !== "boolean" || limit > 200 || (query.cursor?.length ?? 0) > 2048 || (rootKind(query.kind) ? parent !== "" : !id(parent)))
|
|
11878
11898
|
invalid();
|
|
11879
11899
|
const params = new URLSearchParams({
|
|
11880
11900
|
account_id: String(accountId),
|
|
@@ -12017,10 +12037,12 @@ async function createRemoteChatStore(options) {
|
|
|
12017
12037
|
},
|
|
12018
12038
|
async changes(cursor, options2) {
|
|
12019
12039
|
const limit = options2?.limit ?? 100;
|
|
12020
|
-
|
|
12040
|
+
const kindsFilter = options2?.kinds;
|
|
12041
|
+
if (!integer(limit, 1) || limit > 200 || cursor !== void 0 && (!text5(cursor) || cursor.length > 2048) || kindsFilter !== void 0 && (!Array.isArray(kindsFilter) || kindsFilter.length === 0 || new Set(kindsFilter).size !== kindsFilter.length || kindsFilter.some((k) => !kinds.has(k))))
|
|
12021
12042
|
invalid();
|
|
12022
12043
|
const params = new URLSearchParams({ account_id: String(accountId), limit: String(limit) });
|
|
12023
12044
|
if (cursor) params.set("cursor", cursor);
|
|
12045
|
+
if (kindsFilter) params.set("kinds", kindsFilter.join(","));
|
|
12024
12046
|
const value = await request(`/changes?${params}`, {}, options2?.signal);
|
|
12025
12047
|
if (!object(value) || !Array.isArray(value.items) || value.items.length > limit || value.next_cursor !== void 0 && !text5(value.next_cursor) || value.changes_cursor !== void 0 && !text5(value.changes_cursor))
|
|
12026
12048
|
invalid();
|
|
@@ -12431,6 +12453,62 @@ async function migrateChatsToRemote(options) {
|
|
|
12431
12453
|
return passes(false);
|
|
12432
12454
|
}
|
|
12433
12455
|
|
|
12456
|
+
// src/lib/chatStore/settings.ts
|
|
12457
|
+
var maxSaveAttempts = 3;
|
|
12458
|
+
function toSetting(snapshot) {
|
|
12459
|
+
if (snapshot.record.isDeleted) return null;
|
|
12460
|
+
return {
|
|
12461
|
+
section: snapshot.record.id,
|
|
12462
|
+
data: snapshot.record.data,
|
|
12463
|
+
version: snapshot.version,
|
|
12464
|
+
createdAt: snapshot.record.createdAt,
|
|
12465
|
+
updatedAt: snapshot.record.updatedAt
|
|
12466
|
+
};
|
|
12467
|
+
}
|
|
12468
|
+
async function loadSettings(store, signal) {
|
|
12469
|
+
const out = /* @__PURE__ */ new Map();
|
|
12470
|
+
let cursor;
|
|
12471
|
+
do {
|
|
12472
|
+
const page = await store.list({ kind: "setting", limit: 100, cursor, signal });
|
|
12473
|
+
for (const item of page.items) {
|
|
12474
|
+
const setting = toSetting(item);
|
|
12475
|
+
if (setting) out.set(setting.section, setting);
|
|
12476
|
+
}
|
|
12477
|
+
cursor = page.nextCursor;
|
|
12478
|
+
} while (cursor);
|
|
12479
|
+
return out;
|
|
12480
|
+
}
|
|
12481
|
+
async function saveSetting(store, section, data, signal) {
|
|
12482
|
+
for (let attempt = 1; ; attempt++) {
|
|
12483
|
+
const current = await store.get("setting", section, signal);
|
|
12484
|
+
const now = Date.now();
|
|
12485
|
+
try {
|
|
12486
|
+
const [saved] = await store.putMany(
|
|
12487
|
+
[
|
|
12488
|
+
{
|
|
12489
|
+
record: {
|
|
12490
|
+
kind: "setting",
|
|
12491
|
+
id: section,
|
|
12492
|
+
conversationId: "",
|
|
12493
|
+
sortKey: 0,
|
|
12494
|
+
createdAt: current?.record.createdAt ?? now,
|
|
12495
|
+
updatedAt: Math.max(now, (current?.record.updatedAt ?? 0) + 1),
|
|
12496
|
+
isDeleted: false,
|
|
12497
|
+
data
|
|
12498
|
+
},
|
|
12499
|
+
expectedVersion: current?.version ?? 0
|
|
12500
|
+
}
|
|
12501
|
+
],
|
|
12502
|
+
signal
|
|
12503
|
+
);
|
|
12504
|
+
return toSetting(saved);
|
|
12505
|
+
} catch (error) {
|
|
12506
|
+
if (!(error instanceof ChatStoreError) || error.code !== "version_conflict" || attempt >= maxSaveAttempts)
|
|
12507
|
+
throw error;
|
|
12508
|
+
}
|
|
12509
|
+
}
|
|
12510
|
+
}
|
|
12511
|
+
|
|
12434
12512
|
// src/lib/chatStore/vaultAttachments.ts
|
|
12435
12513
|
var frameVersion = 1;
|
|
12436
12514
|
var ivBytes = 12;
|
|
@@ -37483,6 +37561,7 @@ function useCredits(options = {}) {
|
|
|
37483
37561
|
const baseUrlRef = useRef5(baseUrl);
|
|
37484
37562
|
const onErrorRef = useRef5(onError);
|
|
37485
37563
|
const abortControllerRef = useRef5(null);
|
|
37564
|
+
const hasFetchedRef = useRef5(false);
|
|
37486
37565
|
useEffect6(() => {
|
|
37487
37566
|
getTokenRef.current = getToken;
|
|
37488
37567
|
baseUrlRef.current = baseUrl;
|
|
@@ -37490,6 +37569,7 @@ function useCredits(options = {}) {
|
|
|
37490
37569
|
});
|
|
37491
37570
|
useEffect6(() => {
|
|
37492
37571
|
return () => {
|
|
37572
|
+
hasFetchedRef.current = false;
|
|
37493
37573
|
if (abortControllerRef.current) {
|
|
37494
37574
|
abortControllerRef.current.abort();
|
|
37495
37575
|
abortControllerRef.current = null;
|
|
@@ -37537,14 +37617,14 @@ function useCredits(options = {}) {
|
|
|
37537
37617
|
headers,
|
|
37538
37618
|
signal
|
|
37539
37619
|
});
|
|
37620
|
+
if (signal.aborted) return;
|
|
37540
37621
|
if (response.error) {
|
|
37541
37622
|
const errorMsg = response.error.error ?? "Failed to fetch credit balance";
|
|
37542
|
-
throw new Error(errorMsg);
|
|
37623
|
+
throw Object.assign(new Error(errorMsg), { cause: response.error });
|
|
37543
37624
|
}
|
|
37544
|
-
if (signal.aborted) return;
|
|
37545
37625
|
setBalance(response.data ?? null);
|
|
37546
37626
|
} catch (err) {
|
|
37547
|
-
if (err instanceof Error && err.name === "AbortError") return;
|
|
37627
|
+
if (signal.aborted || err instanceof Error && err.name === "AbortError") return;
|
|
37548
37628
|
handleError(err);
|
|
37549
37629
|
} finally {
|
|
37550
37630
|
stopLoading();
|
|
@@ -37606,7 +37686,6 @@ function useCredits(options = {}) {
|
|
|
37606
37686
|
},
|
|
37607
37687
|
[getHeaders, handleError, startLoading, stopLoading]
|
|
37608
37688
|
);
|
|
37609
|
-
const hasFetchedRef = useRef5(false);
|
|
37610
37689
|
useEffect6(() => {
|
|
37611
37690
|
if (autoFetch && !hasFetchedRef.current) {
|
|
37612
37691
|
hasFetchedRef.current = true;
|
|
@@ -39536,6 +39615,8 @@ function useSubscription(options = {}) {
|
|
|
39536
39615
|
const baseUrlRef = useRef8(baseUrl);
|
|
39537
39616
|
const onErrorRef = useRef8(onError);
|
|
39538
39617
|
const abortControllerRef = useRef8(null);
|
|
39618
|
+
const hasFetchedRef = useRef8(false);
|
|
39619
|
+
const loadingCountRef = useRef8(0);
|
|
39539
39620
|
useEffect12(() => {
|
|
39540
39621
|
getTokenRef.current = getToken;
|
|
39541
39622
|
baseUrlRef.current = baseUrl;
|
|
@@ -39543,12 +39624,21 @@ function useSubscription(options = {}) {
|
|
|
39543
39624
|
});
|
|
39544
39625
|
useEffect12(() => {
|
|
39545
39626
|
return () => {
|
|
39627
|
+
hasFetchedRef.current = false;
|
|
39546
39628
|
if (abortControllerRef.current) {
|
|
39547
39629
|
abortControllerRef.current.abort();
|
|
39548
39630
|
abortControllerRef.current = null;
|
|
39549
39631
|
}
|
|
39550
39632
|
};
|
|
39551
39633
|
}, []);
|
|
39634
|
+
const startLoading = useCallback18(() => {
|
|
39635
|
+
loadingCountRef.current++;
|
|
39636
|
+
setIsLoading(true);
|
|
39637
|
+
}, []);
|
|
39638
|
+
const stopLoading = useCallback18(() => {
|
|
39639
|
+
loadingCountRef.current = Math.max(0, loadingCountRef.current - 1);
|
|
39640
|
+
setIsLoading(loadingCountRef.current > 0);
|
|
39641
|
+
}, []);
|
|
39552
39642
|
const getHeaders = useCallback18(async () => {
|
|
39553
39643
|
const headers = {};
|
|
39554
39644
|
if (getTokenRef.current) {
|
|
@@ -39572,7 +39662,7 @@ function useSubscription(options = {}) {
|
|
|
39572
39662
|
const abortController = new AbortController();
|
|
39573
39663
|
abortControllerRef.current = abortController;
|
|
39574
39664
|
const signal = abortController.signal;
|
|
39575
|
-
|
|
39665
|
+
startLoading();
|
|
39576
39666
|
setError(null);
|
|
39577
39667
|
try {
|
|
39578
39668
|
const headers = await getHeaders();
|
|
@@ -39582,33 +39672,31 @@ function useSubscription(options = {}) {
|
|
|
39582
39672
|
headers,
|
|
39583
39673
|
signal
|
|
39584
39674
|
});
|
|
39675
|
+
if (signal.aborted) return;
|
|
39585
39676
|
if (response.error) {
|
|
39586
39677
|
const errorMsg = response.error.error ?? "Failed to fetch subscription status";
|
|
39587
|
-
throw new Error(errorMsg);
|
|
39678
|
+
throw Object.assign(new Error(errorMsg), { cause: response.error });
|
|
39588
39679
|
}
|
|
39589
|
-
if (signal.aborted) return;
|
|
39590
39680
|
setStatus(response.data ?? null);
|
|
39591
39681
|
} catch (err) {
|
|
39592
|
-
if (err instanceof Error && err.name === "AbortError") {
|
|
39682
|
+
if (signal.aborted || err instanceof Error && err.name === "AbortError") {
|
|
39593
39683
|
return;
|
|
39594
39684
|
}
|
|
39595
39685
|
handleError(err);
|
|
39596
39686
|
} finally {
|
|
39597
|
-
|
|
39598
|
-
setIsLoading(false);
|
|
39599
|
-
}
|
|
39687
|
+
stopLoading();
|
|
39600
39688
|
if (abortControllerRef.current === abortController) {
|
|
39601
39689
|
abortControllerRef.current = null;
|
|
39602
39690
|
}
|
|
39603
39691
|
}
|
|
39604
|
-
}, [getHeaders, handleError]);
|
|
39692
|
+
}, [getHeaders, handleError, startLoading, stopLoading]);
|
|
39605
39693
|
const refetch = useCallback18(async () => {
|
|
39606
39694
|
setStatus(null);
|
|
39607
39695
|
await fetchStatus();
|
|
39608
39696
|
}, [fetchStatus]);
|
|
39609
39697
|
const createCheckoutSession = useCallback18(
|
|
39610
39698
|
async (opts) => {
|
|
39611
|
-
|
|
39699
|
+
startLoading();
|
|
39612
39700
|
setError(null);
|
|
39613
39701
|
try {
|
|
39614
39702
|
const headers = await getHeaders();
|
|
@@ -39631,14 +39719,14 @@ function useSubscription(options = {}) {
|
|
|
39631
39719
|
handleError(err);
|
|
39632
39720
|
return null;
|
|
39633
39721
|
} finally {
|
|
39634
|
-
|
|
39722
|
+
stopLoading();
|
|
39635
39723
|
}
|
|
39636
39724
|
},
|
|
39637
|
-
[getHeaders, handleError]
|
|
39725
|
+
[getHeaders, handleError, startLoading, stopLoading]
|
|
39638
39726
|
);
|
|
39639
39727
|
const openCustomerPortal = useCallback18(
|
|
39640
39728
|
async (opts) => {
|
|
39641
|
-
|
|
39729
|
+
startLoading();
|
|
39642
39730
|
setError(null);
|
|
39643
39731
|
try {
|
|
39644
39732
|
const headers = await getHeaders();
|
|
@@ -39658,13 +39746,13 @@ function useSubscription(options = {}) {
|
|
|
39658
39746
|
handleError(err);
|
|
39659
39747
|
return null;
|
|
39660
39748
|
} finally {
|
|
39661
|
-
|
|
39749
|
+
stopLoading();
|
|
39662
39750
|
}
|
|
39663
39751
|
},
|
|
39664
|
-
[getHeaders, handleError]
|
|
39752
|
+
[getHeaders, handleError, startLoading, stopLoading]
|
|
39665
39753
|
);
|
|
39666
39754
|
const cancelSubscription = useCallback18(async () => {
|
|
39667
|
-
|
|
39755
|
+
startLoading();
|
|
39668
39756
|
setError(null);
|
|
39669
39757
|
try {
|
|
39670
39758
|
const headers = await getHeaders();
|
|
@@ -39682,11 +39770,11 @@ function useSubscription(options = {}) {
|
|
|
39682
39770
|
handleError(err);
|
|
39683
39771
|
return null;
|
|
39684
39772
|
} finally {
|
|
39685
|
-
|
|
39773
|
+
stopLoading();
|
|
39686
39774
|
}
|
|
39687
|
-
}, [getHeaders, handleError, fetchStatus]);
|
|
39775
|
+
}, [getHeaders, handleError, startLoading, stopLoading, fetchStatus]);
|
|
39688
39776
|
const renewSubscription = useCallback18(async () => {
|
|
39689
|
-
|
|
39777
|
+
startLoading();
|
|
39690
39778
|
setError(null);
|
|
39691
39779
|
try {
|
|
39692
39780
|
const headers = await getHeaders();
|
|
@@ -39704,10 +39792,9 @@ function useSubscription(options = {}) {
|
|
|
39704
39792
|
handleError(err);
|
|
39705
39793
|
return null;
|
|
39706
39794
|
} finally {
|
|
39707
|
-
|
|
39795
|
+
stopLoading();
|
|
39708
39796
|
}
|
|
39709
|
-
}, [getHeaders, handleError, fetchStatus]);
|
|
39710
|
-
const hasFetchedRef = useRef8(false);
|
|
39797
|
+
}, [getHeaders, handleError, startLoading, stopLoading, fetchStatus]);
|
|
39711
39798
|
useEffect12(() => {
|
|
39712
39799
|
if (autoFetch && !hasFetchedRef.current) {
|
|
39713
39800
|
hasFetchedRef.current = true;
|
|
@@ -40271,6 +40358,8 @@ function useWalletBinding(options = {}) {
|
|
|
40271
40358
|
const baseUrlRef = useRef12(baseUrl);
|
|
40272
40359
|
const onErrorRef = useRef12(onError);
|
|
40273
40360
|
const abortControllerRef = useRef12(null);
|
|
40361
|
+
const hasFetchedRef = useRef12(false);
|
|
40362
|
+
const loadingCountRef = useRef12(0);
|
|
40274
40363
|
useEffect14(() => {
|
|
40275
40364
|
getTokenRef.current = getToken;
|
|
40276
40365
|
baseUrlRef.current = baseUrl;
|
|
@@ -40278,12 +40367,21 @@ function useWalletBinding(options = {}) {
|
|
|
40278
40367
|
});
|
|
40279
40368
|
useEffect14(() => {
|
|
40280
40369
|
return () => {
|
|
40370
|
+
hasFetchedRef.current = false;
|
|
40281
40371
|
if (abortControllerRef.current) {
|
|
40282
40372
|
abortControllerRef.current.abort();
|
|
40283
40373
|
abortControllerRef.current = null;
|
|
40284
40374
|
}
|
|
40285
40375
|
};
|
|
40286
40376
|
}, []);
|
|
40377
|
+
const startLoading = useCallback22(() => {
|
|
40378
|
+
loadingCountRef.current++;
|
|
40379
|
+
setIsLoading(true);
|
|
40380
|
+
}, []);
|
|
40381
|
+
const stopLoading = useCallback22(() => {
|
|
40382
|
+
loadingCountRef.current = Math.max(0, loadingCountRef.current - 1);
|
|
40383
|
+
setIsLoading(loadingCountRef.current > 0);
|
|
40384
|
+
}, []);
|
|
40287
40385
|
const getHeaders = useCallback22(async () => {
|
|
40288
40386
|
const headers = {};
|
|
40289
40387
|
if (getTokenRef.current) {
|
|
@@ -40307,7 +40405,7 @@ function useWalletBinding(options = {}) {
|
|
|
40307
40405
|
const abortController = new AbortController();
|
|
40308
40406
|
abortControllerRef.current = abortController;
|
|
40309
40407
|
const signal = abortController.signal;
|
|
40310
|
-
|
|
40408
|
+
startLoading();
|
|
40311
40409
|
setError(null);
|
|
40312
40410
|
try {
|
|
40313
40411
|
const headers = await getHeaders();
|
|
@@ -40317,34 +40415,32 @@ function useWalletBinding(options = {}) {
|
|
|
40317
40415
|
headers,
|
|
40318
40416
|
signal
|
|
40319
40417
|
});
|
|
40418
|
+
if (signal.aborted) return;
|
|
40320
40419
|
if (response.error) {
|
|
40321
40420
|
const errorMsg = response.error.error ?? "Failed to fetch bound wallets";
|
|
40322
|
-
throw new Error(errorMsg);
|
|
40421
|
+
throw Object.assign(new Error(errorMsg), { cause: response.error });
|
|
40323
40422
|
}
|
|
40324
|
-
if (signal.aborted) return;
|
|
40325
40423
|
setWallets(response.data?.wallets ?? []);
|
|
40326
40424
|
setTotals(response.data?.totals ?? null);
|
|
40327
40425
|
} catch (err) {
|
|
40328
|
-
if (err instanceof Error && err.name === "AbortError") {
|
|
40426
|
+
if (signal.aborted || err instanceof Error && err.name === "AbortError") {
|
|
40329
40427
|
return;
|
|
40330
40428
|
}
|
|
40331
40429
|
handleError(err);
|
|
40332
40430
|
} finally {
|
|
40333
|
-
|
|
40334
|
-
setIsLoading(false);
|
|
40335
|
-
}
|
|
40431
|
+
stopLoading();
|
|
40336
40432
|
if (abortControllerRef.current === abortController) {
|
|
40337
40433
|
abortControllerRef.current = null;
|
|
40338
40434
|
}
|
|
40339
40435
|
}
|
|
40340
|
-
}, [getHeaders, handleError]);
|
|
40436
|
+
}, [getHeaders, handleError, startLoading, stopLoading]);
|
|
40341
40437
|
const refetch = useCallback22(async () => {
|
|
40342
40438
|
setWallets([]);
|
|
40343
40439
|
setTotals(null);
|
|
40344
40440
|
await fetchBinding();
|
|
40345
40441
|
}, [fetchBinding]);
|
|
40346
40442
|
const getNonce = useCallback22(async () => {
|
|
40347
|
-
|
|
40443
|
+
startLoading();
|
|
40348
40444
|
setError(null);
|
|
40349
40445
|
try {
|
|
40350
40446
|
const headers = await getHeaders();
|
|
@@ -40361,12 +40457,12 @@ function useWalletBinding(options = {}) {
|
|
|
40361
40457
|
handleError(err);
|
|
40362
40458
|
return null;
|
|
40363
40459
|
} finally {
|
|
40364
|
-
|
|
40460
|
+
stopLoading();
|
|
40365
40461
|
}
|
|
40366
|
-
}, [getHeaders, handleError]);
|
|
40462
|
+
}, [getHeaders, handleError, startLoading, stopLoading]);
|
|
40367
40463
|
const bindWallet = useCallback22(
|
|
40368
40464
|
async (request) => {
|
|
40369
|
-
|
|
40465
|
+
startLoading();
|
|
40370
40466
|
setError(null);
|
|
40371
40467
|
try {
|
|
40372
40468
|
const headers = await getHeaders();
|
|
@@ -40385,14 +40481,14 @@ function useWalletBinding(options = {}) {
|
|
|
40385
40481
|
handleError(err);
|
|
40386
40482
|
return null;
|
|
40387
40483
|
} finally {
|
|
40388
|
-
|
|
40484
|
+
stopLoading();
|
|
40389
40485
|
}
|
|
40390
40486
|
},
|
|
40391
|
-
[getHeaders, handleError, fetchBinding]
|
|
40487
|
+
[getHeaders, handleError, startLoading, stopLoading, fetchBinding]
|
|
40392
40488
|
);
|
|
40393
40489
|
const unbindWallet = useCallback22(
|
|
40394
40490
|
async (address) => {
|
|
40395
|
-
|
|
40491
|
+
startLoading();
|
|
40396
40492
|
setError(null);
|
|
40397
40493
|
try {
|
|
40398
40494
|
const headers = await getHeaders();
|
|
@@ -40411,12 +40507,11 @@ function useWalletBinding(options = {}) {
|
|
|
40411
40507
|
handleError(err);
|
|
40412
40508
|
return false;
|
|
40413
40509
|
} finally {
|
|
40414
|
-
|
|
40510
|
+
stopLoading();
|
|
40415
40511
|
}
|
|
40416
40512
|
},
|
|
40417
|
-
[getHeaders, handleError, fetchBinding]
|
|
40513
|
+
[getHeaders, handleError, startLoading, stopLoading, fetchBinding]
|
|
40418
40514
|
);
|
|
40419
|
-
const hasFetchedRef = useRef12(false);
|
|
40420
40515
|
useEffect14(() => {
|
|
40421
40516
|
if (autoFetch && !hasFetchedRef.current) {
|
|
40422
40517
|
hasFetchedRef.current = true;
|
|
@@ -40756,6 +40851,7 @@ export {
|
|
|
40756
40851
|
isSupportedFile,
|
|
40757
40852
|
isSupportedMediaType,
|
|
40758
40853
|
linkMemoryEntitiesOp,
|
|
40854
|
+
loadSettings,
|
|
40759
40855
|
localChatBackend,
|
|
40760
40856
|
maskScopedEmbeddingCache,
|
|
40761
40857
|
maxVaultAttachmentBytes,
|
|
@@ -40803,6 +40899,7 @@ export {
|
|
|
40803
40899
|
resumeStream,
|
|
40804
40900
|
retain,
|
|
40805
40901
|
revokeNotionAccess,
|
|
40902
|
+
saveSetting,
|
|
40806
40903
|
savedToolToStored,
|
|
40807
40904
|
scoreProfileSalience,
|
|
40808
40905
|
screenCandidatesForInjection,
|
package/dist/server/index.cjs
CHANGED
|
@@ -16906,6 +16906,7 @@ function notifyKeyAvailable(address) {
|
|
|
16906
16906
|
}
|
|
16907
16907
|
}
|
|
16908
16908
|
var keyPairStore = /* @__PURE__ */ new Map();
|
|
16909
|
+
var pendingKeyPairRequests = /* @__PURE__ */ new Map();
|
|
16909
16910
|
function getStoredKeyByVersion(address, version) {
|
|
16910
16911
|
const keys = encryptionKeyStore.get(address);
|
|
16911
16912
|
if (!keys) return null;
|
|
@@ -16928,6 +16929,7 @@ function clearAllEncryptionState() {
|
|
|
16928
16929
|
cryptoKeyCache.clear();
|
|
16929
16930
|
keyAvailableCallbacks.clear();
|
|
16930
16931
|
pendingKeyRequests.clear();
|
|
16932
|
+
pendingKeyPairRequests.clear();
|
|
16931
16933
|
pendingCandidateDerives.clear();
|
|
16932
16934
|
refreshCandidatesByAddress.clear();
|
|
16933
16935
|
divergentDeriveAddresses.clear();
|
|
@@ -17595,6 +17597,21 @@ async function requestKeyPair(walletAddress, signMessage, embeddedWalletSigner)
|
|
|
17595
17597
|
if (existingKeyPair) {
|
|
17596
17598
|
return;
|
|
17597
17599
|
}
|
|
17600
|
+
const pending = pendingKeyPairRequests.get(walletAddress);
|
|
17601
|
+
if (pending) {
|
|
17602
|
+
return pending;
|
|
17603
|
+
}
|
|
17604
|
+
const promise = loadOrCreateKeyPair(walletAddress, signMessage, embeddedWalletSigner);
|
|
17605
|
+
pendingKeyPairRequests.set(walletAddress, promise);
|
|
17606
|
+
try {
|
|
17607
|
+
await promise;
|
|
17608
|
+
} finally {
|
|
17609
|
+
if (pendingKeyPairRequests.get(walletAddress) === promise) {
|
|
17610
|
+
pendingKeyPairRequests.delete(walletAddress);
|
|
17611
|
+
}
|
|
17612
|
+
}
|
|
17613
|
+
}
|
|
17614
|
+
async function loadOrCreateKeyPair(walletAddress, signMessage, embeddedWalletSigner) {
|
|
17598
17615
|
const startEpoch = sessionEpoch;
|
|
17599
17616
|
try {
|
|
17600
17617
|
const persistedKeyPair = await loadPersistedKeyPair(walletAddress);
|