@anuma/sdk 6.1.1 → 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.
@@ -91,8 +91,23 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
91
91
  * conversation list read filters is_deleted and orders by created_at DESC,
92
92
  * which previously meant a temp B-tree sort of the whole live set on every
93
93
  * read. Structural only — no column added, no data rewritten
94
- */
95
- declare const SDK_SCHEMA_VERSION = 43;
94
+ * - v44: Added origin column to history — provenance of a row, set by the
95
+ * producer that synthesised it (`tool_result` = the hidden
96
+ * `[Tool Execution Results]` message written from autoExecutedToolResults).
97
+ * The embedding sweep skips those rows: they are machine-readable API dumps
98
+ * that are never rendered, and chunking one cost 52 MB of vectors (620
99
+ * chunks) against 0.2 MB of content. A content-prefix test cannot do this
100
+ * job — `content` is `enc:v3:` ciphertext by the time the sweep reads it, so
101
+ * provenance has to be recorded at write time. Deliberately NOT encrypted:
102
+ * the sweep that must honour it runs with no wallet context, and an
103
+ * unreadable flag would fail open. Existing rows stay NULL (= legacy,
104
+ * unknown provenance, embedded as before) with no backfill, matching the v37
105
+ * read-time-fallback precedent
106
+ * - v45: Added `media` to memory_vault — the photo(s) a server-extracted
107
+ * memory came from, as JSON `[{feed_item_id, object_key}]`. Null on every
108
+ * row that did not come from a photo, which is all of them before this
109
+ */
110
+ declare const SDK_SCHEMA_VERSION = 45;
96
111
  /**
97
112
  * Combined WatermelonDB schema for all SDK storage modules.
98
113
  *
@@ -180,6 +195,7 @@ declare const sdkSchema: Readonly<{
180
195
  * - 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')
181
196
  * - 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)
182
197
  * - v42 → v43: Added a composite `(is_deleted, created_at)` index to conversations so the list reads stop temp-sorting (structural only, no data rewritten)
198
+ * - v43 → v44: Added `origin` column to history recording which producer synthesised a row, so the embedding sweep can skip never-rendered tool-result dumps (plaintext by design — the sweep has no wallet context; null = legacy, embedded as before)
183
199
  */
184
200
  declare const sdkMigrations: Readonly<{
185
201
  validated: true;
@@ -3406,6 +3422,22 @@ type ChatRole = "user" | "assistant" | "system";
3406
3422
  * - null/undefined: No feedback given
3407
3423
  */
3408
3424
  type MessageFeedback = "like" | "dislike" | null;
3425
+ /**
3426
+ * Which producer synthesised a message, for rows the user did not type and the
3427
+ * UI does not render. Set at write time by that producer; a union so further
3428
+ * synthetic kinds can be added without another column.
3429
+ *
3430
+ * - `tool_result`: the hidden `[Tool Execution Results]` row built from a
3431
+ * turn's auto-executed tool results. Skipped by the embedding sweep (see
3432
+ * `memoryEngine/embeddings`).
3433
+ * - undefined/null: a normal message, or any row written before v44.
3434
+ *
3435
+ * Stored in the plaintext `origin` column — never encrypted. The deferred
3436
+ * embedding sweep that has to honour it runs without wallet context, so an
3437
+ * encrypted flag would be unreadable exactly where it matters and the skip
3438
+ * would fail open.
3439
+ */
3440
+ type MessageOrigin = "tool_result";
3409
3441
  /**
3410
3442
  * Metadata for files attached to messages.
3411
3443
  *
@@ -3516,6 +3548,8 @@ interface StoredMessage {
3516
3548
  feedback?: MessageFeedback;
3517
3549
  /** Tool call events from the backend response (for reconstructing tool call history) */
3518
3550
  toolCallEvents?: LlmapiToolCallEvent[];
3551
+ /** Provenance for synthetic rows; undefined for typed messages and pre-v44 rows */
3552
+ origin?: MessageOrigin;
3519
3553
  /**
3520
3554
  * Set when `content` could not be decrypted on read (#561).
3521
3555
  * The `content` field still holds the original ciphertext — never a
@@ -3655,6 +3689,8 @@ interface CreateMessageOptions {
3655
3689
  parentMessageId?: string;
3656
3690
  /** Tool call events from the backend response (for reconstructing tool call history) */
3657
3691
  toolCallEvents?: LlmapiToolCallEvent[];
3692
+ /** Provenance for synthetic rows; set by the producer, never by user input */
3693
+ origin?: MessageOrigin;
3658
3694
  /**
3659
3695
  * Optional pre-generated unique ID for this message.
3660
3696
  * When provided, used as the WatermelonDB record ID instead of auto-generating one.
@@ -3700,6 +3736,8 @@ declare class Message extends Model$1 {
3700
3736
  parentMessageId?: string;
3701
3737
  feedback?: MessageFeedback;
3702
3738
  toolCallEvents?: LlmapiToolCallEvent[];
3739
+ /** Plaintext by design — see MessageOrigin */
3740
+ origin?: MessageOrigin;
3703
3741
  }
