@anuma/sdk 6.19.1 → 6.20.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.
@@ -7209,6 +7209,15 @@ interface RecallDiagnostics {
7209
7209
  degraded: RecallDegradation[];
7210
7210
  }
7211
7211
  type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed" | "supersede";
7212
+ /**
7213
+ * The consolidation LLM's decision for a candidate, when it made one. Reported
7214
+ * on {@link RetainResult.consolidation} so a host can tell an LLM `noop` (the
7215
+ * fact already exists) from a cosine auto-merge — both arrive as
7216
+ * `action: "merge"` — and can read how often the model reaches for `supersede`
7217
+ * or `update` versus `create`. A degraded fallback create (LLM error, bad
7218
+ * response) carries no decision; `onFallback` reports those.
7219
+ */
7220
+ type ConsolidationAction = "create" | "update" | "noop" | "supersede";
7212
7221
  type RetainSource = "manual" | "auto-extracted" | "capsule";
7213
7222
  /**
7214
7223
  * Why a retain returned "create" instead of applying a consolidation decision.
@@ -7348,6 +7357,33 @@ interface RetainResult {
7348
7357
  tombstoneId?: string;
7349
7358
  /** Updated proof_count after this write. 0 when nothing was written (suppressed). */
7350
7359
  proofCount: number;
7360
+ /**
7361
+ * How close the write was to the threshold that allowed it. Absent on the
7362
+ * actions that have no such score (`create`, `update`, `supersede`, `skip`).
7363
+ *
7364
+ * The two paths report DIFFERENT things and a dashboard has to know which:
7365
+ *
7366
+ * - `suppressed` — an exact cosine against the tombstone, computed in
7367
+ * `findTombstoneMatch`.
7368
+ * - `merge` — the RANKER's score for the target, not a pure cosine. The
7369
+ * cosine is what cleared `minSimilarity`, but the supersession pass may
7370
+ * then adjust it (`oldScore - delta` / `newScore + delta`) before this
7371
+ * value is read, and can in principle reorder the winner. Read it as
7372
+ * "the score the merge was chosen on", within the supersession delta of
7373
+ * the cosine — not as the raw pairwise similarity.
7374
+ */
7375
+ similarity?: number;
7376
+ /**
7377
+ * What the consolidation LLM decided for this candidate, when consolidation
7378
+ * ran — see {@link ConsolidationAction}.
7379
+ *
7380
+ * Reported for the DECISION, not for what the write ended up doing, so the
7381
+ * two can disagree and be read as such: a `merge` carrying
7382
+ * `consolidation: "create"` is the model saying "new fact" and the strict
7383
+ * cosine stage merging anyway. Absent when consolidation did not run, and
7384
+ * absent on a degraded fallback create (`onFallback` owns that signal).
7385
+ */
7386
+ consolidation?: ConsolidationAction;
7351
7387
  }
7352
7388
 
7353
7389
  /**
@@ -7574,6 +7610,61 @@ interface ExtractFactsOptions extends PortalLlmAuth {
7574
7610
  * callers may leave it unset.
7575
7611
  */
7576
7612
  onAttempt?: (attempt: PortalLlmAttempt) => void;
7613
+ /**
7614
+ * Fired once per successful completion with how many candidates the model
7615
+ * emitted (`rawCount`) and how many survived {@link validateCandidates}
7616
+ * (`validCount`) — the non-string / empty / over-cap / low-signal / bad-
7617
+ * confidence drops that until now were a bare `continue` nobody counted.
7618
+ *
7619
+ * Without it a `no-facts` turn cannot be split into "the model found nothing"
7620
+ * and "the model found things we threw away", which is the difference between
7621
+ * a prompt problem and a validator problem. Counts only; never content.
7622
+ */
7623
+ onCandidatesParsed?: (stats: {
7624
+ rawCount: number;
7625
+ validCount: number;
7626
+ }) => void;
7627
+ }
7628
+ /**
7629
+ * Where a turn's candidates went between the model's completion and the vault —
7630
+ * every stage that can drop one, as a count. Returned by {@link extractAndRetain}
7631
+ * and forwarded on `TurnCompleteEvent` so a host can emit it; nothing here is
7632
+ * content.
7633
+ *
7634
+ * Reads as a funnel: `raw ≥ valid ≥ afterRedaction ≥ aboveConfidence`, then
7635
+ * `aboveConfidence = quarantined + retained + failed`.
7636
+ * @public
7637
+ */
7638
+ interface ExtractionFunnel {
7639
+ /** Candidates in the model's completion, before any validation. */
7640
+ rawCandidateCount: number;
7641
+ /** Survivors of {@link validateCandidates} (shape, length, low-signal, confidence-is-a-number). */
7642
+ validCandidateCount: number;
7643
+ /** Survivors of PII de-anonymization (equals `validCandidateCount` when redaction is off). */
7644
+ afterRedactionCount: number;
7645
+ /** Survivors of the `minConfidence` floor — the candidates that reached the injection screen. */
7646
+ aboveConfidenceCount: number;
7647
+ /**
7648
+ * Held for review by the injection screen and SUCCESSFULLY persisted — the
7649
+ * same set as `extractAndRetain`'s `quarantined`. A screened candidate whose
7650
+ * `retain()` threw is in `failedCount` instead, never both.
7651
+ */
7652
+ quarantinedCount: number;
7653
+ /** Written through `retain()` (any disposition). */
7654
+ retainedCount: number;
7655
+ /** `retain()` threw. */
7656
+ failedCount: number;
7657
+ }
7658
+ /**
7659
+ * Wall-clock split of one {@link extractAndRetain} call. The worker's
7660
+ * `durationMs` is the sum plus the screen; these say which half is slow.
7661
+ * @public
7662
+ */
7663
+ interface ExtractionTimings {
7664
+ /** The extraction LLM call, all attempts and backoff included. */
7665
+ extractMs: number;
7666
+ /** The retain loop — embeddings, consolidation LLM calls, writes — over every candidate. */
7667
+ retainMs: number;
7577
7668
  }
7578
7669
  /**
7579
7670
  * Stage 1 — call the LLM to extract candidate facts from the recent
@@ -7691,6 +7782,12 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
7691
7782
  * the give-up, so "extraction is failing" can be reported as *why* it failed.
7692
7783
  */
7693
7784
  failure?: PortalLlmFailure;
7785
+ /** Where the candidates went, stage by stage — see {@link ExtractionFunnel}. */
7786
+ funnel: ExtractionFunnel;
7787
+ /** Extract vs. retain wall-clock — see {@link ExtractionTimings}. */
7788
+ timings: ExtractionTimings;
7789
+ /** The extraction model this call asked for (the resolved default when unset). */
7790
+ model: string;
7694
7791
  }>;
7695
7792
 
7696
7793
  /**
@@ -8662,6 +8759,16 @@ interface TurnCompleteEvent {
8662
8759
  * carries content.
8663
8760
  */
8664
8761
  failure?: PortalLlmFailure;
8762
+ /**
8763
+ * Where the candidates went between the model and the vault, as counts — the
8764
+ * drops before `retain()` that `candidates`/`results` cannot show. See
8765
+ * {@link ExtractionFunnel}.
8766
+ */
8767
+ funnel?: ExtractionFunnel;
8768
+ /** Extract vs. retain wall-clock split of `durationMs`. See {@link ExtractionTimings}. */
8769
+ timings?: ExtractionTimings;
8770
+ /** The extraction model this turn asked for. */
8771
+ model?: string;
8665
8772
  }
8666
8773
  /** @public */
8667
8774
  /**
@@ -15932,4 +16039,4 @@ declare function renderAnumaTree(node: AnumaNode): React.ReactElement | null;
15932
16039
  */
15933
16040
  declare function renderAnumaJsx(jsx: string): React.ReactElement | null;
15934
16041
 
15935
- 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_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, 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 DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, 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 TopicExtractionInput, type TopicExtractionRunResult, 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 UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, fileExists, findById, findMatchingTools, findParentOfId, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getEntitiesByMemoryIdsOp, getGithubAccessToken, getGoogleDriveStoredToken, 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, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDegradedTopicSkip, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reflect, refreshCalendarToken, refreshDriveToken, refreshEncryptionKeyIfMatches, refreshGithubToken, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, writeEncryptedFile };
16042
+ 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_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, 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 DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type EncryptionKeyVersion, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageChunk, type MessageFeedback, type MessageOrigin, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredTopic, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, THEME_ATTRS, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, 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 TopicExtractionInput, type TopicExtractionRunResult, 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 UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultCandidateKey, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, backfillMemoryEntityUserIdsOp, backfillMemoryTopicsOp, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, fileExists, findById, findMatchingTools, findParentOfId, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getEntitiesByMemoryIdsOp, getGithubAccessToken, getGoogleDriveStoredToken, 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, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultCandidateKeysOp, getVaultEmbeddingsByIdsOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDegradedTopicSkip, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, maskScopedEmbeddingCache, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, parseMedia, preEmbedVaultMemories, preprocessFiles, previewToolSelection, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, rankProfileCandidates, readEncryptedFile, recall, reflect, refreshCalendarToken, refreshDriveToken, refreshEncryptionKeyIfMatches, refreshGithubToken, refreshNotionToken, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, setMemoryVisibilityOp, settingsStorageSchema, shouldChunkMessage, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, verifyMemoriesForPublish, walk, webPlatformStorage, writeEncryptedFile };
@@ -179,7 +179,7 @@ import {
179
179
  updateVaultMemoryOp,
180
180
  useEncryption,
181
181
  vaultMemoryToStored
182
- } from "./chunk-2EEPAOHJ.mjs";
182
+ } from "./chunk-M53NXLZS.mjs";
183
183
  import {
184
184
  PiiRedactor,
185
185
  createStreamingDeAnonymizer,
@@ -7464,6 +7464,7 @@ async function retain(content, ctx, options = {}) {
7464
7464
  const threshold = options.autoMergeThreshold ?? DEFAULT_AUTO_MERGE_THRESHOLD;
7465
7465
  const resolvedScope = options.scope ?? DEFAULT_SCOPE;
7466
7466
  let supersedeTargetIds = [];
7467
+ let consolidationDecidedCreate = false;
7467
7468
  let supersedeContent;
7468
7469
  let prepared;
7469
7470
  if (enableAutoMerge) {
@@ -7491,8 +7492,12 @@ async function retain(content, ctx, options = {}) {
7491
7492
  const outcome = await tryConsolidate(trimmed, ctx, options, prepared);
7492
7493
  if (outcome) {
7493
7494
  if ("done" in outcome) return outcome.done;
7494
- supersedeTargetIds = outcome.supersede;
7495
- supersedeContent = outcome.content;
7495
+ if ("create" in outcome) {
7496
+ consolidationDecidedCreate = true;
7497
+ } else {
7498
+ supersedeTargetIds = outcome.supersede;
7499
+ supersedeContent = outcome.content;
7500
+ }
7496
7501
  }
7497
7502
  }
7498
7503
  if (supersedeTargetIds.length === 0) {
@@ -7542,7 +7547,14 @@ async function retain(content, ctx, options = {}) {
7542
7547
  action: "merge",
7543
7548
  memoryId: targetId,
7544
7549
  targetId,
7545
- proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
7550
+ proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
7551
+ similarity: matches[0].similarity,
7552
+ // Stage 1 may have run and explicitly said `create`, and Stage 2
7553
+ // then found a strict-cosine match anyway. Reporting the decision
7554
+ // here is what makes that DISAGREEMENT visible — without it the
7555
+ // model's create silently vanished from the distribution whenever
7556
+ // the cosine stage won.
7557
+ ...consolidationDecidedCreate && { consolidation: "create" }
7546
7558
  };
7547
7559
  }
7548
7560
  await assertMergeTargetGoneOrThrow(ctx, targetId);
@@ -7555,12 +7567,18 @@ async function retain(content, ctx, options = {}) {
7555
7567
  const embedding = reusableQueryEmbedding ?? await generateEmbedding(contentToWrite, ctx.embeddingOptions);
7556
7568
  const embeddingModel = ctx.embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
7557
7569
  if (options.respectTombstones) {
7558
- const tombstoneId = await findTombstoneMatch(embedding, embeddingModel, resolvedScope, ctx, {
7570
+ const tombstone = await findTombstoneMatch(embedding, embeddingModel, resolvedScope, ctx, {
7559
7571
  threshold,
7560
7572
  folderId: options.folderId
7561
7573
  });
7562
- if (tombstoneId) {
7563
- return { action: "suppressed", memoryId: tombstoneId, tombstoneId, proofCount: 0 };
7574
+ if (tombstone) {
7575
+ return {
7576
+ action: "suppressed",
7577
+ memoryId: tombstone.id,
7578
+ tombstoneId: tombstone.id,
7579
+ proofCount: 0,
7580
+ similarity: tombstone.similarity
7581
+ };
7564
7582
  }
7565
7583
  }
7566
7584
  const createOpts = {
@@ -7627,7 +7645,8 @@ async function retain(content, ctx, options = {}) {
7627
7645
  action: "supersede",
7628
7646
  memoryId: created2.uniqueId,
7629
7647
  targetId: primaryTargetId,
7630
- proofCount: 1
7648
+ proofCount: 1,
7649
+ consolidation: "supersede"
7631
7650
  };
7632
7651
  }
7633
7652
  notifyConsolidationFallback(
@@ -7641,7 +7660,8 @@ async function retain(content, ctx, options = {}) {
7641
7660
  return {
7642
7661
  action: "create",
7643
7662
  memoryId: created.uniqueId,
7644
- proofCount: 1
7663
+ proofCount: 1,
7664
+ ...consolidationDecidedCreate && { consolidation: "create" }
7645
7665
  };
7646
7666
  }
7647
7667
  function unionStrings(a, b) {
@@ -7671,7 +7691,7 @@ async function findTombstoneMatch(embedding, embeddingModel, scope, ctx, opts) {
7671
7691
  bestId = row.uniqueId;
7672
7692
  }
7673
7693
  }
7674
- return bestId;
7694
+ return bestId === null ? null : { id: bestId, similarity: bestSim };
7675
7695
  }
7676
7696
  function pickEventTimeUpdate(existing, incoming) {
7677
7697
  if (incoming === void 0 || incoming === null) return void 0;
@@ -7713,7 +7733,7 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
7713
7733
  }));
7714
7734
  const { consolidateMemory: doConsolidate } = await import("./consolidate-URHGJT7I.mjs");
7715
7735
  const decision = await doConsolidate(trimmed, candidates, consolidateOptions);
7716
- if (decision.action === "create") return null;
7736
+ if (decision.action === "create") return decision.fallbackReason ? null : { create: true };
7717
7737
  if (decision.action === "supersede" && decision.content) {
7718
7738
  const requestedIds = decision.targetIds?.length ? decision.targetIds : decision.targetId ? [decision.targetId] : [];
7719
7739
  if (requestedIds.length === 0) return null;
@@ -7772,7 +7792,8 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
7772
7792
  action: "merge",
7773
7793
  memoryId: decision.targetId,
7774
7794
  targetId: decision.targetId,
7775
- proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
7795
+ proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
7796
+ consolidation: "noop"
7776
7797
  }
7777
7798
  };
7778
7799
  }
@@ -7825,7 +7846,8 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
7825
7846
  action: "update",
7826
7847
  memoryId: decision.targetId,
7827
7848
  targetId: decision.targetId,
7828
- proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
7849
+ proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
7850
+ consolidation: "update"
7829
7851
  }
7830
7852
  };
7831
7853
  }
@@ -7967,6 +7989,11 @@ Extract durable user facts.`,
7967
7989
  fallbackSourceId,
7968
7990
  options.userIdentity ?? []
7969
7991
  );
7992
+ const rawCandidates = parsed.candidates;
7993
+ options.onCandidatesParsed?.({
7994
+ rawCount: Array.isArray(rawCandidates) ? rawCandidates.length : 0,
7995
+ validCount: candidates.length
7996
+ });
7970
7997
  if (!redactor) return candidates;
7971
7998
  const restored = restoreCandidates(candidates, redactor, options.userIdentity ?? []);
7972
7999
  if (candidates.length > 0 && restored.length === 0) {
@@ -8003,8 +8030,12 @@ async function extractAndRetain(messages, retainCtx, options) {
8003
8030
  let exhaustedEmpty = false;
8004
8031
  let exhaustedFailure;
8005
8032
  let droppedAfterRedaction = false;
8033
+ let rawCandidateCount = 0;
8034
+ let validCandidateCount = 0;
8006
8035
  const callerOnExhaustedEmpty = options.extract.onExhaustedEmpty;
8007
8036
  const callerOnCandidatesDropped = options.extract.onCandidatesDropped;
8037
+ const callerOnCandidatesParsed = options.extract.onCandidatesParsed;
8038
+ const tExtract = Date.now();
8008
8039
  const candidates = await extractFacts(messages, {
8009
8040
  ...options.extract,
8010
8041
  onExhaustedEmpty: (failure) => {
@@ -8015,8 +8046,14 @@ async function extractAndRetain(messages, retainCtx, options) {
8015
8046
  onCandidatesDropped: () => {
8016
8047
  droppedAfterRedaction = true;
8017
8048
  callerOnCandidatesDropped?.();
8049
+ },
8050
+ onCandidatesParsed: (stats) => {
8051
+ rawCandidateCount = stats.rawCount;
8052
+ validCandidateCount = stats.validCount;
8053
+ callerOnCandidatesParsed?.(stats);
8018
8054
  }
8019
8055
  });
8056
+ const extractMs = Date.now() - tExtract;
8020
8057
  const filtered = candidates.filter((c) => c.confidence >= minConfidence);
8021
8058
  const log = getLogger();
8022
8059
  const screened = screenCandidatesForInjection(filtered);
@@ -8064,6 +8101,7 @@ async function extractAndRetain(messages, retainCtx, options) {
8064
8101
  const results = [];
8065
8102
  const quarantinedInfo = [];
8066
8103
  let failedWrites = 0;
8104
+ const tRetain = Date.now();
8067
8105
  for (const { candidate, isQuarantined, reason, signature } of toRetain) {
8068
8106
  try {
8069
8107
  const result = await retain(candidate.content, retainCtx, {
@@ -8130,6 +8168,21 @@ async function extractAndRetain(messages, retainCtx, options) {
8130
8168
  failedCount: failedWrites,
8131
8169
  outcome,
8132
8170
  quarantined: quarantinedInfo,
8171
+ funnel: {
8172
+ rawCandidateCount,
8173
+ validCandidateCount,
8174
+ afterRedactionCount: candidates.length,
8175
+ aboveConfidenceCount: filtered.length,
8176
+ // The PERSISTED quarantines (`quarantinedInfo`), not the screened list: a
8177
+ // screened candidate whose retain() throws is counted in `failedCount`,
8178
+ // and counting it here too would double it and break the identity below.
8179
+ // This also keeps the count equal to `quarantined.length` on the result.
8180
+ quarantinedCount: quarantinedInfo.length,
8181
+ retainedCount: results.length,
8182
+ failedCount: failedWrites
8183
+ },
8184
+ timings: { extractMs, retainMs: Date.now() - tRetain },
8185
+ model: options.extract.model ?? DEFAULT_EXTRACTION_MODEL,
8133
8186
  // Only meaningful alongside `outcome: "empty-after-retry"`. Returned as well
8134
8187
  // as pushed through the callback so a consumer that only inspects the result
8135
8188
  // (rather than wiring a hook) can still report WHY.
@@ -8383,27 +8436,23 @@ function createAutoExtractor(options) {
8383
8436
  const t0 = Date.now();
8384
8437
  void (async () => {
8385
8438
  try {
8386
- const { candidates, results, failedCount, outcome, failure } = await extractAndRetain(
8387
- window2,
8388
- retainCtx,
8389
- {
8390
- extract,
8391
- ...options.minConfidence !== void 0 && { minConfidence: options.minConfidence },
8392
- ...options.entityCtx !== void 0 && { entityCtx: options.entityCtx },
8393
- ...options.scope !== void 0 && { scope: options.scope },
8394
- ...options.folderId !== void 0 && { folderId: options.folderId },
8395
- ...consolidateOptions !== void 0 && { consolidateOptions },
8396
- ...injectionClassifierOptions !== void 0 && {
8397
- injectionClassifier: injectionClassifierOptions
8398
- },
8399
- ...options.onCandidateFailed && {
8400
- onCandidateFailed: (candidate, error) => options.onCandidateFailed?.({ candidate, error, conversationId })
8401
- },
8402
- ...options.onMemoryQuarantined && {
8403
- onQuarantined: (info) => options.onMemoryQuarantined?.({ ...info, conversationId })
8404
- }
8439
+ const { candidates, results, failedCount, outcome, failure, funnel, timings, model } = await extractAndRetain(window2, retainCtx, {
8440
+ extract,
8441
+ ...options.minConfidence !== void 0 && { minConfidence: options.minConfidence },
8442
+ ...options.entityCtx !== void 0 && { entityCtx: options.entityCtx },
8443
+ ...options.scope !== void 0 && { scope: options.scope },
8444
+ ...options.folderId !== void 0 && { folderId: options.folderId },
8445
+ ...consolidateOptions !== void 0 && { consolidateOptions },
8446
+ ...injectionClassifierOptions !== void 0 && {
8447
+ injectionClassifier: injectionClassifierOptions
8448
+ },
8449
+ ...options.onCandidateFailed && {
8450
+ onCandidateFailed: (candidate, error) => options.onCandidateFailed?.({ candidate, error, conversationId })
8451
+ },
8452
+ ...options.onMemoryQuarantined && {
8453
+ onQuarantined: (info) => options.onMemoryQuarantined?.({ ...info, conversationId })
8405
8454
  }
8406
- );
8455
+ });
8407
8456
  if (outcome !== "empty-after-retry") {
8408
8457
  const advancedTo = window2[window2.length - 1].id;
8409
8458
  stateFor(conversationId).watermark = advancedTo;
@@ -8424,6 +8473,9 @@ function createAutoExtractor(options) {
8424
8473
  durationMs: Date.now() - t0,
8425
8474
  conversationId,
8426
8475
  outcome,
8476
+ funnel,
8477
+ timings,
8478
+ model,
8427
8479
  // Only set alongside `outcome: "empty-after-retry"`. Spread so the key
8428
8480
  // is absent rather than explicitly undefined on a healthy turn —
8429
8481
  // analytics backends store an explicit undefined as a real value.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  recall
3
- } from "./chunk-2EEPAOHJ.mjs";
3
+ } from "./chunk-M53NXLZS.mjs";
4
4
  import "./chunk-WUG6GTHO.mjs";
5
5
  import "./chunk-GYKJOWEO.mjs";
6
6
  export {
@@ -20927,7 +20927,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
20927
20927
  subQueries = decomp.subQueries;
20928
20928
  }
20929
20929
  }
20930
- const { recall: recall2 } = await import("./recall-NLCZUGXN.mjs");
20930
+ const { recall: recall2 } = await import("./recall-M3KBKU74.mjs");
20931
20931
  let recallDegraded = [];
20932
20932
  const result = await recall2(
20933
20933
  query,