@anuma/sdk 6.2.0 → 6.3.1

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.
@@ -103,8 +103,11 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
103
103
  * unreadable flag would fail open. Existing rows stay NULL (= legacy,
104
104
  * unknown provenance, embedded as before) with no backfill, matching the v37
105
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
106
109
  */
107
- declare const SDK_SCHEMA_VERSION = 44;
110
+ declare const SDK_SCHEMA_VERSION = 45;
108
111
  /**
109
112
  * Combined WatermelonDB schema for all SDK storage modules.
110
113
  *
@@ -4524,6 +4527,10 @@ declare class VaultMemory extends Model$1 {
4524
4527
  /** Unix ms of the last `topics` write. Separate from `updated_at`, which every
4525
4528
  * topic writer pins on purpose (recall recency) — see the schema note. */
4526
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;
4527
4534
  /** Unix ms of the last LLM topic-extraction pass. Null = never extracted
4528
4535
  * standalone (linked legacy rows are grandfathered as extracted).
4529
4536
  * DEPRECATED (v42) — subsumed by `topics_updated_at`; see the schema note. */
@@ -5770,6 +5777,31 @@ interface QuarantinedMemoryInfo {
5770
5777
  interface ExtractFactsOptions extends PortalLlmAuth {
5771
5778
  baseUrl?: string;
5772
5779
  model?: string;
5780
+ /**
5781
+ * Optional per-call request path override, forwarded to
5782
+ * {@link callPortalJsonCompletion}. When set, the extraction call POSTs to
5783
+ * `baseUrl + endpointOverride` instead of the default
5784
+ * `/api/v1/chat/completions` — path only, body unchanged. Lets callers route
5785
+ * this internal-utility pass to a dedicated endpoint. Invalid values throw at
5786
+ * call time (see {@link validateEndpointOverride}).
5787
+ *
5788
+ * Why this exists (anuma-ai/ai-memoryless-client#5536): auto-extraction is the
5789
+ * highest-volume first-party background call in the product — one per
5790
+ * extracting turn, on every platform — and it carries no flow fingerprint, so
5791
+ * the portal's freeloader detector classifies it as scripted abuse. In reject
5792
+ * mode that 403s every basic-tier extraction, which surfaces here as
5793
+ * `onExhaustedEmpty` → `empty-after-retry` and leaves free-tier vaults empty.
5794
+ * {@link TopicExtractOptions.endpointOverride} already exists for the same
5795
+ * reason on the topic pass; this is the fact pass catching up.
5796
+ *
5797
+ * IMPORTANT — the utility endpoint clamps to a PRICE CEILING and never
5798
+ * rejects, so pointing this at `/api/v1/utility/chat/completions` while the
5799
+ * portal's ceiling prices below {@link DEFAULT_EXTRACTION_MODEL} silently
5800
+ * rewrites the model instead of 403-ing. That trades a visible failure for an
5801
+ * invisible quality regression: raise `PORTAL_UTILITY_CEILING_MODEL` to at
5802
+ * least the extraction model's rate BEFORE setting this in a client.
5803
+ */
5804
+ endpointOverride?: string;
5773
5805
  /** Override the global fetch implementation (useful for tests). */
5774
5806
  fetchFn?: typeof fetch;
5775
5807
  /**
@@ -5999,8 +6031,16 @@ interface StoredVaultMemory {
5999
6031
  sourceChunkIds: string[] | null;
6000
6032
  /** Times this fact has been re-observed (for ranking + UX badges). */
6001
6033
  proofCount: number | null;
6002
- /** How the memory was created: manual | auto-extracted | capsule. */
6034
+ /** How the memory was created: manual | auto-extracted | capsule | photo. */
6003
6035
  source: string | null;
6036
+ /** The photo(s) a SERVER-EXTRACTED memory was read out of. Null on every
6037
+ * memory that did not come from a photo. See {@link PhotoMediaRef}.
6038
+ *
6039
+ * OPTIONAL rather than required: every read path sets it (the row mappers
6040
+ * always call parseMedia), but making it required would be a compile-break
6041
+ * for any caller that CONSTRUCTS a StoredVaultMemory — fixtures, mocks, and
6042
+ * anything downstream — for a field that is null on all but photo rows. */
6043
+ media?: PhotoMediaRef[] | null;
6004
6044
  /** W6 temporal lane — Unix ms when the event occurred (point/start of range). */
6005
6045
  eventTimeStart: number | null;
6006
6046
  /** W6 temporal lane — Unix ms when the event ended (range only). */
@@ -6059,6 +6099,26 @@ interface StoredVaultMemory {
6059
6099
  updatedAt: Date;
6060
6100
  isDeleted: boolean;
6061
6101
  }
6102
+ /**
6103
+ * A photo a server-extracted memory came from, as
6104
+ * GET /api/memories/published returns it in `media[]`.
6105
+ *
6106
+ * Both identifiers travel because both are needed: `feedItemId` is the server's
6107
+ * handle for the photo, and `objectKey` is what a client turns into a CDN URL
6108
+ * without another round-trip per memory.
6109
+ */
6110
+ interface PhotoMediaRef {
6111
+ feedItemId: number;
6112
+ objectKey: string | null;
6113
+ }
6114
+ /**
6115
+ * Decode the stored `media` column. Returns null for "no photo behind this
6116
+ * memory" (the column is null on every non-photo row) and tolerates a corrupt
6117
+ * or unexpected payload by reading it as null too — a memory whose photo
6118
+ * reference cannot be parsed is still a perfectly good memory, and losing the
6119
+ * thumbnail is a better failure than losing the row.
6120
+ */
6121
+ declare function parseMedia(value: unknown): PhotoMediaRef[] | null;
6062
6122
  interface CreateVaultMemoryOptions {
6063
6123
  content: string;
6064
6124
  /** Scope for the memory. Defaults to "private" if omitted. */
@@ -6500,6 +6560,95 @@ declare function hardDeleteDecayedOp(ctx: VaultMemoryOperationsContext, id: stri
6500
6560
  }): Promise<boolean>;
6501
6561
  declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
6502
6562
 
6563
+ /**
6564
+ * Ingest server-extracted photo memories into the local vault.
6565
+ *
6566
+ * A photo uploaded to People Nearby is read by the server, which extracts
6567
+ * durable facts about the user, embeds them and publishes them
6568
+ * (anuma-ai/nearby#114). Until those rows reach the device they exist only
6569
+ * server-side: the user's own assistant cannot recall them, and no screen can
6570
+ * show them — so the "visible and deletable" promise the design makes is not
6571
+ * kept. This is the path that brings them home.
6572
+ *
6573
+ * Three things about the shape of this, each of which is load-bearing:
6574
+ *
6575
+ * 1. **It takes rows; it does not fetch them.** The publish reconciler already
6576
+ * calls `listPublished()` on every pass and gets `text`, `media[]`,
6577
+ * `event_time` and `user_authored` back. Ingest consumes that response. No
6578
+ * new endpoint, no second network call, no change to nearby's API.
6579
+ *
6580
+ * 2. **The vault row's id IS the server's `memory_id`.** That is what makes a
6581
+ * revoke addressable: the reconciler's ledger, its published set and its
6582
+ * `toRevoke` list are all keyed on that id, so a locally-minted id would
6583
+ * leave the user with a switch that cannot reach the row it appears to
6584
+ * control. It is also what makes ingest idempotent for free — a second pass
6585
+ * sees the id already present and writes nothing.
6586
+ *
6587
+ * 3. **These rows never go through `retain()`.** That path is for facts being
6588
+ * learned on-device: it dedupes and merges candidates against local rows and
6589
+ * mints its own ids, both of which would break (2). A photo memory is not a
6590
+ * candidate to be reconciled against the vault — it is an already-decided
6591
+ * fact the server has published.
6592
+ *
6593
+ * The rows are written `visibility: "public"` because they genuinely ARE
6594
+ * published — the reconciler reads local visibility as the user's intent, and
6595
+ * anything else would make it immediately revoke a memory the user never turned
6596
+ * off. They carry `source: SOURCE_PHOTO`, which is what exempts them from
6597
+ * decay's auto-archive; see the note there for why archiving one would silently
6598
+ * unpublish it.
6599
+ *
6600
+ * No embedding is computed here. `searchTool`'s un-embedded lane embeds any row
6601
+ * lacking a vector at search time, uses it in that same search and persists it
6602
+ * via `updateVaultMemoryEmbeddingOp` — so a row ingested without one is picked
6603
+ * up on first recall rather than costing an embedding call at ingest.
6604
+ */
6605
+
6606
+ /**
6607
+ * One row of `GET /api/memories/published`, narrowed to what ingest needs.
6608
+ *
6609
+ * Deliberately structural rather than an import from the transport client: this
6610
+ * op is in the SDK and the two hand-written nearby clients live in the app, so
6611
+ * a shared nominal type would drag one across a package boundary for no gain.
6612
+ */
6613
+ interface PublishedPhotoMemory {
6614
+ /** The server-minted memory id. `photo:<feedItemID>:fact:NN` or `:caption`. */
6615
+ memoryId: string;
6616
+ /** The projected fact text. */
6617
+ text: string;
6618
+ /** The photo(s) this fact was read out of. */
6619
+ media?: PhotoMediaRef[] | null;
6620
+ /** When the event in the memory happened, if the server knows. */
6621
+ eventTime?: {
6622
+ start: number | null;
6623
+ end: number | null;
6624
+ kind: "point" | "range" | "ongoing" | null;
6625
+ } | null;
6626
+ /** True when the text is the user's own words (a kept caption). */
6627
+ userAuthored?: boolean;
6628
+ }
6629
+ /** What one ingest pass did, for the caller's logs and tests. */
6630
+ interface PhotoIngestResult {
6631
+ /** Rows newly written to the vault. */
6632
+ inserted: number;
6633
+ /** Rows already present, left untouched. */
6634
+ skipped: number;
6635
+ }
6636
+ /**
6637
+ * Write the published photo memories this vault does not already have.
6638
+ *
6639
+ * Idempotent on `memoryId`: a row whose id is already in the vault is counted as
6640
+ * skipped and NOT rewritten, even when the server's text has since changed.
6641
+ * That is deliberate — the local row is the user's copy, they may have edited
6642
+ * it, and silently overwriting an edit to match the server would be the same
6643
+ * class of bug as publishing a version the user has since changed. Re-ingesting
6644
+ * changed text is a follow-up that needs a merge decision, not a clobber.
6645
+ *
6646
+ * Non-`photo:` ids are ignored: everything else in the published set is a
6647
+ * client-published memory that by definition already lives in this vault (or in
6648
+ * another device's, which is not ours to recreate).
6649
+ */
6650
+ declare function ingestPublishedPhotoMemoriesOp(ctx: VaultMemoryOperationsContext, rows: PublishedPhotoMemory[]): Promise<PhotoIngestResult>;
6651
+
6503
6652
  declare class Project extends Model$1 {
6504
6653
  static table: string;
6505
6654
  static associations: Associations;
@@ -7703,6 +7852,15 @@ declare function createChunkVectorCache(maxSize?: number): ChunkVectorCache;
7703
7852
  * shared purge buffer for every row, so an already-archived manual memory is
7704
7853
  * still deleted after the window (the archived check runs before the manual
7705
7854
  * short-circuit by design).
7855
+ *
7856
+ * `source === "photo"` (server-extracted photo memories) is protected the same
7857
+ * way, and for a sharper reason than curation: those rows are PUBLISHED, and
7858
+ * auto-archiving one would silently un-publish it. Archived rows drop out of the
7859
+ * default vault read, the publish reconciler builds its desired set from that
7860
+ * read, and anything it previously adopted but no longer sees goes into
7861
+ * `toRevoke` — so an age-archive at the medium TTL would revoke a memory from
7862
+ * the server that the user never switched off. Revoking is the user's decision
7863
+ * and has exactly one entry point: the publish switch.
7706
7864
  */
7707
7865
  /** The verdict for a single memory. */
7708
7866
  type DecayVerdict = "keep" | "archive" | "delete";
@@ -10069,4 +10227,4 @@ declare function sanitizeQuotes(s: string): string;
10069
10227
  declare function renderTemplate(value: string | null | undefined, template: string): string | null;
10070
10228
  declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
10071
10229
 
10072
- 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 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 };
10230
+ 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 };
@@ -103,8 +103,11 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
103
103
  * unreadable flag would fail open. Existing rows stay NULL (= legacy,
104
104
  * unknown provenance, embedded as before) with no backfill, matching the v37
105
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
106
109
  */
107
- declare const SDK_SCHEMA_VERSION = 44;
110
+ declare const SDK_SCHEMA_VERSION = 45;
108
111
  /**
109
112
  * Combined WatermelonDB schema for all SDK storage modules.
110
113
  *
@@ -4524,6 +4527,10 @@ declare class VaultMemory extends Model$1 {
4524
4527
  /** Unix ms of the last `topics` write. Separate from `updated_at`, which every
4525
4528
  * topic writer pins on purpose (recall recency) — see the schema note. */
4526
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;
4527
4534
  /** Unix ms of the last LLM topic-extraction pass. Null = never extracted
4528
4535
  * standalone (linked legacy rows are grandfathered as extracted).
4529
4536
  * DEPRECATED (v42) — subsumed by `topics_updated_at`; see the schema note. */
@@ -5770,6 +5777,31 @@ interface QuarantinedMemoryInfo {
5770
5777
  interface ExtractFactsOptions extends PortalLlmAuth {
5771
5778
  baseUrl?: string;
5772
5779
  model?: string;
5780
+ /**
5781
+ * Optional per-call request path override, forwarded to
5782
+ * {@link callPortalJsonCompletion}. When set, the extraction call POSTs to
5783
+ * `baseUrl + endpointOverride` instead of the default
5784
+ * `/api/v1/chat/completions` — path only, body unchanged. Lets callers route
5785
+ * this internal-utility pass to a dedicated endpoint. Invalid values throw at
5786
+ * call time (see {@link validateEndpointOverride}).
5787
+ *
5788
+ * Why this exists (anuma-ai/ai-memoryless-client#5536): auto-extraction is the
5789
+ * highest-volume first-party background call in the product — one per
5790
+ * extracting turn, on every platform — and it carries no flow fingerprint, so
5791
+ * the portal's freeloader detector classifies it as scripted abuse. In reject
5792
+ * mode that 403s every basic-tier extraction, which surfaces here as
5793
+ * `onExhaustedEmpty` → `empty-after-retry` and leaves free-tier vaults empty.
5794
+ * {@link TopicExtractOptions.endpointOverride} already exists for the same
5795
+ * reason on the topic pass; this is the fact pass catching up.
5796
+ *
5797
+ * IMPORTANT — the utility endpoint clamps to a PRICE CEILING and never
5798
+ * rejects, so pointing this at `/api/v1/utility/chat/completions` while the
5799
+ * portal's ceiling prices below {@link DEFAULT_EXTRACTION_MODEL} silently
5800
+ * rewrites the model instead of 403-ing. That trades a visible failure for an
5801
+ * invisible quality regression: raise `PORTAL_UTILITY_CEILING_MODEL` to at
5802
+ * least the extraction model's rate BEFORE setting this in a client.
5803
+ */
5804
+ endpointOverride?: string;
5773
5805
  /** Override the global fetch implementation (useful for tests). */
5774
5806
  fetchFn?: typeof fetch;
5775
5807
  /**
@@ -5999,8 +6031,16 @@ interface StoredVaultMemory {
5999
6031
  sourceChunkIds: string[] | null;
6000
6032
  /** Times this fact has been re-observed (for ranking + UX badges). */
6001
6033
  proofCount: number | null;
6002
- /** How the memory was created: manual | auto-extracted | capsule. */
6034
+ /** How the memory was created: manual | auto-extracted | capsule | photo. */
6003
6035
  source: string | null;
6036
+ /** The photo(s) a SERVER-EXTRACTED memory was read out of. Null on every
6037
+ * memory that did not come from a photo. See {@link PhotoMediaRef}.
6038
+ *
6039
+ * OPTIONAL rather than required: every read path sets it (the row mappers
6040
+ * always call parseMedia), but making it required would be a compile-break
6041
+ * for any caller that CONSTRUCTS a StoredVaultMemory — fixtures, mocks, and
6042
+ * anything downstream — for a field that is null on all but photo rows. */
6043
+ media?: PhotoMediaRef[] | null;
6004
6044
  /** W6 temporal lane — Unix ms when the event occurred (point/start of range). */
6005
6045
  eventTimeStart: number | null;
6006
6046
  /** W6 temporal lane — Unix ms when the event ended (range only). */
@@ -6059,6 +6099,26 @@ interface StoredVaultMemory {
6059
6099
  updatedAt: Date;
6060
6100
  isDeleted: boolean;
6061
6101
  }
6102
+ /**
6103
+ * A photo a server-extracted memory came from, as
6104
+ * GET /api/memories/published returns it in `media[]`.
6105
+ *
6106
+ * Both identifiers travel because both are needed: `feedItemId` is the server's
6107
+ * handle for the photo, and `objectKey` is what a client turns into a CDN URL
6108
+ * without another round-trip per memory.
6109
+ */
6110
+ interface PhotoMediaRef {
6111
+ feedItemId: number;
6112
+ objectKey: string | null;
6113
+ }
6114
+ /**
6115
+ * Decode the stored `media` column. Returns null for "no photo behind this
6116
+ * memory" (the column is null on every non-photo row) and tolerates a corrupt
6117
+ * or unexpected payload by reading it as null too — a memory whose photo
6118
+ * reference cannot be parsed is still a perfectly good memory, and losing the
6119
+ * thumbnail is a better failure than losing the row.
6120
+ */
6121
+ declare function parseMedia(value: unknown): PhotoMediaRef[] | null;
6062
6122
  interface CreateVaultMemoryOptions {
6063
6123
  content: string;
6064
6124
  /** Scope for the memory. Defaults to "private" if omitted. */
@@ -6500,6 +6560,95 @@ declare function hardDeleteDecayedOp(ctx: VaultMemoryOperationsContext, id: stri
6500
6560
  }): Promise<boolean>;
6501
6561
  declare function updateVaultMemoryEmbeddingOp(ctx: VaultMemoryOperationsContext, id: string, embedding: string, embeddingModel: string): Promise<boolean>;
6502
6562
 
6563
+ /**
6564
+ * Ingest server-extracted photo memories into the local vault.
6565
+ *
6566
+ * A photo uploaded to People Nearby is read by the server, which extracts
6567
+ * durable facts about the user, embeds them and publishes them
6568
+ * (anuma-ai/nearby#114). Until those rows reach the device they exist only
6569
+ * server-side: the user's own assistant cannot recall them, and no screen can
6570
+ * show them — so the "visible and deletable" promise the design makes is not
6571
+ * kept. This is the path that brings them home.
6572
+ *
6573
+ * Three things about the shape of this, each of which is load-bearing:
6574
+ *
6575
+ * 1. **It takes rows; it does not fetch them.** The publish reconciler already
6576
+ * calls `listPublished()` on every pass and gets `text`, `media[]`,
6577
+ * `event_time` and `user_authored` back. Ingest consumes that response. No
6578
+ * new endpoint, no second network call, no change to nearby's API.
6579
+ *
6580
+ * 2. **The vault row's id IS the server's `memory_id`.** That is what makes a
6581
+ * revoke addressable: the reconciler's ledger, its published set and its
6582
+ * `toRevoke` list are all keyed on that id, so a locally-minted id would
6583
+ * leave the user with a switch that cannot reach the row it appears to
6584
+ * control. It is also what makes ingest idempotent for free — a second pass
6585
+ * sees the id already present and writes nothing.
6586
+ *
6587
+ * 3. **These rows never go through `retain()`.** That path is for facts being
6588
+ * learned on-device: it dedupes and merges candidates against local rows and
6589
+ * mints its own ids, both of which would break (2). A photo memory is not a
6590
+ * candidate to be reconciled against the vault — it is an already-decided
6591
+ * fact the server has published.
6592
+ *
6593
+ * The rows are written `visibility: "public"` because they genuinely ARE
6594
+ * published — the reconciler reads local visibility as the user's intent, and
6595
+ * anything else would make it immediately revoke a memory the user never turned
6596
+ * off. They carry `source: SOURCE_PHOTO`, which is what exempts them from
6597
+ * decay's auto-archive; see the note there for why archiving one would silently
6598
+ * unpublish it.
6599
+ *
6600
+ * No embedding is computed here. `searchTool`'s un-embedded lane embeds any row
6601
+ * lacking a vector at search time, uses it in that same search and persists it
6602
+ * via `updateVaultMemoryEmbeddingOp` — so a row ingested without one is picked
6603
+ * up on first recall rather than costing an embedding call at ingest.
6604
+ */
6605
+
6606
+ /**
6607
+ * One row of `GET /api/memories/published`, narrowed to what ingest needs.
6608
+ *
6609
+ * Deliberately structural rather than an import from the transport client: this
6610
+ * op is in the SDK and the two hand-written nearby clients live in the app, so
6611
+ * a shared nominal type would drag one across a package boundary for no gain.
6612
+ */
6613
+ interface PublishedPhotoMemory {
6614
+ /** The server-minted memory id. `photo:<feedItemID>:fact:NN` or `:caption`. */
6615
+ memoryId: string;
6616
+ /** The projected fact text. */
6617
+ text: string;
6618
+ /** The photo(s) this fact was read out of. */
6619
+ media?: PhotoMediaRef[] | null;
6620
+ /** When the event in the memory happened, if the server knows. */
6621
+ eventTime?: {
6622
+ start: number | null;
6623
+ end: number | null;
6624
+ kind: "point" | "range" | "ongoing" | null;
6625
+ } | null;
6626
+ /** True when the text is the user's own words (a kept caption). */
6627
+ userAuthored?: boolean;
6628
+ }
6629
+ /** What one ingest pass did, for the caller's logs and tests. */
6630
+ interface PhotoIngestResult {
6631
+ /** Rows newly written to the vault. */
6632
+ inserted: number;
6633
+ /** Rows already present, left untouched. */
6634
+ skipped: number;
6635
+ }
6636
+ /**
6637
+ * Write the published photo memories this vault does not already have.
6638
+ *
6639
+ * Idempotent on `memoryId`: a row whose id is already in the vault is counted as
6640
+ * skipped and NOT rewritten, even when the server's text has since changed.
6641
+ * That is deliberate — the local row is the user's copy, they may have edited
6642
+ * it, and silently overwriting an edit to match the server would be the same
6643
+ * class of bug as publishing a version the user has since changed. Re-ingesting
6644
+ * changed text is a follow-up that needs a merge decision, not a clobber.
6645
+ *
6646
+ * Non-`photo:` ids are ignored: everything else in the published set is a
6647
+ * client-published memory that by definition already lives in this vault (or in
6648
+ * another device's, which is not ours to recreate).
6649
+ */
6650
+ declare function ingestPublishedPhotoMemoriesOp(ctx: VaultMemoryOperationsContext, rows: PublishedPhotoMemory[]): Promise<PhotoIngestResult>;
6651
+
6503
6652
  declare class Project extends Model$1 {
6504
6653
  static table: string;
6505
6654
  static associations: Associations;
@@ -7703,6 +7852,15 @@ declare function createChunkVectorCache(maxSize?: number): ChunkVectorCache;
7703
7852
  * shared purge buffer for every row, so an already-archived manual memory is
7704
7853
  * still deleted after the window (the archived check runs before the manual
7705
7854
  * short-circuit by design).
7855
+ *
7856
+ * `source === "photo"` (server-extracted photo memories) is protected the same
7857
+ * way, and for a sharper reason than curation: those rows are PUBLISHED, and
7858
+ * auto-archiving one would silently un-publish it. Archived rows drop out of the
7859
+ * default vault read, the publish reconciler builds its desired set from that
7860
+ * read, and anything it previously adopted but no longer sees goes into
7861
+ * `toRevoke` — so an age-archive at the medium TTL would revoke a memory from
7862
+ * the server that the user never switched off. Revoking is the user's decision
7863
+ * and has exactly one entry point: the publish switch.
7706
7864
  */
7707
7865
  /** The verdict for a single memory. */
7708
7866
  type DecayVerdict = "keep" | "archive" | "delete";
@@ -10069,4 +10227,4 @@ declare function sanitizeQuotes(s: string): string;
10069
10227
  declare function renderTemplate(value: string | null | undefined, template: string): string | null;
10070
10228
  declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
10071
10229
 
10072
- 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 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 };
10230
+ 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 };