3704
3742
  declare class Conversation extends Model$1 {
3705
3743
  static table: string;
@@ -4489,6 +4527,10 @@ declare class VaultMemory extends Model$1 {
4489
4527
  /** Unix ms of the last `topics` write. Separate from `updated_at`, which every
4490
4528
  * topic writer pins on purpose (recall recency) — see the schema note. */
4491
4529
  topicsUpdatedAt: number | null;
4530
+ /** The photo(s) a SERVER-EXTRACTED memory came from — JSON
4531
+ * `[{feed_item_id, object_key}]`, exactly the shape
4532
+ * GET /api/memories/published returns. Null on anything not from a photo. */
4533
+ media: string | null;
4492
4534
  /** Unix ms of the last LLM topic-extraction pass. Null = never extracted
4493
4535
  * standalone (linked legacy rows are grandfathered as extracted).
4494
4536
  * DEPRECATED (v42) — subsumed by `topics_updated_at`; see the schema note. */
@@ -5964,8 +6006,16 @@ interface StoredVaultMemory {
5964
6006
  sourceChunkIds: string[] | null;
5965
6007
  /** Times this fact has been re-observed (for ranking + UX badges). */
5966
6008
  proofCount: number | null;
5967
- /** How the memory was created: manual | auto-extracted | capsule. */
6009
+ /** How the memory was created: manual | auto-extracted | capsule | photo. */
5968
6010
  source: string | null;
6011
+ /** The photo(s) a SERVER-EXTRACTED memory was read out of. Null on every
6012
+ * memory that did not come from a photo. See {@link PhotoMediaRef}.
6013
+ *
6014
+ * OPTIONAL rather than required: every read path sets it (the row mappers
6015
+ * always call parseMedia), but making it required would be a compile-break
6016
+ * for any caller that CONSTRUCTS a StoredVaultMemory — fixtures, mocks, and
6017
+ * anything downstream — for a field that is null on all but photo rows. */
6018
+ media?: PhotoMediaRef[] | null;
5969
6019
  /** W6 temporal lane — Unix ms when the event occurred (point/start of range). */
5970
6020
  eventTimeStart: number | null;
5971
6021
  /** W6 temporal lane — Unix ms when the event ended (range only). */
@@ -6024,6 +6074,26 @@ interface StoredVaultMemory {
6024
6074
  updatedAt: Date;
6025
6075
  isDeleted: boolean;
6026
6076
  }
6077
+ /**
6078
+ * A photo a server-extracted memory came from, as
6079
+ * GET /api/memories/published returns it in `media[]`.
6080
+ *
6081
+ * Both identifiers travel because both are needed: `feedItemId` is the server's
6082
+ * handle for the photo, and `objectKey` is what a client turns into a CDN URL
6083
+ * without another round-trip per memory.
6084
+ */
6085
+ interface PhotoMediaRef {
6086
+ feedItemId: number;
6087
+ objectKey: string | null;
6088
+ }
6089
+ /**
6090
+ * Decode the stored `media` column. Returns null for "no photo behind this
6091
+ * memory" (the column is null on every non-photo row) and tolerates a corrupt
6092
+ * or unexpected payload by reading it as null too — a memory whose photo
6093
+ * reference cannot be parsed is still a perfectly good memory, and losing the
6094
+ * thumbnail is a better failure than losing the row.
6095
+ */
6096
+ declare function parseMedia(value: unknown): PhotoMediaRef[] | null;
6027
6097
  interface CreateVaultMemoryOptions {
6028
6098
  content: string;
6029
6099
  /** Scope for the memory. Defaults to "private" if omitted. */
@@ -6465,6 +6535,95 @@ declare function hardDeleteDecayedOp(ctx: VaultMemoryOperationsContext, id: stri
6465
6535
  }): Promise<boolean>;
6466
6536
  declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
6467
6537
 
6538
+ /**
6539
+ * Ingest server-extracted photo memories into the local vault.
6540
+ *
6541
+ * A photo uploaded to People Nearby is read by the server, which extracts
6542
+ * durable facts about the user, embeds them and publishes them
6543
+ * (anuma-ai/nearby#114). Until those rows reach the device they exist only
6544
+ * server-side: the user's own assistant cannot recall them, and no screen can
6545
+ * show them — so the "visible and deletable" promise the design makes is not
6546
+ * kept. This is the path that brings them home.
6547
+ *
6548
+ * Three things about the shape of this, each of which is load-bearing:
6549
+ *
6550
+ * 1. **It takes rows; it does not fetch them.** The publish reconciler already
6551
+ * calls `listPublished()` on every pass and gets `text`, `media[]`,
6552
+ * `event_time` and `user_authored` back. Ingest consumes that response. No
6553
+ * new endpoint, no second network call, no change to nearby's API.
6554
+ *
6555
+ * 2. **The vault row's id IS the server's `memory_id`.** That is what makes a
6556
+ * revoke addressable: the reconciler's ledger, its published set and its
6557
+ * `toRevoke` list are all keyed on that id, so a locally-minted id would
6558
+ * leave the user with a switch that cannot reach the row it appears to
6559
+ * control. It is also what makes ingest idempotent for free — a second pass
6560
+ * sees the id already present and writes nothing.
6561
+ *
6562
+ * 3. **These rows never go through `retain()`.** That path is for facts being
6563
+ * learned on-device: it dedupes and merges candidates against local rows and
6564
+ * mints its own ids, both of which would break (2). A photo memory is not a
6565
+ * candidate to be reconciled against the vault — it is an already-decided
6566
+ * fact the server has published.
6567
+ *
6568
+ * The rows are written `visibility: "public"` because they genuinely ARE
6569
+ * published — the reconciler reads local visibility as the user's intent, and
6570
+ * anything else would make it immediately revoke a memory the user never turned
6571
+ * off. They carry `source: SOURCE_PHOTO`, which is what exempts them from
6572
+ * decay's auto-archive; see the note there for why archiving one would silently
6573
+ * unpublish it.
6574
+ *
6575
+ * No embedding is computed here. `searchTool`'s un-embedded lane embeds any row
6576
+ * lacking a vector at search time, uses it in that same search and persists it
6577
+ * via `updateVaultMemoryEmbeddingOp` — so a row ingested without one is picked
6578
+ * up on first recall rather than costing an embedding call at ingest.
6579
+ */
6580
+
6581
+ /**
6582
+ * One row of `GET /api/memories/published`, narrowed to what ingest needs.
6583
+ *
6584
+ * Deliberately structural rather than an import from the transport client: this
6585
+ * op is in the SDK and the two hand-written nearby clients live in the app, so
6586
+ * a shared nominal type would drag one across a package boundary for no gain.
6587
+ */
6588
+ interface PublishedPhotoMemory {
6589
+ /** The server-minted memory id. `photo:<feedItemID>:fact:NN` or `:caption`. */
6590
+ memoryId: string;
6591
+ /** The projected fact text. */
6592
+ text: string;
6593
+ /** The photo(s) this fact was read out of. */
6594
+ media?: PhotoMediaRef[] | null;
6595
+ /** When the event in the memory happened, if the server knows. */
6596
+ eventTime?: {
6597
+ start: number | null;
6598
+ end: number | null;
6599
+ kind: "point" | "range" | "ongoing" | null;
6600
+ } | null;
6601
+ /** True when the text is the user's own words (a kept caption). */
6602
+ userAuthored?: boolean;
6603
+ }
6604
+ /** What one ingest pass did, for the caller's logs and tests. */
6605
+ interface PhotoIngestResult {
6606
+ /** Rows newly written to the vault. */
6607
+ inserted: number;
6608
+ /** Rows already present, left untouched. */
6609
+ skipped: number;
6610
+ }
6611
+ /**
6612
+ * Write the published photo memories this vault does not already have.
6613
+ *
6614
+ * Idempotent on `memoryId`: a row whose id is already in the vault is counted as
6615
+ * skipped and NOT rewritten, even when the server's text has since changed.
6616
+ * That is deliberate — the local row is the user's copy, they may have edited
6617
+ * it, and silently overwriting an edit to match the server would be the same
6618
+ * class of bug as publishing a version the user has since changed. Re-ingesting
6619
+ * changed text is a follow-up that needs a merge decision, not a clobber.
6620
+ *
6621
+ * Non-`photo:` ids are ignored: everything else in the published set is a
6622
+ * client-published memory that by definition already lives in this vault (or in
6623
+ * another device's, which is not ours to recreate).
6624
+ */
6625
+ declare function ingestPublishedPhotoMemoriesOp(ctx: VaultMemoryOperationsContext, rows: PublishedPhotoMemory[]): Promise<PhotoIngestResult>;
6626
+
6468
6627
  declare class Project extends Model$1 {
6469
6628
  static table: string;
6470
6629
  static associations: Associations;
@@ -7668,6 +7827,15 @@ declare function createChunkVectorCache(maxSize?: number): ChunkVectorCache;
7668
7827
  * shared purge buffer for every row, so an already-archived manual memory is
7669
7828
  * still deleted after the window (the archived check runs before the manual
7670
7829
  * short-circuit by design).
7830
+ *
7831
+ * `source === "photo"` (server-extracted photo memories) is protected the same
7832
+ * way, and for a sharper reason than curation: those rows are PUBLISHED, and
7833
+ * auto-archiving one would silently un-publish it. Archived rows drop out of the
7834
+ * default vault read, the publish reconciler builds its desired set from that
7835
+ * read, and anything it previously adopted but no longer sees goes into
7836
+ * `toRevoke` — so an age-archive at the medium TTL would revoke a memory from
7837
+ * the server that the user never switched off. Revoking is the user's decision
7838
+ * and has exactly one entry point: the publish switch.
7671
7839
  */
7672
7840
  /** The verdict for a single memory. */
7673
7841
  type DecayVerdict = "keep" | "archive" | "delete";
@@ -10034,4 +10202,4 @@ declare function sanitizeQuotes(s: string): string;
10034
10202
  declare function renderTemplate(value: string | null | undefined, template: string): string | null;
10035
10203
  declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
10036
10204
 
10037
- export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
10205
+ export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
@@ -91,8 +91,23 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
91
91
  * conversation list read filters is_deleted and orders by created_at DESC,
92
92
  * which previously meant a temp B-tree sort of the whole live set on every
93
93
  * read. Structural only — no column added, no data rewritten
94
- */
95
- declare const SDK_SCHEMA_VERSION = 43;
94
+ * - v44: Added origin column to history — provenance of a row, set by the
95
+ * producer that synthesised it (`tool_result` = the hidden
96
+ * `[Tool Execution Results]` message written from autoExecutedToolResults).
97
+ * The embedding sweep skips those rows: they are machine-readable API dumps
98
+ * that are never rendered, and chunking one cost 52 MB of vectors (620
99
+ * chunks) against 0.2 MB of content. A content-prefix test cannot do this
100
+ * job — `content` is `enc:v3:` ciphertext by the time the sweep reads it, so
101
+ * provenance has to be recorded at write time. Deliberately NOT encrypted:
102
+ * the sweep that must honour it runs with no wallet context, and an
103
+ * unreadable flag would fail open. Existing rows stay NULL (= legacy,
104
+ * unknown provenance, embedded as before) with no backfill, matching the v37
105
+ * read-time-fallback precedent
106
+ * - v45: Added `media` to memory_vault — the photo(s) a server-extracted
107
+ * memory came from, as JSON `[{feed_item_id, object_key}]`. Null on every
108
+ * row that did not come from a photo, which is all of them before this
109
+ */
110
+ declare const SDK_SCHEMA_VERSION = 45;
96
111
  /**
97
112
  * Combined WatermelonDB schema for all SDK storage modules.
98
113
  *
@@ -180,6 +195,7 @@ declare const sdkSchema: Readonly<{
180
195
  * - 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')
181
196
  * - 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)
182
197
  * - v42 → v43: Added a composite `(is_deleted, created_at)` index to conversations so the list reads stop temp-sorting (structural only, no data rewritten)
198
+ * - v43 → v44: Added `origin` column to history recording which producer synthesised a row, so the embedding sweep can skip never-rendered tool-result dumps (plaintext by design — the sweep has no wallet context; null = legacy, embedded as before)
183
199
  */
184
200
  declare const sdkMigrations: Readonly<{
185
201
  validated: true;
@@ -3406,6 +3422,22 @@ type ChatRole = "user" | "assistant" | "system";
3406
3422
  * - null/undefined: No feedback given
3407
3423
  */
3408
3424
  type MessageFeedback = "like" | "dislike" | null;
3425
+ /**
3426
+ * Which producer synthesised a message, for rows the user did not type and the
3427
+ * UI does not render. Set at write time by that producer; a union so further
3428
+ * synthetic kinds can be added without another column.
3429
+ *
3430
+ * - `tool_result`: the hidden `[Tool Execution Results]` row built from a
3431
+ * turn's auto-executed tool results. Skipped by the embedding sweep (see
3432
+ * `memoryEngine/embeddings`).
3433
+ * - undefined/null: a normal message, or any row written before v44.
3434
+ *
3435
+ * Stored in the plaintext `origin` column — never encrypted. The deferred
3436
+ * embedding sweep that has to honour it runs without wallet context, so an
3437
+ * encrypted flag would be unreadable exactly where it matters and the skip
3438
+ * would fail open.
3439
+ */
3440
+ type MessageOrigin = "tool_result";
3409
3441
  /**
3410
3442
  * Metadata for files attached to messages.
3411
3443
  *
@@ -3516,6 +3548,8 @@ interface StoredMessage {
3516
3548
  feedback?: MessageFeedback;
3517
3549
  /** Tool call events from the backend response (for reconstructing tool call history) */
3518
3550
  toolCallEvents?: LlmapiToolCallEvent[];
3551
+ /** Provenance for synthetic rows; undefined for typed messages and pre-v44 rows */
3552
+ origin?: MessageOrigin;
3519
3553
  /**
3520
3554
  * Set when `content` could not be decrypted on read (#561).
3521
3555
  * The `content` field still holds the original ciphertext — never a
@@ -3655,6 +3689,8 @@ interface CreateMessageOptions {
3655
3689
  parentMessageId?: string;
3656
3690
  /** Tool call events from the backend response (for reconstructing tool call history) */
3657
3691
  toolCallEvents?: LlmapiToolCallEvent[];
3692
+ /** Provenance for synthetic rows; set by the producer, never by user input */
3693
+ origin?: MessageOrigin;
3658
3694
  /**
3659
3695
  * Optional pre-generated unique ID for this message.
3660
3696
  * When provided, used as the WatermelonDB record ID instead of auto-generating one.
@@ -3700,6 +3736,8 @@ declare class Message extends Model$1 {
3700
3736
  parentMessageId?: string;
3701
3737
  feedback?: MessageFeedback;
3702
3738
  toolCallEvents?: LlmapiToolCallEvent[];
3739
+ /** Plaintext by design — see MessageOrigin */
3740
+ origin?: MessageOrigin;
3703
3741
  }
3704
3742
  declare class Conversation extends Model$1 {
3705
3743
  static table: string;
@@ -4489,6 +4527,10 @@ declare class VaultMemory extends Model$1 {
4489
4527
  /** Unix ms of the last `topics` write. Separate from `updated_at`, which every
4490
4528
  * topic writer pins on purpose (recall recency) — see the schema note. */
4491
4529
  topicsUpdatedAt: number | null;
4530
+ /** The photo(s) a SERVER-EXTRACTED memory came from — JSON
4531
+ * `[{feed_item_id, object_key}]`, exactly the shape
4532
+ * GET /api/memories/published returns. Null on anything not from a photo. */
4533
+ media: string | null;
4492
4534
  /** Unix ms of the last LLM topic-extraction pass. Null = never extracted
4493
4535
  * standalone (linked legacy rows are grandfathered as extracted).
4494
4536
  * DEPRECATED (v42) — subsumed by `topics_updated_at`; see the schema note. */
@@ -5964,8 +6006,16 @@ interface StoredVaultMemory {
5964
6006
  sourceChunkIds: string[] | null;
5965
6007
  /** Times this fact has been re-observed (for ranking + UX badges). */
5966
6008
  proofCount: number | null;
5967
- /** How the memory was created: manual | auto-extracted | capsule. */
6009
+ /** How the memory was created: manual | auto-extracted | capsule | photo. */
5968
6010
  source: string | null;
6011
+ /** The photo(s) a SERVER-EXTRACTED memory was read out of. Null on every
6012
+ * memory that did not come from a photo. See {@link PhotoMediaRef}.
6013
+ *
6014
+ * OPTIONAL rather than required: every read path sets it (the row mappers
6015
+ * always call parseMedia), but making it required would be a compile-break
6016
+ * for any caller that CONSTRUCTS a StoredVaultMemory — fixtures, mocks, and
6017
+ * anything downstream — for a field that is null on all but photo rows. */
6018
+ media?: PhotoMediaRef[] | null;
5969
6019
  /** W6 temporal lane — Unix ms when the event occurred (point/start of range). */
5970
6020
  eventTimeStart: number | null;
5971
6021
  /** W6 temporal lane — Unix ms when the event ended (range only). */
@@ -6024,6 +6074,26 @@ interface StoredVaultMemory {
6024
6074
  updatedAt: Date;
6025
6075
  isDeleted: boolean;
6026
6076
  }
6077
+ /**
6078
+ * A photo a server-extracted memory came from, as
6079
+ * GET /api/memories/published returns it in `media[]`.
6080
+ *
6081
+ * Both identifiers travel because both are needed: `feedItemId` is the server's
6082
+ * handle for the photo, and `objectKey` is what a client turns into a CDN URL
6083
+ * without another round-trip per memory.
6084
+ */
6085
+ interface PhotoMediaRef {
6086
+ feedItemId: number;
6087
+ objectKey: string | null;
6088
+ }
6089
+ /**
6090
+ * Decode the stored `media` column. Returns null for "no photo behind this
6091
+ * memory" (the column is null on every non-photo row) and tolerates a corrupt
6092
+ * or unexpected payload by reading it as null too — a memory whose photo
6093
+ * reference cannot be parsed is still a perfectly good memory, and losing the
6094
+ * thumbnail is a better failure than losing the row.
6095
+ */
6096
+ declare function parseMedia(value: unknown): PhotoMediaRef[] | null;
6027
6097
  interface CreateVaultMemoryOptions {
6028
6098
  content: string;
6029
6099
  /** Scope for the memory. Defaults to "private" if omitted. */
@@ -6465,6 +6535,95 @@ declare function hardDeleteDecayedOp(ctx: VaultMemoryOperationsContext, id: stri
6465
6535
  }): Promise<boolean>;
6466
6536
  declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
6467
6537
 
6538
+ /**
6539
+ * Ingest server-extracted photo memories into the local vault.
6540
+ *
6541
+ * A photo uploaded to People Nearby is read by the server, which extracts
6542
+ * durable facts about the user, embeds them and publishes them
6543
+ * (anuma-ai/nearby#114). Until those rows reach the device they exist only
6544
+ * server-side: the user's own assistant cannot recall them, and no screen can
6545
+ * show them — so the "visible and deletable" promise the design makes is not
6546
+ * kept. This is the path that brings them home.
6547
+ *
6548
+ * Three things about the shape of this, each of which is load-bearing:
6549
+ *
6550
+ * 1. **It takes rows; it does not fetch them.** The publish reconciler already
6551
+ * calls `listPublished()` on every pass and gets `text`, `media[]`,
6552
+ * `event_time` and `user_authored` back. Ingest consumes that response. No
6553
+ * new endpoint, no second network call, no change to nearby's API.
6554
+ *
6555
+ * 2. **The vault row's id IS the server's `memory_id`.** That is what makes a
6556
+ * revoke addressable: the reconciler's ledger, its published set and its
6557
+ * `toRevoke` list are all keyed on that id, so a locally-minted id would
6558
+ * leave the user with a switch that cannot reach the row it appears to
6559
+ * control. It is also what makes ingest idempotent for free — a second pass
6560
+ * sees the id already present and writes nothing.
6561
+ *
6562
+ * 3. **These rows never go through `retain()`.** That path is for facts being
6563
+ * learned on-device: it dedupes and merges candidates against local rows and
6564
+ * mints its own ids, both of which would break (2). A photo memory is not a
6565
+ * candidate to be reconciled against the vault — it is an already-decided
6566
+ * fact the server has published.
6567
+ *
6568
+ * The rows are written `visibility: "public"` because they genuinely ARE
6569
+ * published — the reconciler reads local visibility as the user's intent, and
6570
+ * anything else would make it immediately revoke a memory the user never turned
6571
+ * off. They carry `source: SOURCE_PHOTO`, which is what exempts them from
6572
+ * decay's auto-archive; see the note there for why archiving one would silently
6573
+ * unpublish it.
6574
+ *
6575
+ * No embedding is computed here. `searchTool`'s un-embedded lane embeds any row
6576
+ * lacking a vector at search time, uses it in that same search and persists it
6577
+ * via `updateVaultMemoryEmbeddingOp` — so a row ingested without one is picked
6578
+ * up on first recall rather than costing an embedding call at ingest.
6579
+ */
6580
+
6581
+ /**
6582
+ * One row of `GET /api/memories/published`, narrowed to what ingest needs.
6583
+ *
6584
+ * Deliberately structural rather than an import from the transport client: this
6585
+ * op is in the SDK and the two hand-written nearby clients live in the app, so
6586
+ * a shared nominal type would drag one across a package boundary for no gain.
6587
+ */
6588
+ interface PublishedPhotoMemory {
6589
+ /** The server-minted memory id. `photo:<feedItemID>:fact:NN` or `:caption`. */
6590
+ memoryId: string;
6591
+ /** The projected fact text. */
6592
+ text: string;
6593
+ /** The photo(s) this fact was read out of. */
6594
+ media?: PhotoMediaRef[] | null;
6595
+ /** When the event in the memory happened, if the server knows. */
6596
+ eventTime?: {
6597
+ start: number | null;
6598
+ end: number | null;
6599
+ kind: "point" | "range" | "ongoing" | null;
6600
+ } | null;
6601
+ /** True when the text is the user's own words (a kept caption). */
6602
+ userAuthored?: boolean;
6603
+ }
6604
+ /** What one ingest pass did, for the caller's logs and tests. */
6605
+ interface PhotoIngestResult {
6606
+ /** Rows newly written to the vault. */
6607
+ inserted: number;
6608
+ /** Rows already present, left untouched. */
6609
+ skipped: number;
6610
+ }
6611
+ /**
6612
+ * Write the published photo memories this vault does not already have.
6613
+ *
6614
+ * Idempotent on `memoryId`: a row whose id is already in the vault is counted as
6615
+ * skipped and NOT rewritten, even when the server's text has since changed.
6616
+ * That is deliberate — the local row is the user's copy, they may have edited
6617
+ * it, and silently overwriting an edit to match the server would be the same
6618
+ * class of bug as publishing a version the user has since changed. Re-ingesting
6619
+ * changed text is a follow-up that needs a merge decision, not a clobber.
6620
+ *
6621
+ * Non-`photo:` ids are ignored: everything else in the published set is a
6622
+ * client-published memory that by definition already lives in this vault (or in
6623
+ * another device's, which is not ours to recreate).
6624
+ */
6625
+ declare function ingestPublishedPhotoMemoriesOp(ctx: VaultMemoryOperationsContext, rows: PublishedPhotoMemory[]): Promise<PhotoIngestResult>;
6626
+
6468
6627
  declare class Project extends Model$1 {
6469
6628
  static table: string;
6470
6629
  static associations: Associations;
@@ -7668,6 +7827,15 @@ declare function createChunkVectorCache(maxSize?: number): ChunkVectorCache;
7668
7827
  * shared purge buffer for every row, so an already-archived manual memory is
7669
7828
  * still deleted after the window (the archived check runs before the manual
7670
7829
  * short-circuit by design).
7830
+ *
7831
+ * `source === "photo"` (server-extracted photo memories) is protected the same
7832
+ * way, and for a sharper reason than curation: those rows are PUBLISHED, and
7833
+ * auto-archiving one would silently un-publish it. Archived rows drop out of the
7834
+ * default vault read, the publish reconciler builds its desired set from that
7835
+ * read, and anything it previously adopted but no longer sees goes into
7836
+ * `toRevoke` — so an age-archive at the medium TTL would revoke a memory from
7837
+ * the server that the user never switched off. Revoking is the user's decision
7838
+ * and has exactly one entry point: the publish switch.
7671
7839
  */
7672
7840
  /** The verdict for a single memory. */
7673
7841
  type DecayVerdict = "keep" | "archive" | "delete";
@@ -10034,4 +10202,4 @@ declare function sanitizeQuotes(s: string): string;
10034
10202
  declare function renderTemplate(value: string | null | undefined, template: string): string | null;
10035
10203
  declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
10036
10204
 
10037
- export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
10205
+ export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };