@anuma/sdk 6.2.0 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5806,6 +5806,10 @@ declare class VaultMemory extends Model {
5806
5806
  /** Unix ms of the last `topics` write. Separate from `updated_at`, which every
5807
5807
  * topic writer pins on purpose (recall recency) — see the schema note. */
5808
5808
  topicsUpdatedAt: number | null;
5809
+ /** The photo(s) a SERVER-EXTRACTED memory came from — JSON
5810
+ * `[{feed_item_id, object_key}]`, exactly the shape
5811
+ * GET /api/memories/published returns. Null on anything not from a photo. */
5812
+ media: string | null;
5809
5813
  /** Unix ms of the last LLM topic-extraction pass. Null = never extracted
5810
5814
  * standalone (linked legacy rows are grandfathered as extracted).
5811
5815
  * DEPRECATED (v42) — subsumed by `topics_updated_at`; see the schema note. */
@@ -7319,8 +7323,16 @@ interface StoredVaultMemory {
7319
7323
  sourceChunkIds: string[] | null;
7320
7324
  /** Times this fact has been re-observed (for ranking + UX badges). */
7321
7325
  proofCount: number | null;
7322
- /** How the memory was created: manual | auto-extracted | capsule. */
7326
+ /** How the memory was created: manual | auto-extracted | capsule | photo. */
7323
7327
  source: string | null;
7328
+ /** The photo(s) a SERVER-EXTRACTED memory was read out of. Null on every
7329
+ * memory that did not come from a photo. See {@link PhotoMediaRef}.
7330
+ *
7331
+ * OPTIONAL rather than required: every read path sets it (the row mappers
7332
+ * always call parseMedia), but making it required would be a compile-break
7333
+ * for any caller that CONSTRUCTS a StoredVaultMemory — fixtures, mocks, and
7334
+ * anything downstream — for a field that is null on all but photo rows. */
7335
+ media?: PhotoMediaRef[] | null;
7324
7336
  /** W6 temporal lane — Unix ms when the event occurred (point/start of range). */
7325
7337
  eventTimeStart: number | null;
7326
7338
  /** W6 temporal lane — Unix ms when the event ended (range only). */
@@ -7402,6 +7414,26 @@ interface RankableVaultMemory {
7402
7414
  createdAt: Date;
7403
7415
  updatedAt: Date;
7404
7416
  }
7417
+ /**
7418
+ * A photo a server-extracted memory came from, as
7419
+ * GET /api/memories/published returns it in `media[]`.
7420
+ *
7421
+ * Both identifiers travel because both are needed: `feedItemId` is the server's
7422
+ * handle for the photo, and `objectKey` is what a client turns into a CDN URL
7423
+ * without another round-trip per memory.
7424
+ */
7425
+ interface PhotoMediaRef {
7426
+ feedItemId: number;
7427
+ objectKey: string | null;
7428
+ }
7429
+ /**
7430
+ * Decode the stored `media` column. Returns null for "no photo behind this
7431
+ * memory" (the column is null on every non-photo row) and tolerates a corrupt
7432
+ * or unexpected payload by reading it as null too — a memory whose photo
7433
+ * reference cannot be parsed is still a perfectly good memory, and losing the
7434
+ * thumbnail is a better failure than losing the row.
7435
+ */
7436
+ declare function parseMedia(value: unknown): PhotoMediaRef[] | null;
7405
7437
  interface CreateVaultMemoryOptions {
7406
7438
  content: string;
7407
7439
  /** Scope for the memory. Defaults to "private" if omitted. */
@@ -7968,6 +8000,95 @@ declare function hardDeleteDecayedOp(ctx: VaultMemoryOperationsContext, id: stri
7968
8000
  }): Promise<boolean>;
7969
8001
  declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
7970
8002
 
8003
+ /**
8004
+ * Ingest server-extracted photo memories into the local vault.
8005
+ *
8006
+ * A photo uploaded to People Nearby is read by the server, which extracts
8007
+ * durable facts about the user, embeds them and publishes them
8008
+ * (anuma-ai/nearby#114). Until those rows reach the device they exist only
8009
+ * server-side: the user's own assistant cannot recall them, and no screen can
8010
+ * show them — so the "visible and deletable" promise the design makes is not
8011
+ * kept. This is the path that brings them home.
8012
+ *
8013
+ * Three things about the shape of this, each of which is load-bearing:
8014
+ *
8015
+ * 1. **It takes rows; it does not fetch them.** The publish reconciler already
8016
+ * calls `listPublished()` on every pass and gets `text`, `media[]`,
8017
+ * `event_time` and `user_authored` back. Ingest consumes that response. No
8018
+ * new endpoint, no second network call, no change to nearby's API.
8019
+ *
8020
+ * 2. **The vault row's id IS the server's `memory_id`.** That is what makes a
8021
+ * revoke addressable: the reconciler's ledger, its published set and its
8022
+ * `toRevoke` list are all keyed on that id, so a locally-minted id would
8023
+ * leave the user with a switch that cannot reach the row it appears to
8024
+ * control. It is also what makes ingest idempotent for free — a second pass
8025
+ * sees the id already present and writes nothing.
8026
+ *
8027
+ * 3. **These rows never go through `retain()`.** That path is for facts being
8028
+ * learned on-device: it dedupes and merges candidates against local rows and
8029
+ * mints its own ids, both of which would break (2). A photo memory is not a
8030
+ * candidate to be reconciled against the vault — it is an already-decided
8031
+ * fact the server has published.
8032
+ *
8033
+ * The rows are written `visibility: "public"` because they genuinely ARE
8034
+ * published — the reconciler reads local visibility as the user's intent, and
8035
+ * anything else would make it immediately revoke a memory the user never turned
8036
+ * off. They carry `source: SOURCE_PHOTO`, which is what exempts them from
8037
+ * decay's auto-archive; see the note there for why archiving one would silently
8038
+ * unpublish it.
8039
+ *
8040
+ * No embedding is computed here. `searchTool`'s un-embedded lane embeds any row
8041
+ * lacking a vector at search time, uses it in that same search and persists it
8042
+ * via `updateVaultMemoryEmbeddingOp` — so a row ingested without one is picked
8043
+ * up on first recall rather than costing an embedding call at ingest.
8044
+ */
8045
+
8046
+ /**
8047
+ * One row of `GET /api/memories/published`, narrowed to what ingest needs.
8048
+ *
8049
+ * Deliberately structural rather than an import from the transport client: this
8050
+ * op is in the SDK and the two hand-written nearby clients live in the app, so
8051
+ * a shared nominal type would drag one across a package boundary for no gain.
8052
+ */
8053
+ interface PublishedPhotoMemory {
8054
+ /** The server-minted memory id. `photo:<feedItemID>:fact:NN` or `:caption`. */
8055
+ memoryId: string;
8056
+ /** The projected fact text. */
8057
+ text: string;
8058
+ /** The photo(s) this fact was read out of. */
8059
+ media?: PhotoMediaRef[] | null;
8060
+ /** When the event in the memory happened, if the server knows. */
8061
+ eventTime?: {
8062
+ start: number | null;
8063
+ end: number | null;
8064
+ kind: "point" | "range" | "ongoing" | null;
8065
+ } | null;
8066
+ /** True when the text is the user's own words (a kept caption). */
8067
+ userAuthored?: boolean;
8068
+ }
8069
+ /** What one ingest pass did, for the caller's logs and tests. */
8070
+ interface PhotoIngestResult {
8071
+ /** Rows newly written to the vault. */
8072
+ inserted: number;
8073
+ /** Rows already present, left untouched. */
8074
+ skipped: number;
8075
+ }
8076
+ /**
8077
+ * Write the published photo memories this vault does not already have.
8078
+ *
8079
+ * Idempotent on `memoryId`: a row whose id is already in the vault is counted as
8080
+ * skipped and NOT rewritten, even when the server's text has since changed.
8081
+ * That is deliberate — the local row is the user's copy, they may have edited
8082
+ * it, and silently overwriting an edit to match the server would be the same
8083
+ * class of bug as publishing a version the user has since changed. Re-ingesting
8084
+ * changed text is a follow-up that needs a merge decision, not a clobber.
8085
+ *
8086
+ * Non-`photo:` ids are ignored: everything else in the published set is a
8087
+ * client-published memory that by definition already lives in this vault (or in
8088
+ * another device's, which is not ours to recreate).
8089
+ */
8090
+ declare function ingestPublishedPhotoMemoriesOp(ctx: VaultMemoryOperationsContext, rows: PublishedPhotoMemory[]): Promise<PhotoIngestResult>;
8091
+
7971
8092
  /**
7972
8093
  * Auto-extraction worker — orchestration glue for wiring
7973
8094
  * {@link extractAndRetain} into a chat lifecycle.
@@ -8289,6 +8410,15 @@ declare function createChunkVectorCache(maxSize?: number): ChunkVectorCache;
8289
8410
  * shared purge buffer for every row, so an already-archived manual memory is
8290
8411
  * still deleted after the window (the archived check runs before the manual
8291
8412
  * short-circuit by design).
8413
+ *
8414
+ * `source === "photo"` (server-extracted photo memories) is protected the same
8415
+ * way, and for a sharper reason than curation: those rows are PUBLISHED, and
8416
+ * auto-archiving one would silently un-publish it. Archived rows drop out of the
8417
+ * default vault read, the publish reconciler builds its desired set from that
8418
+ * read, and anything it previously adopted but no longer sees goes into
8419
+ * `toRevoke` — so an age-archive at the medium TTL would revoke a memory from
8420
+ * the server that the user never switched off. Revoking is the user's decision
8421
+ * and has exactly one entry point: the publish switch.
8292
8422
  */
8293
8423
  /** The verdict for a single memory. */
8294
8424
  type DecayVerdict = "keep" | "archive" | "delete";
@@ -10810,8 +10940,11 @@ declare class WatermelonChatStorageAdapter implements ChatStorageAdapter {
10810
10940
  * unreadable flag would fail open. Existing rows stay NULL (= legacy,
10811
10941
  * unknown provenance, embedded as before) with no backfill, matching the v37
10812
10942
  * read-time-fallback precedent
10943
+ * - v45: Added `media` to memory_vault — the photo(s) a server-extracted
10944
+ * memory came from, as JSON `[{feed_item_id, object_key}]`. Null on every
10945
+ * row that did not come from a photo, which is all of them before this
10813
10946
  */
10814
- declare const SDK_SCHEMA_VERSION = 44;
10947
+ declare const SDK_SCHEMA_VERSION = 45;
10815
10948
  /**
10816
10949
  * Combined WatermelonDB schema for all SDK storage modules.
10817
10950
  *
@@ -15048,4 +15181,4 @@ declare function renderAnumaTree(node: AnumaNode): React.ReactElement | null;
15048
15181
  */
15049
15182
  declare function renderAnumaJsx(jsx: string): React.ReactElement | null;
15050
15183
 
15051
- 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, 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 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 PlatformStorage, type PortalLlmAuth, 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 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, 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 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 VaultSaveOperation, type VaultSearchResult, 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, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, 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, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, 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 };
15184
+ 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, 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 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 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, 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 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 VaultSaveOperation, type VaultSearchResult, 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, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, 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, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, 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 };
@@ -68,6 +68,7 @@ import {
68
68
  encryptDataWithKey,
69
69
  encryptField,
70
70
  encryptJsonField,
71
+ encryptVaultMemoryContent,
71
72
  exportPublicKey,
72
73
  extractAssistantText,
73
74
  extractUserMessageFromMessages,
@@ -120,6 +121,7 @@ import {
120
121
  makeSyntheticStoredMessage,
121
122
  onClearAllEncryptionState,
122
123
  onKeyAvailable,
124
+ parseMedia,
123
125
  postApiV1CreditsPurchase,
124
126
  postApiV1PhoneCalls,
125
127
  postApiV1SubscriptionsCancel,
@@ -166,7 +168,7 @@ import {
166
168
  updateVaultMemoryOp,
167
169
  useEncryption,
168
170
  vaultMemoryToStored
169
- } from "./chunk-EMVLDEPB.mjs";
171
+ } from "./chunk-TI3UVQPF.mjs";
170
172
  import {
171
173
  PiiRedactor,
172
174
  createStreamingDeAnonymizer,
@@ -6830,6 +6832,9 @@ __decorateClass([
6830
6832
  __decorateClass([
6831
6833
  field3("topics_updated_at")
6832
6834
  ], VaultMemory.prototype, "topicsUpdatedAt", 2);
6835
+ __decorateClass([
6836
+ field3("media")
6837
+ ], VaultMemory.prototype, "media", 2);
6833
6838
  __decorateClass([
6834
6839
  field3("topics_extracted_at")
6835
6840
  ], VaultMemory.prototype, "topicsExtractedAt", 2);
@@ -6877,6 +6882,133 @@ __decorateClass([
6877
6882
  field3("is_deleted")
6878
6883
  ], VaultMemory.prototype, "isDeleted", 2);
6879
6884
 
6885
+ // src/lib/memory/decay.ts
6886
+ var DAY_MS = 24 * 60 * 60 * 1e3;
6887
+ var SHORT_TTL_MS = 30 * DAY_MS;
6888
+ var MEDIUM_TTL_MS = 180 * DAY_MS;
6889
+ var SOURCE_PHOTO = "photo";
6890
+ var NEVER_TTL_MS = Number.POSITIVE_INFINITY;
6891
+ var HARD_DELETE_WINDOW_MS = 30 * DAY_MS;
6892
+ var PAST_EVENT_GRACE_MS = 7 * DAY_MS;
6893
+ var DEFAULT_DECAY_POLICY = {
6894
+ ttlByType: {
6895
+ identity: NEVER_TTL_MS,
6896
+ preference: NEVER_TTL_MS,
6897
+ relationship: NEVER_TTL_MS,
6898
+ constraint: NEVER_TTL_MS,
6899
+ plan: SHORT_TTL_MS,
6900
+ ongoing_context: SHORT_TTL_MS,
6901
+ other: MEDIUM_TTL_MS
6902
+ },
6903
+ fallbackTtlMs: MEDIUM_TTL_MS,
6904
+ hardDeleteWindowMs: HARD_DELETE_WINDOW_MS,
6905
+ pastEventGraceMs: PAST_EVENT_GRACE_MS
6906
+ };
6907
+ function resolvePolicy(policy) {
6908
+ if (!policy) return DEFAULT_DECAY_POLICY;
6909
+ return {
6910
+ ttlByType: { ...DEFAULT_DECAY_POLICY.ttlByType, ...policy.ttlByType },
6911
+ fallbackTtlMs: policy.fallbackTtlMs ?? DEFAULT_DECAY_POLICY.fallbackTtlMs,
6912
+ hardDeleteWindowMs: policy.hardDeleteWindowMs ?? DEFAULT_DECAY_POLICY.hardDeleteWindowMs,
6913
+ pastEventGraceMs: policy.pastEventGraceMs ?? DEFAULT_DECAY_POLICY.pastEventGraceMs
6914
+ };
6915
+ }
6916
+ function ttlForType(factType, policy) {
6917
+ const resolved = resolvePolicy(policy);
6918
+ if (factType === null) return resolved.fallbackTtlMs;
6919
+ return resolved.ttlByType[factType] ?? resolved.fallbackTtlMs;
6920
+ }
6921
+ function isTimeSensitiveType(factType) {
6922
+ return factType === "plan" || factType === "ongoing_context";
6923
+ }
6924
+ function hasFiniteTimestamps(m, now) {
6925
+ return Number.isFinite(now) && Number.isFinite(m.updatedAt) && (m.archivedAt === null || Number.isFinite(m.archivedAt));
6926
+ }
6927
+ function classifyDecay(m, now, policy) {
6928
+ const resolved = resolvePolicy(policy);
6929
+ if (!hasFiniteTimestamps(m, now)) {
6930
+ getLogger().warn("[memory/decay] non-finite timestamp on a memory row; keeping it", {
6931
+ now,
6932
+ updatedAt: m.updatedAt,
6933
+ archivedAt: m.archivedAt,
6934
+ factType: m.factType
6935
+ });
6936
+ return "keep";
6937
+ }
6938
+ if (m.archivedAt !== null) {
6939
+ return now - m.archivedAt > resolved.hardDeleteWindowMs ? "delete" : "keep";
6940
+ }
6941
+ if (m.source === "manual" || m.source === SOURCE_PHOTO) return "keep";
6942
+ if (isTimeSensitiveType(m.factType) && m.eventTimeEnd !== null) {
6943
+ if (m.eventTimeEnd < now - resolved.pastEventGraceMs) return "archive";
6944
+ if (m.eventTimeEnd >= now) return "keep";
6945
+ }
6946
+ if (now - m.updatedAt > ttlForType(m.factType, resolved)) return "archive";
6947
+ return "keep";
6948
+ }
6949
+
6950
+ // src/lib/db/memoryVault/photoIngest.ts
6951
+ var PHOTO_MEMORY_ID_PREFIX = "photo:";
6952
+ async function ingestPublishedPhotoMemoriesOp(ctx, rows) {
6953
+ const byId = /* @__PURE__ */ new Map();
6954
+ for (const r of rows) {
6955
+ if (typeof r.memoryId !== "string" || !r.memoryId.startsWith(PHOTO_MEMORY_ID_PREFIX)) continue;
6956
+ if (!byId.has(r.memoryId)) byId.set(r.memoryId, r);
6957
+ }
6958
+ const photoRows = [...byId.values()];
6959
+ if (photoRows.length === 0) return { inserted: 0, skipped: 0 };
6960
+ const known = await ctx.vaultMemoryCollection.query().fetchIds().then((ids) => new Set(ids));
6961
+ const candidates = photoRows.filter((r) => !known.has(r.memoryId));
6962
+ if (candidates.length === 0) return { inserted: 0, skipped: photoRows.length };
6963
+ const fresh = candidates;
6964
+ const contents = await Promise.all(
6965
+ fresh.map(async (r) => {
6966
+ if (ctx.walletAddress && ctx.signMessage) {
6967
+ return encryptVaultMemoryContent(
6968
+ r.text,
6969
+ ctx.walletAddress,
6970
+ ctx.signMessage,
6971
+ ctx.embeddedWalletSigner
6972
+ );
6973
+ }
6974
+ return r.text;
6975
+ })
6976
+ );
6977
+ const now = Date.now();
6978
+ let inserted = 0;
6979
+ await ctx.database.write(async () => {
6980
+ const present = new Set(await ctx.vaultMemoryCollection.query().fetchIds());
6981
+ const writable = fresh.map((row, i) => ({ row, content: contents[i] })).filter(({ row }) => !present.has(row.memoryId));
6982
+ inserted = writable.length;
6983
+ if (writable.length === 0) return;
6984
+ const prepared = writable.map(
6985
+ ({ row, content }) => ctx.vaultMemoryCollection.prepareCreate((record) => {
6986
+ record._raw.id = row.memoryId;
6987
+ record._setRaw("content", content);
6988
+ record._setRaw("scope", "private");
6989
+ record._setRaw("folder_id", null);
6990
+ record._setRaw("user_id", ctx.userId ?? null);
6991
+ record._setRaw("is_deleted", false);
6992
+ record._setRaw("proof_count", 1);
6993
+ record._setRaw("source", SOURCE_PHOTO);
6994
+ record._setRaw(
6995
+ "media",
6996
+ row.media && row.media.length > 0 ? JSON.stringify(row.media) : null
6997
+ );
6998
+ record._setRaw("visibility", "public");
6999
+ record._setRaw("published_at", now);
7000
+ if (row.eventTime) {
7001
+ record._setRaw("event_time_start", row.eventTime.start ?? null);
7002
+ record._setRaw("event_time_end", row.eventTime.end ?? null);
7003
+ record._setRaw("event_time_kind", row.eventTime.kind ?? null);
7004
+ }
7005
+ })
7006
+ );
7007
+ await ctx.database.batch(...prepared);
7008
+ });
7009
+ return { inserted, skipped: photoRows.length - inserted };
7010
+ }
7011
+
6880
7012
  // src/lib/memory/autoExtract.ts
6881
7013
  import { Q as Q4 } from "@nozbe/watermelondb";
6882
7014
 
@@ -8293,70 +8425,6 @@ function createChunkVectorCache(maxSize = DEFAULT_CHUNK_CACHE_SIZE) {
8293
8425
  return new LRUCache(maxSize);
8294
8426
  }
8295
8427
 
8296
- // src/lib/memory/decay.ts
8297
- var DAY_MS = 24 * 60 * 60 * 1e3;
8298
- var SHORT_TTL_MS = 30 * DAY_MS;
8299
- var MEDIUM_TTL_MS = 180 * DAY_MS;
8300
- var NEVER_TTL_MS = Number.POSITIVE_INFINITY;
8301
- var HARD_DELETE_WINDOW_MS = 30 * DAY_MS;
8302
- var PAST_EVENT_GRACE_MS = 7 * DAY_MS;
8303
- var DEFAULT_DECAY_POLICY = {
8304
- ttlByType: {
8305
- identity: NEVER_TTL_MS,
8306
- preference: NEVER_TTL_MS,
8307
- relationship: NEVER_TTL_MS,
8308
- constraint: NEVER_TTL_MS,
8309
- plan: SHORT_TTL_MS,
8310
- ongoing_context: SHORT_TTL_MS,
8311
- other: MEDIUM_TTL_MS
8312
- },
8313
- fallbackTtlMs: MEDIUM_TTL_MS,
8314
- hardDeleteWindowMs: HARD_DELETE_WINDOW_MS,
8315
- pastEventGraceMs: PAST_EVENT_GRACE_MS
8316
- };
8317
- function resolvePolicy(policy) {
8318
- if (!policy) return DEFAULT_DECAY_POLICY;
8319
- return {
8320
- ttlByType: { ...DEFAULT_DECAY_POLICY.ttlByType, ...policy.ttlByType },
8321
- fallbackTtlMs: policy.fallbackTtlMs ?? DEFAULT_DECAY_POLICY.fallbackTtlMs,
8322
- hardDeleteWindowMs: policy.hardDeleteWindowMs ?? DEFAULT_DECAY_POLICY.hardDeleteWindowMs,
8323
- pastEventGraceMs: policy.pastEventGraceMs ?? DEFAULT_DECAY_POLICY.pastEventGraceMs
8324
- };
8325
- }
8326
- function ttlForType(factType, policy) {
8327
- const resolved = resolvePolicy(policy);
8328
- if (factType === null) return resolved.fallbackTtlMs;
8329
- return resolved.ttlByType[factType] ?? resolved.fallbackTtlMs;
8330
- }
8331
- function isTimeSensitiveType(factType) {
8332
- return factType === "plan" || factType === "ongoing_context";
8333
- }
8334
- function hasFiniteTimestamps(m, now) {
8335
- return Number.isFinite(now) && Number.isFinite(m.updatedAt) && (m.archivedAt === null || Number.isFinite(m.archivedAt));
8336
- }
8337
- function classifyDecay(m, now, policy) {
8338
- const resolved = resolvePolicy(policy);
8339
- if (!hasFiniteTimestamps(m, now)) {
8340
- getLogger().warn("[memory/decay] non-finite timestamp on a memory row; keeping it", {
8341
- now,
8342
- updatedAt: m.updatedAt,
8343
- archivedAt: m.archivedAt,
8344
- factType: m.factType
8345
- });
8346
- return "keep";
8347
- }
8348
- if (m.archivedAt !== null) {
8349
- return now - m.archivedAt > resolved.hardDeleteWindowMs ? "delete" : "keep";
8350
- }
8351
- if (m.source === "manual") return "keep";
8352
- if (isTimeSensitiveType(m.factType) && m.eventTimeEnd !== null) {
8353
- if (m.eventTimeEnd < now - resolved.pastEventGraceMs) return "archive";
8354
- if (m.eventTimeEnd >= now) return "keep";
8355
- }
8356
- if (now - m.updatedAt > ttlForType(m.factType, resolved)) return "archive";
8357
- return "keep";
8358
- }
8359
-
8360
8428
  // src/lib/memory/decayClassifier.ts
8361
8429
  var DEFAULT_MODEL2 = "inclusionai/ling-2.6-flash";
8362
8430
  var DEFAULT_ATTEMPTS2 = 2;
@@ -8454,7 +8522,7 @@ function toDecayInput(c) {
8454
8522
  };
8455
8523
  }
8456
8524
  function isBorderline(input) {
8457
- if (input.source === "manual") return false;
8525
+ if (input.source === "manual" || input.source === SOURCE_PHOTO) return false;
8458
8526
  if (input.trustTier === "quarantined") return false;
8459
8527
  if (input.archivedAt !== null) return false;
8460
8528
  if (input.factType === null || input.factType === "other") return true;
@@ -14377,7 +14445,7 @@ __decorateClass([
14377
14445
  ], VaultFolder.prototype, "context", 2);
14378
14446
 
14379
14447
  // src/lib/db/schema.ts
14380
- var SDK_SCHEMA_VERSION = 44;
14448
+ var SDK_SCHEMA_VERSION = 45;
14381
14449
  var sdkSchema = appSchema2({
14382
14450
  version: SDK_SCHEMA_VERSION,
14383
14451
  tables: [
@@ -14525,6 +14593,18 @@ var sdkSchema = appSchema2({
14525
14593
  // paths key on `updated_at` — so without this a topic-only change would
14526
14594
  // neither upload nor merge. Null = `topics` never written.
14527
14595
  { name: "topics_updated_at", type: "number", isOptional: true },
14596
+ // The photo(s) a SERVER-EXTRACTED memory was read out of, as a JSON
14597
+ // array of `{feed_item_id, object_key}` — exactly what
14598
+ // GET /api/memories/published returns in `media[]`. Enough to render the
14599
+ // source image without a second round-trip per memory.
14600
+ //
14601
+ // A JSON column rather than a join table: nothing on the client ever
14602
+ // queries BY photo (the only direction is memory -> render its image),
14603
+ // so a table would add a sync lane and a local-id space to serve a
14604
+ // question nobody asks. `topics` and `source_chunk_ids` set the
14605
+ // precedent for a list that is only ever read back whole. Null on
14606
+ // anything not extracted from a photo.
14607
+ { name: "media", type: "string", isOptional: true },
14528
14608
  // Unix ms of the last LLM topic-extraction pass over this memory's
14529
14609
  // content. Null = never extracted standalone (legacy rows with entity
14530
14610
  // links are grandfathered — see getMemoriesNeedingTopicExtractionOp).
@@ -15359,6 +15439,20 @@ var sdkMigrations = schemaMigrations2({
15359
15439
  columns: [{ name: "origin", type: "string", isOptional: true }]
15360
15440
  })
15361
15441
  ]
15442
+ },
15443
+ // v44 -> v45: `media` on memory_vault — the photo(s) a server-extracted
15444
+ // memory was read out of, as JSON `[{feed_item_id, object_key}]`, mirroring
15445
+ // the `media[]` that GET /api/memories/published already returns. Existing
15446
+ // rows keep NULL, which is the correct value for every memory that did not
15447
+ // come from a photo (i.e. all of them until photo ingest runs).
15448
+ {
15449
+ toVersion: 45,
15450
+ steps: [
15451
+ addColumns2({
15452
+ table: "memory_vault",
15453
+ columns: [{ name: "media", type: "string", isOptional: true }]
15454
+ })
15455
+ ]
15362
15456
  }
15363
15457
  ]
15364
15458
  });
@@ -25235,6 +25329,7 @@ export {
25235
25329
  hasICloudCredentials,
25236
25330
  hasKeyPair,
25237
25331
  hasNotionCredentials,
25332
+ ingestPublishedPhotoMemoriesOp,
25238
25333
  injectionSignatureCatalog,
25239
25334
  insertAfterId,
25240
25335
  insertChild,
@@ -25261,6 +25356,7 @@ export {
25261
25356
  noopLogger,
25262
25357
  onKeyAvailable,
25263
25358
  parseJsx,
25359
+ parseMedia,
25264
25360
  preEmbedVaultMemories,
25265
25361
  preprocessFiles,
25266
25362
  previewToolSelection,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  recall
3
- } from "./chunk-EMVLDEPB.mjs";
3
+ } from "./chunk-TI3UVQPF.mjs";
4
4
  import "./chunk-ILAWDQDE.mjs";
5
5
  import "./chunk-GYKJOWEO.mjs";
6
6
  export {
@@ -16612,6 +16612,22 @@ async function decryptVaultMemoryFields(memory, address, signMessage, embeddedWa
16612
16612
  };
16613
16613
  }
16614
16614
 
16615
+ // src/lib/db/memoryVault/types.ts
16616
+ function parseMedia(value) {
16617
+ if (typeof value !== "string" || value === "") return null;
16618
+ try {
16619
+ const parsed = JSON.parse(value);
16620
+ if (!Array.isArray(parsed)) return null;
16621
+ const refs = parsed.filter((r) => typeof r === "object" && r !== null).map((r) => ({
16622
+ feedItemId: Number(r.feedItemId ?? r.feed_item_id),
16623
+ objectKey: r.objectKey ?? r.object_key ?? null
16624
+ })).filter((r) => Number.isFinite(r.feedItemId));
16625
+ return refs.length > 0 ? refs : null;
16626
+ } catch {
16627
+ return null;
16628
+ }
16629
+ }
16630
+
16615
16631
  // src/lib/db/memoryVault/operations.ts
16616
16632
  function visibilityOrPrivate(value) {
16617
16633
  return value === "public" ? value : "private";
@@ -16675,6 +16691,7 @@ function vaultMemoryToStoredRaw(memory) {
16675
16691
  sourceChunkIds,
16676
16692
  proofCount: memory.proofCount ?? null,
16677
16693
  source: memory.source ?? null,
16694
+ media: parseMedia(memory.media),
16678
16695
  eventTimeStart: memory.eventTimeStart ?? null,
16679
16696
  eventTimeEnd: memory.eventTimeEnd ?? null,
16680
16697
  eventTimeKind: memory.eventTimeKind ?? null,
@@ -16957,6 +16974,7 @@ function vaultMemoryRawToStoredRaw(raw) {
16957
16974
  eventTimeKind: raw.event_time_kind ?? null,
16958
16975
  // SQLite stores booleans as 0/1, LokiJS as true/false — coerce both.
16959
16976
  topicsUserManaged: raw.topics_user_managed === true || raw.topics_user_managed === 1,
16977
+ media: parseMedia(raw.media),
16960
16978
  topics: parseTopics(raw.topics),
16961
16979
  topicsUpdatedAt: raw.topics_updated_at ?? null,
16962
16980
  topicsExtractedAt: raw.topics_extracted_at ?? null,
@@ -20691,7 +20709,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
20691
20709
  subQueries = decomp.subQueries;
20692
20710
  }
20693
20711
  }
20694
- const { recall: recall2 } = await import("./recall-IM6RLRI6.mjs");
20712
+ const { recall: recall2 } = await import("./recall-BQSCJBGI.mjs");
20695
20713
  let recallDegraded = [];
20696
20714
  const result = await recall2(
20697
20715
  query,
@@ -21710,6 +21728,8 @@ export {
21710
21728
  ENTITY_KINDS,
21711
21729
  linkMemoryEntitiesOp,
21712
21730
  replaceMemoryEntitiesGuardedOp,
21731
+ encryptVaultMemoryContent,
21732
+ parseMedia,
21713
21733
  vaultMemoryToStored,
21714
21734
  createVaultMemoryOp,
21715
21735
  createSupersedingMemoryOp,