@anuma/sdk 3.12.1 → 3.13.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.
@@ -5657,14 +5657,23 @@ declare class VaultMemory extends Model {
5657
5657
  /** When true, the user has manually set this memory's topics; auto-extraction
5658
5658
  * leaves its entity links alone. Null on legacy rows (treated as false). */
5659
5659
  topicsUserManaged: boolean | null;
5660
+ /** The durable, synced record of this memory's topics — JSON `StoredTopic[]`.
5661
+ * `entity` / `memory_entity` are a device-local index over it. Null = pre-v42
5662
+ * (backfilled from the row's current links by the sweep). */
5663
+ topics: string | null;
5664
+ /** Unix ms of the last `topics` write. Separate from `updated_at`, which every
5665
+ * topic writer pins on purpose (recall recency) — see the schema note. */
5666
+ topicsUpdatedAt: number | null;
5660
5667
  /** Unix ms of the last LLM topic-extraction pass. Null = never extracted
5661
- * standalone (linked legacy rows are grandfathered as extracted). */
5668
+ * standalone (linked legacy rows are grandfathered as extracted).
5669
+ * DEPRECATED (v42) — subsumed by `topics_updated_at`; see the schema note. */
5662
5670
  topicsExtractedAt: number | null;
5663
5671
  /** A2 supersession: newer memory id that replaced this one, or null if live. */
5664
5672
  supersededBy: string | null;
5665
5673
  supersededAt: number | null;
5666
5674
  /** Extraction-logic version this memory was last stamped under. Null (pre-v38)
5667
- * reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
5675
+ * reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows.
5676
+ * DEPRECATED (v42) — subsumed by `topics_updated_at`; see the schema note. */
5668
5677
  topicsExtractedVersion: number | null;
5669
5678
  /** C3 re-observation watermark: Unix ms of the last retain() merge, or null. */
5670
5679
  lastObservedAt: number | null;
@@ -5740,6 +5749,33 @@ interface StoredEntity {
5740
5749
  createdAt: Date;
5741
5750
  updatedAt: Date;
5742
5751
  }
5752
+ /**
5753
+ * Who put a topic on a memory. Written to `memory_vault.topics` but not yet
5754
+ * READ anywhere — it exists so a later improvement can refresh the `auto`
5755
+ * entries of a curated memory while leaving `user` entries alone (today
5756
+ * `topics_user_managed` is all-or-nothing per memory) without needing a second
5757
+ * migration or backfill. Don't build that behavior off it yet.
5758
+ *
5759
+ * When you do: a value written by the v42 backfill is NOT ground truth. Pre-v42
5760
+ * rows carry no per-topic provenance, so `backfillMemoryTopicsOp` derives it
5761
+ * from the per-memory `topics_user_managed` flag and stamps a curated legacy
5762
+ * row's every topic `user` — see the note at that derivation.
5763
+ * @public
5764
+ */
5765
+ type TopicSource = "user" | "auto";
5766
+ /**
5767
+ * One entry in `memory_vault.topics` — the durable, synced record of a memory's
5768
+ * topics. `name` carries the CALLER's display casing, unlike
5769
+ * {@link StoredEntity.canonicalName}, which {@link normalizeEntityName}
5770
+ * lowercases and which has no display column: preserving casing here is the
5771
+ * point of storing names on the memory row.
5772
+ * @public
5773
+ */
5774
+ interface StoredTopic {
5775
+ name: string;
5776
+ kind?: string;
5777
+ source: TopicSource;
5778
+ }
5743
5779
  /** @public */
5744
5780
  interface CreateEntityOptions {
5745
5781
  canonicalName: string;
@@ -5794,9 +5830,15 @@ interface EntityOperationsContext {
5794
5830
  * topics to a memory we couldn't verify. Entity upserts and link creation
5795
5831
  * run in ONE writer to prevent orphan-prune races; returns [] when links
5796
5832
  * were skipped.
5833
+ *
5834
+ * `options.topicsSource` (default `auto`) is the provenance recorded in
5835
+ * `memory_vault.topics`, which this rewrites from the memory's FULL resulting
5836
+ * link set — see {@link prepareTopicsUpdate}. Add semantics mean that set is
5837
+ * old ∪ new, so already-linked entities are resolved for their names too.
5797
5838
  */
5798
5839
  declare function linkMemoryEntitiesOp(ctx: EntityOperationsContext, memoryId: string, entityInputs: ReadonlyArray<EntityInput>, options?: {
5799
5840
  unlessTopicsUserManaged?: boolean;
5841
+ topicsSource?: TopicSource;
5800
5842
  }): Promise<StoredEntity[]>;
5801
5843
  /**
5802
5844
  * REPLACE a memory's entity links with an auto-derived set — the topic
@@ -7056,9 +7098,17 @@ interface StoredVaultMemory {
7056
7098
  /** When true, the user has manually set this memory's topics (entity links);
7057
7099
  * auto-extraction leaves them alone. False on legacy/auto rows. */
7058
7100
  topicsUserManaged: boolean;
7101
+ /** The memory's topics as the DURABLE, synced record — `entity` /
7102
+ * `memory_entity` are a device-local index over it. Null = pre-v42, no record
7103
+ * yet; `[]` = a record of "no topics". */
7104
+ topics: StoredTopic[] | null;
7105
+ /** Unix ms of the last `topics` write, or null if never written. Separate from
7106
+ * `updatedAt`, which topic writes deliberately pin (recall recency). */
7107
+ topicsUpdatedAt: number | null;
7059
7108
  /** Unix ms of the last LLM topic-extraction pass over this memory's content.
7060
7109
  * Null = never extracted standalone; rows that already carry entity links
7061
- * are grandfathered as extracted (see getMemoriesNeedingTopicExtractionOp). */
7110
+ * are grandfathered as extracted (see getMemoriesNeedingTopicExtractionOp).
7111
+ * DEPRECATED (v42) — subsumed by `topicsUpdatedAt`; see the schema note. */
7062
7112
  topicsExtractedAt: number | null;
7063
7113
  /** Write-time supersession (A2): id of the newer memory that replaced this
7064
7114
  * one (incompatible-value update, e.g. "Lives in Portland" → "Lives in SF").
@@ -7068,7 +7118,8 @@ interface StoredVaultMemory {
7068
7118
  /** Unix ms when this memory was superseded. Null when live. */
7069
7119
  supersededAt: number | null;
7070
7120
  /** Extraction-logic version this memory was last stamped under. Null (pre-v38)
7071
- * reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows. */
7121
+ * reads as 0, so a TOPICS_EXTRACTION_VERSION bump re-extracts stale rows.
7122
+ * DEPRECATED (v42) — subsumed by `topicsUpdatedAt`; see the schema note. */
7072
7123
  topicsExtractedVersion: number | null;
7073
7124
  /** C3 re-observation watermark: Unix ms of the last retain() merge into this
7074
7125
  * fact. Distinct from `updatedAt` (which merges preserve). Null = never
@@ -7387,7 +7438,8 @@ declare function updateVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: stri
7387
7438
  * Replace semantics: the given `entities` become the memory's complete topic
7388
7439
  * set (pass `[]` to clear all topics — the memory stays user-managed and
7389
7440
  * unclustered). Requires `ctx.entityCtx`. Preserves `updated_at` so a topic
7390
- * edit doesn't inflate the recency multiplier.
7441
+ * edit doesn't inflate the recency multiplier — `topics_updated_at` is what
7442
+ * carries the edit to the user's other devices.
7391
7443
  */
7392
7444
  declare function setMemoryEntitiesOp(ctx: VaultMemoryOperationsContext, memoryId: string, entities: ReadonlyArray<EntityInput>): Promise<StoredVaultMemory | null>;
7393
7445
  /**
@@ -7400,6 +7452,11 @@ declare function setMemoryEntitiesOp(ctx: VaultMemoryOperationsContext, memoryId
7400
7452
  * through the sweep's unstamped→`linkedUnstamped` grandfather path (stamped
7401
7453
  * current, no LLM pass); forcing a stamp when absent avoids that. Existing links
7402
7454
  * are left in place until the re-extraction replaces them. Preserves `updated_at`.
7455
+ *
7456
+ * Both stamp columns are DEPRECATED (v42) — `topics_updated_at` subsumes them;
7457
+ * see the schema note. This op's version-invalidation trick is the reason the
7458
+ * earlier plan to exclude them from sync was dropped, and it's the last piece
7459
+ * that has to move before they can go.
7403
7460
  */
7404
7461
  declare function clearMemoryTopicsOverrideOp(ctx: VaultMemoryOperationsContext, memoryId: string): Promise<boolean>;
7405
7462
  /**
@@ -7469,20 +7526,54 @@ interface MemoriesNeedingTopicExtraction {
7469
7526
  * grandfather backlog is drained across sweeps rather than in one spike.
7470
7527
  */
7471
7528
  linkedUnstamped: string[];
7529
+ /**
7530
+ * IDs whose `topics` record disagrees with their `memory_entity` links — the
7531
+ * restored-device case, where the synced record arrived but the device-local
7532
+ * index (which can never sync) did not. Rebuild with
7533
+ * {@link relinkMemoryTopicsOp}: no LLM call, and no `memory_vault` write, so a
7534
+ * restore doesn't re-upload the vault.
7535
+ *
7536
+ * INCLUDES user-managed rows. A curated memory's index needs rebuilding just
7537
+ * like an auto one, and the flag it arrives with is what keeps the autotagger
7538
+ * off it — so unlike {@link pending} / {@link linkedUnstamped}, this bucket is
7539
+ * not filtered by ownership. Bounded by `limit`.
7540
+ */
7541
+ topicsToRelink: string[];
7542
+ /**
7543
+ * IDs that have links but no `topics` record at all — rows predating v42,
7544
+ * whose topics would otherwise never reach the server. Fill with
7545
+ * {@link backfillMemoryTopicsOp} (no LLM call), which derives the record from
7546
+ * the links already there.
7547
+ *
7548
+ * Also includes user-managed rows, for the same reason: a curated memory's
7549
+ * topics are exactly the ones worth preserving across a migration. Bounded by
7550
+ * `limit` because filling `topics` bumps `topics_updated_at` and so re-uploads
7551
+ * the row (embedding included) — uncapped, the first sweep after upgrade would
7552
+ * re-upload the entire vault at once. Rows already in {@link pending} are
7553
+ * excluded: their imminent LLM pass writes `topics` anyway.
7554
+ */
7555
+ topicsBackfill: string[];
7472
7556
  }
7473
7557
  /**
7474
- * Sweep query for the background topic-extraction worker: partition the
7475
- * user's non-deleted, non-user-managed memories by what the worker should do
7476
- * with them (see {@link MemoriesNeedingTopicExtraction}). User-managed rows
7477
- * are never returned — the user owns their topics, including an intentionally
7478
- * empty set. Requires `ctx.entityCtx` for the entity-links check.
7558
+ * Sweep query for the background topic-extraction worker: partition the user's
7559
+ * non-deleted memories by what the worker should do with them (see
7560
+ * {@link MemoriesNeedingTopicExtraction}). Requires `ctx.entityCtx` for the
7561
+ * entity-links check.
7562
+ *
7563
+ * User-managed rows are excluded from the two LLM-facing buckets — the user owns
7564
+ * their topics, including an intentionally empty set — but NOT from
7565
+ * `topicsToRelink` / `topicsBackfill`, which only move a curated row's topics
7566
+ * between the record and the index and never re-derive them. That's why the
7567
+ * ownership filter lives in the partition below rather than in the query: a
7568
+ * restored curated memory is exactly the row whose index must be rebuilt.
7479
7569
  */
7480
7570
  declare function getMemoriesNeedingTopicExtractionOp(ctx: VaultMemoryOperationsContext, options?: {
7481
7571
  limit?: number;
7482
7572
  }): Promise<MemoriesNeedingTopicExtraction>;
7483
7573
  /**
7484
7574
  * Stamp `topics_extracted_at` (and `topics_extracted_version`) on the given
7485
- * memories — the topic worker calls this after a successful extraction pass
7575
+ * memories — both DEPRECATED (v42), subsumed by `topics_updated_at`; see the
7576
+ * schema note. The topic worker calls this after a successful extraction pass
7486
7577
  * (including zero-entity results, so quiet memories aren't re-asked every sweep)
7487
7578
  * and to grandfather `linkedUnstamped` rows without an LLM call. `version`
7488
7579
  * defaults to {@link TOPICS_EXTRACTION_VERSION}: stamping at the current version
@@ -7506,6 +7597,37 @@ declare function getMemoriesNeedingTopicExtractionOp(ctx: VaultMemoryOperationsC
7506
7597
  * needed to `prepareUpdate` stays bounded and never spikes the RecordCache.
7507
7598
  */
7508
7599
  declare function stampTopicsExtractedAtOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[], extractedAt: number, version?: number): Promise<string[]>;
7600
+ /**
7601
+ * Rebuild the `memory_entity` index for the sweep's `topicsToRelink` rows from
7602
+ * each row's `topics` record — the restored-device repair. No LLM call: every
7603
+ * name already lives on the row.
7604
+ *
7605
+ * Writes NOTHING to `memory_vault`, deliberately. Restored rows are written
7606
+ * `_status: 'synced'`, so touching them would mark the whole vault dirty and
7607
+ * re-upload it (embeddings included) after every migration — the index is
7608
+ * device-local state and rebuilding it is not a change to the memory.
7609
+ * `topics_user_managed` in particular is left exactly as it arrived, so the
7610
+ * autotagger stays off a curated memory whose links this just restored.
7611
+ *
7612
+ * Skips deleted, foreign-user, and record-less rows. Returns the ids relinked.
7613
+ */
7614
+ declare function relinkMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[]): Promise<string[]>;
7615
+ /**
7616
+ * Fill `topics` for the sweep's `topicsBackfill` rows from the links they
7617
+ * already carry — the one-time migration of pre-v42 rows, whose topics exist
7618
+ * only in the device-local index and so never reach the server. No LLM call.
7619
+ *
7620
+ * Bumps `topics_updated_at` (that's the point — it's what makes the row
7621
+ * upload) while pinning `updated_at`, like every other topic writer. Callers
7622
+ * must pass a `limit`-bounded list: each row's upload carries its embedding, so
7623
+ * an unbounded pass re-uploads the entire vault at once.
7624
+ *
7625
+ * `source` is derived from `topics_user_managed`, the only provenance a legacy
7626
+ * row has: a curated memory's topics are recorded as `user`, everything else as
7627
+ * `auto`. Skips deleted, foreign-user, unlinked rows, and rows that already have
7628
+ * a record. Returns the ids filled.
7629
+ */
7630
+ declare function backfillMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[]): Promise<string[]>;
7509
7631
  declare function deleteAllVaultMemoriesForUserOp(ctx: VaultMemoryOperationsContext, userId: string): Promise<number>;
7510
7632
  /**
7511
7633
  * The minimal plaintext shape the decay sweep needs — mirrors the `DecayInput`
@@ -7859,7 +7981,11 @@ interface AutoExtractor {
7859
7981
  processTurn(messages: AutoExtractMessage[], conversationId?: string): boolean;
7860
7982
  /** True while a turn's extraction is in flight. */
7861
7983
  isProcessing(): boolean;
7862
- /** Stop accepting new turns. In-flight work continues to completion. */
7984
+ /**
7985
+ * Stop accepting new turns. In-flight work continues to completion, and any
7986
+ * turn already queued (coalesced while an extraction was in flight) is still
7987
+ * flushed — never dropped — so a turn sent right before unmount isn't lost.
7988
+ */
7863
7989
  dispose(): void;
7864
7990
  }
7865
7991
  /**
@@ -10071,8 +10197,17 @@ declare class WatermelonChatStorageAdapter implements ChatStorageAdapter {
10071
10197
  * is TWO-tier (`private | public`); null — and any unrecognised value —
10072
10198
  * reads as 'private', so nothing pre-existing is ever published without an
10073
10199
  * explicit visibility write
10074
- */
10075
- declare const SDK_SCHEMA_VERSION = 41;
10200
+ * - v42: Added topics, topics_updated_at columns to memory_vault so a memory's
10201
+ * topics become the DURABLE record and `entity` / `memory_entity` become a
10202
+ * device-local index over it. Those two tables never sync (entity ids are
10203
+ * locally generated), so a restored device used to receive "curated" /
10204
+ * "already extracted" flags on memories with zero topic links and the graph
10205
+ * recall lane stayed dead. `topics` carries the names across devices;
10206
+ * `topics_updated_at` is a SECOND timestamp because every topic writer pins
10207
+ * `updated_at` on purpose (recall's recency multiplier) and both sync paths
10208
+ * key on `updated_at`, so a topic-only change would neither upload nor merge
10209
+ */
10210
+ declare const SDK_SCHEMA_VERSION = 42;
10076
10211
  /**
10077
10212
  * Combined WatermelonDB schema for all SDK storage modules.
10078
10213
  *
@@ -10158,6 +10293,7 @@ declare const sdkSchema: Readonly<{
10158
10293
  * - v38 → v39: Added `last_observed_at` column to memory_vault (C3 re-observation watermark; stamped on retain merge, distinct from updated_at)
10159
10294
  * - v39 → v40: Added `fact_type`, `archived_at`, `trust_tier` columns to memory_vault for typed memory + decay + Tier-0 security (all nullable + plaintext, NULL backfill)
10160
10295
  * - v40 → v41: Added `visibility`, `twin_opt_in`, `published_at`, `geohash` columns to memory_vault for the People Nearby cross-user visibility axis (two-tier `private | public`; null/unknown grandfathered as 'private')
10296
+ * - v41 → v42: Added `topics` + `topics_updated_at` columns to memory_vault, making a memory's topics the durable synced record and `entity`/`memory_entity` a device-local index over it (null `topics` = pre-v42, backfilled from the row's current links by the sweep)
10161
10297
  */
10162
10298
  declare const sdkMigrations: Readonly<{
10163
10299
  validated: true;
@@ -14306,4 +14442,4 @@ declare function renderAnumaTree(node: AnumaNode): React.ReactElement | null;
14306
14442
  */
14307
14443
  declare function renderAnumaJsx(jsx: string): React.ReactElement | null;
14308
14444
 
14309
- 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, 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 MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageChunk, type MessageFeedback, 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, 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 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 TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, 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 VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, backfillMemoryEntityUserIdsOp, 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, 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, refreshGithubToken, refreshNotionToken, 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, 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, walk, webPlatformStorage, writeEncryptedFile };
14445
+ 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, 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 MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageChunk, type MessageFeedback, 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, 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 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 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, 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, 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, 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, walk, webPlatformStorage, writeEncryptedFile };
@@ -21,6 +21,7 @@ import {
21
21
  archiveVaultMemoryOp,
22
22
  assertVaultScopeForSweep,
23
23
  backfillMemoryEntityUserIdsOp,
24
+ backfillMemoryTopicsOp,
24
25
  capHopsForDensity,
25
26
  chunkAndEmbedAllMessages,
26
27
  chunkAndEmbedMessage,
@@ -131,6 +132,7 @@ import {
131
132
  prepareVaultCandidates,
132
133
  rankPreparedVaultCandidates,
133
134
  recall,
135
+ relinkMemoryTopicsOp,
134
136
  replaceMemoryEntitiesGuardedOp,
135
137
  requestEncryptionKey,
136
138
  requestKeyPair,
@@ -159,7 +161,7 @@ import {
159
161
  updateVaultMemoryOp,
160
162
  useEncryption,
161
163
  vaultMemoryToStored
162
- } from "./chunk-QURYPMCE.mjs";
164
+ } from "./chunk-XXCZVG4Z.mjs";
163
165
  import {
164
166
  PiiRedactor,
165
167
  createStreamingDeAnonymizer,
@@ -6752,6 +6754,12 @@ __decorateClass([
6752
6754
  __decorateClass([
6753
6755
  field3("topics_user_managed")
6754
6756
  ], VaultMemory.prototype, "topicsUserManaged", 2);
6757
+ __decorateClass([
6758
+ field3("topics")
6759
+ ], VaultMemory.prototype, "topics", 2);
6760
+ __decorateClass([
6761
+ field3("topics_updated_at")
6762
+ ], VaultMemory.prototype, "topicsUpdatedAt", 2);
6755
6763
  __decorateClass([
6756
6764
  field3("topics_extracted_at")
6757
6765
  ], VaultMemory.prototype, "topicsExtractedAt", 2);
@@ -8185,7 +8193,6 @@ function createAutoExtractor(options) {
8185
8193
  return true;
8186
8194
  }
8187
8195
  function drainPending() {
8188
- if (disposed) return;
8189
8196
  for (const [conversationId, state] of conversations) {
8190
8197
  if (state.pending) {
8191
8198
  const messages = state.pending;
@@ -8200,7 +8207,7 @@ function createAutoExtractor(options) {
8200
8207
  isProcessing: () => inflight > 0,
8201
8208
  dispose: () => {
8202
8209
  disposed = true;
8203
- for (const state of conversations.values()) state.pending = void 0;
8210
+ if (inflight === 0) drainPending();
8204
8211
  }
8205
8212
  };
8206
8213
  }
@@ -13849,7 +13856,7 @@ __decorateClass([
13849
13856
  ], VaultFolder.prototype, "context", 2);
13850
13857
 
13851
13858
  // src/lib/db/schema.ts
13852
- var SDK_SCHEMA_VERSION = 41;
13859
+ var SDK_SCHEMA_VERSION = 42;
13853
13860
  var sdkSchema = appSchema2({
13854
13861
  version: SDK_SCHEMA_VERSION,
13855
13862
  tables: [
@@ -13971,9 +13978,33 @@ var sdkSchema = appSchema2({
13971
13978
  // links). Auto-extraction then leaves its links alone — the user owns
13972
13979
  // them. Null/false = topics are auto-derived (default).
13973
13980
  { name: "topics_user_managed", type: "boolean", isOptional: true },
13981
+ // The memory's topics as a DURABLE, SYNCED record: a JSON array of
13982
+ // `{name, kind?, source}`, `name` in the caller's display casing (unlike
13983
+ // `entity.canonical_name`, which is lowercased and has no display
13984
+ // column). `entity` / `memory_entity` are a device-local INDEX over this
13985
+ // — their ids are locally generated, so they can never sync — and a
13986
+ // restored device rebuilds them from these names with no LLM call.
13987
+ // Null = predates v42 (backfilled from the row's current links by the
13988
+ // sweep's topicsBackfill bucket). See getMemoriesNeedingTopicExtractionOp.
13989
+ { name: "topics", type: "string", isOptional: true },
13990
+ // Unix ms of the last write to `topics`. A SECOND timestamp is required:
13991
+ // every topic writer deliberately pins `updated_at` so a topic change
13992
+ // doesn't inflate recall's recency multiplier, and both client sync
13993
+ // paths key on `updated_at` — so without this a topic-only change would
13994
+ // neither upload nor merge. Null = `topics` never written.
13995
+ { name: "topics_updated_at", type: "number", isOptional: true },
13974
13996
  // Unix ms of the last LLM topic-extraction pass over this memory's
13975
13997
  // content. Null = never extracted standalone (legacy rows with entity
13976
13998
  // links are grandfathered — see getMemoriesNeedingTopicExtractionOp).
13999
+ //
14000
+ // DEPRECATED (v42) — `topics_updated_at` subsumes this and
14001
+ // `topics_extracted_version` both: null there means never processed, and
14002
+ // non-null with an empty `topics` means processed and found nothing
14003
+ // (today's "answered empty" case), while a release-time
14004
+ // EXTRACTOR_CHANGED_AT constant compared against `topics_updated_at`
14005
+ // replaces the version check. Both columns are kept only to avoid a
14006
+ // column-drop migration in an otherwise additive list; removing them is
14007
+ // a follow-up once `topics` is proven in production.
13977
14008
  { name: "topics_extracted_at", type: "number", isOptional: true },
13978
14009
  // Write-time supersession (A2). When set, this fact was replaced by a
13979
14010
  // newer, incompatible-value fact (e.g. "Lives in Portland" superseded by
@@ -13987,6 +14018,9 @@ var sdkSchema = appSchema2({
13987
14018
  // The extraction-logic version this memory was last stamped under. Null
13988
14019
  // (pre-v38) is treated as version 0, so a bump of TOPICS_EXTRACTION_VERSION
13989
14020
  // re-extracts stale rows. See getMemoriesNeedingTopicExtractionOp.
14021
+ //
14022
+ // DEPRECATED (v42) alongside `topics_extracted_at` — same rationale and
14023
+ // same removal follow-up; see that column's note above.
13990
14024
  { name: "topics_extracted_version", type: "number", isOptional: true },
13991
14025
  // Re-observation watermark (C3). Unix ms of the last time retain() merged
13992
14026
  // a duplicate observation into this fact (proof_count++). Distinct from
@@ -14720,6 +14754,23 @@ var sdkMigrations = schemaMigrations2({
14720
14754
  ]
14721
14755
  })
14722
14756
  ]
14757
+ },
14758
+ // v41 -> v42: topics + topics_updated_at on memory_vault — the durable,
14759
+ // synced record of a memory's topics. Existing rows keep both NULL: the
14760
+ // sweep's topicsBackfill bucket fills them from each row's current entity
14761
+ // links (no LLM), capped under the worker's `limit` so the one-time
14762
+ // re-upload it triggers drains across sweeps instead of spiking.
14763
+ {
14764
+ toVersion: 42,
14765
+ steps: [
14766
+ addColumns2({
14767
+ table: "memory_vault",
14768
+ columns: [
14769
+ { name: "topics", type: "string", isOptional: true },
14770
+ { name: "topics_updated_at", type: "number", isOptional: true }
14771
+ ]
14772
+ })
14773
+ ]
14723
14774
  }
14724
14775
  ]
14725
14776
  });
@@ -24399,6 +24450,7 @@ export {
24399
24450
  appFileToStored,
24400
24451
  archiveVaultMemoryOp,
24401
24452
  backfillMemoryEntityUserIdsOp,
24453
+ backfillMemoryTopicsOp,
24402
24454
  capHopsForDensity,
24403
24455
  chatStorageMigrations,
24404
24456
  chatStorageSchema,
@@ -24634,6 +24686,7 @@ export {
24634
24686
  refreshDriveToken,
24635
24687
  refreshGithubToken,
24636
24688
  refreshNotionToken,
24689
+ relinkMemoryTopicsOp,
24637
24690
  relinkMisclassifiedVideosOp,
24638
24691
  removeById,
24639
24692
  renderAnumaJsx,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  recall
3
- } from "./chunk-QURYPMCE.mjs";
3
+ } from "./chunk-XXCZVG4Z.mjs";
4
4
  import "./chunk-ILAWDQDE.mjs";
5
5
  import "./chunk-GYKJOWEO.mjs";
6
6
  export {