@anuma/sdk 6.21.1 → 6.22.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.
@@ -4730,6 +4730,12 @@ declare function getConversationsPageOp(ctx: StorageOperationsContext, options?:
4730
4730
  * with no project.
4731
4731
  */
4732
4732
  declare function getConversationsByProjectLazyOp(ctx: StorageOperationsContext, projectId: string | null): Promise<LazyStoredConversation[]>;
4733
+ /**
4734
+ * Delete a single message by its unique ID.
4735
+ * Clears file_ids before deletion and returns the unique ID.
4736
+ * Note: Callers should use deleteMediaByMessageOp to cascade delete media.
4737
+ */
4738
+ declare function deleteMessageOp(ctx: StorageOperationsContext, uniqueId: string): Promise<string | null>;
4733
4739
  /**
4734
4740
  * Create-or-update a message keyed by `opts.uniqueId`.
4735
4741
  *
@@ -5351,6 +5357,7 @@ interface MemoryVaultSearchOptions {
5351
5357
  * types. Applied at load time via `Q.oneOf` on the indexed `fact_type`
5352
5358
  * column. Omit for no type filter. */
5353
5359
  factTypes?: string[];
5360
+ memoryIds?: string[];
5354
5361
  /**
5355
5362
  * PR5 — optional per-FactType score multiplier applied in the boost stage
5356
5363
  * (e.g. `{ identity: 1.2, ongoing_context: 0.8 }`). Empty/omitted = uniform
@@ -5673,6 +5680,11 @@ interface RecallOptions {
5673
5680
  * and no-op when unset (all types are eligible). Vault-only.
5674
5681
  */
5675
5682
  factTypes?: FactType[];
5683
+ /** Restrict fact candidates BEFORE ranking. Empty means no facts. When set,
5684
+ * unrestricted chunk search is disabled; it must not escape a topic scope.
5685
+ * Asking for `"chunk"` alongside this yields no excerpts and reports
5686
+ * `"chunks-scope-restricted"` on {@link RecallDiagnostics.degraded}. */
5687
+ memoryIds?: string[];
5676
5688
  /**
5677
5689
  * PR5 — optional per-FactType score multiplier applied in the fusion boost
5678
5690
  * stage (e.g. boost `identity`/`constraint`, down-weight `ongoing_context`).
@@ -5848,7 +5860,13 @@ type RecallDegradation =
5848
5860
  | "graph-lane-failed"
5849
5861
  /** The W6 temporal side lane threw and was dropped. Same posture as the graph
5850
5862
  * lane: recall still returned, ranked without the temporal signal. */
5851
- | "temporal-lane-failed";
5863
+ | "temporal-lane-failed"
5864
+ /** {@link RecallOptions.memoryIds} was set and `types` asked for `"chunk"`.
5865
+ * Conversation excerpts have no equivalent membership filter, so running the
5866
+ * chunk lane would escape the topic/folder scope — it is dropped instead.
5867
+ * Without this signal a scoped caller asking for excerpts got an empty
5868
+ * result indistinguishable from "the vault had no match". */
5869
+ | "chunks-scope-restricted";
5852
5870
  /**
5853
5871
  * Why a recall returned nothing. `""` when it returned something, so the field
5854
5872
  * is always present and groupable rather than being absent on the healthy path.
@@ -6803,6 +6821,14 @@ interface UpdateVaultMemoryOptions {
6803
6821
  * two parallel retain() calls observe each other's commits and neither
6804
6822
  * loses its increment. Wins over `proofCount` when both are set. */
6805
6823
  proofCountIncrement?: number;
6824
+ /** Source ids for an observation. Unioned inside the writer. A replay whose
6825
+ * ids are all already on the row contributes no new evidence, so
6826
+ * `proofCount`/`proofCountIncrement` and {@link lastObservedAt} are skipped —
6827
+ * but the write still lands: `content`, `embedding`, `restore`, `eventTime`
6828
+ * and the rest apply, because a consolidation rewrite legitimately carries
6829
+ * the same source ids as the observation that triggered it.
6830
+ * Omit for unkeyed/manual observations. */
6831
+ observationSourceIds?: string[];
6806
6832
  /** Set source ("manual" | "auto-extracted" | "capsule"). */
6807
6833
  source?: string;
6808
6834
  /**
@@ -6856,6 +6882,9 @@ interface VaultMemoryOperationsContext {
6856
6882
  embeddedWalletSigner?: EmbeddedWalletSignerFn;
6857
6883
  /** When set, operations scope to this user (server-side multi-user). */
6858
6884
  userId?: string;
6885
+ /** Optional extraction source eligibility check, executed inside the writer.
6886
+ * Must only read the database (must not start another writer). */
6887
+ canWrite?: () => Promise<boolean>;
6859
6888
  /**
6860
6889
  * Asserts this context runs against a physically single-tenant database — one
6861
6890
  * where every row belongs to the same owner (the per-wallet client DBs, which
@@ -6896,6 +6925,7 @@ declare function getAllVaultMemoriesOp(ctx: VaultMemoryOperationsContext, option
6896
6925
  includeQuarantined?: boolean;
6897
6926
  /** Typed memory (PR1) — restrict to these fact types. Omit for no filter. */
6898
6927
  factTypes?: string[];
6928
+ memoryIds?: string[];
6899
6929
  /**
6900
6930
  * Include A2-superseded memories (each carries `supersededBy`). Default
6901
6931
  * `false` — superseded rows are excluded, as they are from recall/dedup.
@@ -7155,6 +7185,7 @@ interface DecayCandidateRaw {
7155
7185
  /** Unix ms — the raw `updated_at`, used both for the age rule and as the
7156
7186
  * optimistic-concurrency guard passed back to {@link archiveVaultMemoryOp}. */
7157
7187
  updatedAt: number;
7188
+ lastObservedAt?: number | null;
7158
7189
  archivedAt: number | null;
7159
7190
  source: string | null;
7160
7191
  /** `trusted` | `quarantined` | null. Quarantined rows still decay by RULE, but
@@ -7199,6 +7230,8 @@ declare function archiveVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: str
7199
7230
  /** Optimistic-concurrency guard: skip if the row's `updated_at` changed
7200
7231
  * since the sweep observed it (a concurrent re-observation). */
7201
7232
  expectedUpdatedAt?: number;
7233
+ /** Also guard re-observations, which deliberately preserve updated_at. */
7234
+ expectedLastObservedAt?: number | null;
7202
7235
  }): Promise<boolean>;
7203
7236
  /**
7204
7237
  * Restore an archived memory (PR2) — clear `archived_at` so it re-enters recall.
@@ -7550,7 +7583,8 @@ declare class WalletPoller {
7550
7583
  *
7551
7584
  * The watermark advances only when the extractor genuinely EXAMINED the window.
7552
7585
  * A pipeline throw and an `empty-after-retry` outcome (the extraction LLM
7553
- * returned empty/malformed after exhausting its retries) both leave it in place,
7586
+ * returned empty/malformed after exhausting its retries), or any failed retain
7587
+ * operation leave it in place,
7554
7588
  * so the next turn's window re-covers those messages instead of stranding them.
7555
7589
  * A quiet turn that legitimately yielded no facts *does* advance it.
7556
7590
  *
@@ -7943,6 +7977,8 @@ interface DecayInput {
7943
7977
  eventTimeKind: string | null;
7944
7978
  /** Unix ms of the row's last write (re-observation resets this). */
7945
7979
  updatedAt: number;
7980
+ /** Last distinct observation; does not change the edit timestamp. */
7981
+ lastObservedAt?: number | null;
7946
7982
  /** Unix ms when archived, or null when active. */
7947
7983
  archivedAt: number | null;
7948
7984
  /** `manual` | `auto-extracted` | `capsule` | null. Manual is never decayed. */
@@ -8505,6 +8541,8 @@ interface RecallToolOptions {
8505
8541
  minScore?: number;
8506
8542
  /** Vault scope filter. */
8507
8543
  scopes?: string[];
8544
+ /** Topic membership, enforced before fact ranking; disables unrestricted chunks. */
8545
+ memoryIds?: string[];
8508
8546
  /** Vault folder filter. */
8509
8547
  folderId?: string | null;
8510
8548
  /** Exclude one conversation from chunk results (typically the active one). */
@@ -8578,7 +8616,30 @@ interface ReflectOptions extends RecallOptions, PortalLlmAuth {
8578
8616
  llmModel?: string;
8579
8617
  /** Cap response length. Default: 4096. */
8580
8618
  maxTokens?: number;
8581
- /** Override the grounding system prompt. */
8619
+ /**
8620
+ * Override the grounding system prompt.
8621
+ *
8622
+ * ⚠ DOING THIS MAKES THE REQUEST'S PROVENANCE YOURS. The default prompt's first sentence is
8623
+ * this flow's fingerprint in the portal's freeloader (anti-bot) detector (see
8624
+ * {@link DEFAULT_SYSTEM_PROMPT}); replacing it wholesale removes that, and a free-tier request
8625
+ * carrying no recognised provenance is rejected outright once the portal's markerless reject is
8626
+ * enabled — a 403, not a degraded answer.
8627
+ *
8628
+ * Which replacement is correct depends on what the call IS, and there is no safe default:
8629
+ *
8630
+ * - **A background/internal call** (a fixed-purpose helper, not a user's own question): prepend
8631
+ * {@link withInternalFlowMarker}, which is exported for exactly this. That is what
8632
+ * profile-facet synthesis does.
8633
+ * - **A user-facing call** (the person is asking their own question and expects an answer):
8634
+ * do NOT use the internal marker — it asserts "not user chat" and would be false. Keep the
8635
+ * default prompt, or append your instructions to it rather than replacing it, so the
8636
+ * fingerprint survives. A genuinely distinct user-facing flow needs its own fingerprint
8637
+ * registered in ai-portal `internal/detection/markers.go`.
8638
+ *
8639
+ * Appending is the cheap way to stay safe: `${DEFAULT_SYSTEM_PROMPT}\n\n${yourInstructions}`
8640
+ * keeps the fingerprint as a prefix. `reflect.test.ts` pins both the marked and the bare
8641
+ * override paths so this stays true.
8642
+ */
8582
8643
  systemPrompt?: string;
8583
8644
  /**
8584
8645
  * Extra caller instruction to carry on the USER turn, between the question and
@@ -9321,6 +9382,83 @@ declare function verifyMemoriesForPublish(memories: readonly MemoryToVerify[], s
9321
9382
  */
9322
9383
  declare function createMessageSourceResolver(ctx: StorageOperationsContext): VerificationSources;
9323
9384
 
9385
+ type MemoryContextLane = "profile" | "fact" | "episode" | "session";
9386
+ interface MemoryContextItem {
9387
+ id: string;
9388
+ content: string;
9389
+ score: number;
9390
+ lane: MemoryContextLane;
9391
+ sourceIds: string[];
9392
+ /** Ranked fact evidence, retained when profile deduplication wins placement. */
9393
+ recalled?: boolean;
9394
+ }
9395
+ interface MemoryContextOptions {
9396
+ query: string;
9397
+ recall: (query: string, options: RecallOptions) => Promise<RecallResult>;
9398
+ loadFacts?: ((options: Parameters<typeof getAllVaultMemoriesOp>[1]) => Promise<StoredVaultMemory[]>) | null;
9399
+ loadSessionRefs?: (() => Promise<Array<{
9400
+ memoryId: string;
9401
+ score: number;
9402
+ }>>) | null;
9403
+ recallOptions?: RecallOptions;
9404
+ /** Topic membership is applied before ranking and to every context lane. */
9405
+ memoryIds?: string[];
9406
+ /** Character budget for contents (formatting overhead is excluded). Default 12000. */
9407
+ maxChars?: number;
9408
+ includeEpisodes?: boolean;
9409
+ onDegraded?: (lane: MemoryContextLane, error: unknown) => void;
9410
+ }
9411
+ interface MemoryContextResult {
9412
+ items: MemoryContextItem[];
9413
+ ranked: boolean;
9414
+ rankedCount: number;
9415
+ degraded: MemoryContextLane[];
9416
+ truncated: boolean;
9417
+ }
9418
+ /** Only skip confidently trivial utterances. Word counts reject useful short
9419
+ * queries and languages whose writing does not separate words with spaces.
9420
+ *
9421
+ * The stoplist is an exact-match allowance for greetings and acknowledgments,
9422
+ * not a language model: anything not listed still recalls, so a missing
9423
+ * language costs a wasted lookup, never a missed memory. Kept to the handful of
9424
+ * forms that cannot carry a fact in the languages the app ships in. */
9425
+ declare function shouldRecallMemory(query: string): boolean;
9426
+ /** Assemble bounded stable/dynamic profile, relevant facts, source excerpts and
9427
+ * prior-turn facts. Lane failures are isolated: an outage cannot replace a
9428
+ * legitimate empty search with unrelated vault contents. */
9429
+ declare function assembleMemoryContext(options: MemoryContextOptions): Promise<MemoryContextResult>;
9430
+
9431
+ interface DurableAutoExtractorOptions extends Omit<CreateAutoExtractorOptions, "scope"> {
9432
+ /**
9433
+ * Scope for facts retained from newly queued turns. Pass an accessor to have
9434
+ * a privacy-mode flip observed at write time: a plain string is sampled once
9435
+ * at construction, which makes correctness depend on the caller disposing and
9436
+ * recreating the extractor on every flip. An accessor that throws is treated
9437
+ * as `"private"` — the direction that cannot publish.
9438
+ */
9439
+ scope?: string | (() => string);
9440
+ /** Coalesce arrivals after durably recording them. Defaults to 20 seconds. */
9441
+ debounceMs?: number;
9442
+ /** Retry delay for a failed batch. Defaults to 30 seconds; max three attempts
9443
+ * per session. Unfinished jobs remain available on the next resume. */
9444
+ retryDelayMs?: number;
9445
+ /**
9446
+ * Ceiling on one batch, from the extraction call through retention. Defaults
9447
+ * to 180 seconds — deliberately above the extraction call's own budget
9448
+ * (`timeoutMs`, 60s per attempt, x `maxAttempts`), so this is a backstop
9449
+ * against a promise that never settles at all rather than a second timeout
9450
+ * competing with that one. Use `timeoutMs`/`totalTimeoutMs` to bound the LLM
9451
+ * call itself. Without a ceiling here, one unsettled promise latched the
9452
+ * drain and killed the outbox for the rest of the session.
9453
+ */
9454
+ batchTimeoutMs?: number;
9455
+ }
9456
+ /** Durable client extraction. Call once per authenticated database session.
9457
+ * Resumes pending jobs on creation, reads bounded batches from encrypted
9458
+ * history, and acknowledges only successful batches. No plaintext snapshots
9459
+ * or pending facts are written to platform preferences. */
9460
+ declare function createDurableAutoExtractor(options: DurableAutoExtractorOptions): AutoExtractor;
9461
+
9324
9462
  /**
9325
9463
  * Text Chunking Utilities
9326
9464
  *
@@ -10145,10 +10283,7 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
10145
10283
  recall: (query: string, options?: RecallOptions) => Promise<RecallResult>;
10146
10284
  /** Get all vault memories for context injection. Soft-deleted memories are
10147
10285
  * excluded unless `includeDeleted` is set. */
10148
- getVaultMemories: (options?: {
10149
- scopes?: string[];
10150
- includeDeleted?: boolean;
10151
- }) => Promise<StoredVaultMemory[]>;
10286
+ getVaultMemories: (options?: Parameters<typeof getAllVaultMemoriesOp>[1]) => Promise<StoredVaultMemory[]>;
10152
10287
  /** Delete a vault memory by its ID (soft delete). */
10153
10288
  deleteVaultMemory: (id: string) => Promise<boolean>;
10154
10289
  /** Manually flush all queued operations for the current wallet. */
@@ -10301,8 +10436,15 @@ declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageR
10301
10436
  * - v45: Added `media` to memory_vault — the photo(s) a server-extracted
10302
10437
  * memory came from, as JSON `[{feed_item_id, object_key}]`. Null on every
10303
10438
  * row that did not come from a photo, which is all of them before this
10439
+ * migration ran
10440
+ * - v46: Added device-local memory_extraction_jobs outbox for restart-safe
10441
+ * extraction. Additive (a single createTable, no backfill), so a v45 database
10442
+ * upgrades cleanly. NOT reversible: WatermelonDB has no downgrade path, so
10443
+ * rolling a release back past v46 after a device has run it resets that
10444
+ * device's local database. Relevant to OTA, where a JS-only rollback can
10445
+ * land on a database the newer build already migrated
10304
10446
  */
10305
- declare const SDK_SCHEMA_VERSION = 45;
10447
+ declare const SDK_SCHEMA_VERSION = 46;
10306
10448
  /**
10307
10449
  * Combined WatermelonDB schema for all SDK storage modules.
10308
10450
  *
@@ -10921,4 +11063,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
10921
11063
  */
10922
11064
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
10923
11065
 
10924
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, 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, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
11066
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
@@ -4730,6 +4730,12 @@ declare function getConversationsPageOp(ctx: StorageOperationsContext, options?:
4730
4730
  * with no project.
4731
4731
  */
4732
4732
  declare function getConversationsByProjectLazyOp(ctx: StorageOperationsContext, projectId: string | null): Promise<LazyStoredConversation[]>;
4733
+ /**
4734
+ * Delete a single message by its unique ID.
4735
+ * Clears file_ids before deletion and returns the unique ID.
4736
+ * Note: Callers should use deleteMediaByMessageOp to cascade delete media.
4737
+ */
4738
+ declare function deleteMessageOp(ctx: StorageOperationsContext, uniqueId: string): Promise<string | null>;
4733
4739
  /**
4734
4740
  * Create-or-update a message keyed by `opts.uniqueId`.
4735
4741
  *
@@ -5351,6 +5357,7 @@ interface MemoryVaultSearchOptions {
5351
5357
  * types. Applied at load time via `Q.oneOf` on the indexed `fact_type`
5352
5358
  * column. Omit for no type filter. */
5353
5359
  factTypes?: string[];
5360
+ memoryIds?: string[];
5354
5361
  /**
5355
5362
  * PR5 — optional per-FactType score multiplier applied in the boost stage
5356
5363
  * (e.g. `{ identity: 1.2, ongoing_context: 0.8 }`). Empty/omitted = uniform
@@ -5673,6 +5680,11 @@ interface RecallOptions {
5673
5680
  * and no-op when unset (all types are eligible). Vault-only.
5674
5681
  */
5675
5682
  factTypes?: FactType[];
5683
+ /** Restrict fact candidates BEFORE ranking. Empty means no facts. When set,
5684
+ * unrestricted chunk search is disabled; it must not escape a topic scope.
5685
+ * Asking for `"chunk"` alongside this yields no excerpts and reports
5686
+ * `"chunks-scope-restricted"` on {@link RecallDiagnostics.degraded}. */
5687
+ memoryIds?: string[];
5676
5688
  /**
5677
5689
  * PR5 — optional per-FactType score multiplier applied in the fusion boost
5678
5690
  * stage (e.g. boost `identity`/`constraint`, down-weight `ongoing_context`).
@@ -5848,7 +5860,13 @@ type RecallDegradation =
5848
5860
  | "graph-lane-failed"
5849
5861
  /** The W6 temporal side lane threw and was dropped. Same posture as the graph
5850
5862
  * lane: recall still returned, ranked without the temporal signal. */
5851
- | "temporal-lane-failed";
5863
+ | "temporal-lane-failed"
5864
+ /** {@link RecallOptions.memoryIds} was set and `types` asked for `"chunk"`.
5865
+ * Conversation excerpts have no equivalent membership filter, so running the
5866
+ * chunk lane would escape the topic/folder scope — it is dropped instead.
5867
+ * Without this signal a scoped caller asking for excerpts got an empty
5868
+ * result indistinguishable from "the vault had no match". */
5869
+ | "chunks-scope-restricted";
5852
5870
  /**
5853
5871
  * Why a recall returned nothing. `""` when it returned something, so the field
5854
5872
  * is always present and groupable rather than being absent on the healthy path.
@@ -6803,6 +6821,14 @@ interface UpdateVaultMemoryOptions {
6803
6821
  * two parallel retain() calls observe each other's commits and neither
6804
6822
  * loses its increment. Wins over `proofCount` when both are set. */
6805
6823
  proofCountIncrement?: number;
6824
+ /** Source ids for an observation. Unioned inside the writer. A replay whose
6825
+ * ids are all already on the row contributes no new evidence, so
6826
+ * `proofCount`/`proofCountIncrement` and {@link lastObservedAt} are skipped —
6827
+ * but the write still lands: `content`, `embedding`, `restore`, `eventTime`
6828
+ * and the rest apply, because a consolidation rewrite legitimately carries
6829
+ * the same source ids as the observation that triggered it.
6830
+ * Omit for unkeyed/manual observations. */
6831
+ observationSourceIds?: string[];
6806
6832
  /** Set source ("manual" | "auto-extracted" | "capsule"). */
6807
6833
  source?: string;
6808
6834
  /**
@@ -6856,6 +6882,9 @@ interface VaultMemoryOperationsContext {
6856
6882
  embeddedWalletSigner?: EmbeddedWalletSignerFn;
6857
6883
  /** When set, operations scope to this user (server-side multi-user). */
6858
6884
  userId?: string;
6885
+ /** Optional extraction source eligibility check, executed inside the writer.
6886
+ * Must only read the database (must not start another writer). */
6887
+ canWrite?: () => Promise<boolean>;
6859
6888
  /**
6860
6889
  * Asserts this context runs against a physically single-tenant database — one
6861
6890
  * where every row belongs to the same owner (the per-wallet client DBs, which
@@ -6896,6 +6925,7 @@ declare function getAllVaultMemoriesOp(ctx: VaultMemoryOperationsContext, option
6896
6925
  includeQuarantined?: boolean;
6897
6926
  /** Typed memory (PR1) — restrict to these fact types. Omit for no filter. */
6898
6927
  factTypes?: string[];
6928
+ memoryIds?: string[];
6899
6929
  /**
6900
6930
  * Include A2-superseded memories (each carries `supersededBy`). Default
6901
6931
  * `false` — superseded rows are excluded, as they are from recall/dedup.
@@ -7155,6 +7185,7 @@ interface DecayCandidateRaw {
7155
7185
  /** Unix ms — the raw `updated_at`, used both for the age rule and as the
7156
7186
  * optimistic-concurrency guard passed back to {@link archiveVaultMemoryOp}. */
7157
7187
  updatedAt: number;
7188
+ lastObservedAt?: number | null;
7158
7189
  archivedAt: number | null;
7159
7190
  source: string | null;
7160
7191
  /** `trusted` | `quarantined` | null. Quarantined rows still decay by RULE, but
@@ -7199,6 +7230,8 @@ declare function archiveVaultMemoryOp(ctx: VaultMemoryOperationsContext, id: str
7199
7230
  /** Optimistic-concurrency guard: skip if the row's `updated_at` changed
7200
7231
  * since the sweep observed it (a concurrent re-observation). */
7201
7232
  expectedUpdatedAt?: number;
7233
+ /** Also guard re-observations, which deliberately preserve updated_at. */
7234
+ expectedLastObservedAt?: number | null;
7202
7235
  }): Promise<boolean>;
7203
7236
  /**
7204
7237
  * Restore an archived memory (PR2) — clear `archived_at` so it re-enters recall.
@@ -7550,7 +7583,8 @@ declare class WalletPoller {
7550
7583
  *
7551
7584
  * The watermark advances only when the extractor genuinely EXAMINED the window.
7552
7585
  * A pipeline throw and an `empty-after-retry` outcome (the extraction LLM
7553
- * returned empty/malformed after exhausting its retries) both leave it in place,
7586
+ * returned empty/malformed after exhausting its retries), or any failed retain
7587
+ * operation leave it in place,
7554
7588
  * so the next turn's window re-covers those messages instead of stranding them.
7555
7589
  * A quiet turn that legitimately yielded no facts *does* advance it.
7556
7590
  *
@@ -7943,6 +7977,8 @@ interface DecayInput {
7943
7977
  eventTimeKind: string | null;
7944
7978
  /** Unix ms of the row's last write (re-observation resets this). */
7945
7979
  updatedAt: number;
7980
+ /** Last distinct observation; does not change the edit timestamp. */
7981
+ lastObservedAt?: number | null;
7946
7982
  /** Unix ms when archived, or null when active. */
7947
7983
  archivedAt: number | null;
7948
7984
  /** `manual` | `auto-extracted` | `capsule` | null. Manual is never decayed. */
@@ -8505,6 +8541,8 @@ interface RecallToolOptions {
8505
8541
  minScore?: number;
8506
8542
  /** Vault scope filter. */
8507
8543
  scopes?: string[];
8544
+ /** Topic membership, enforced before fact ranking; disables unrestricted chunks. */
8545
+ memoryIds?: string[];
8508
8546
  /** Vault folder filter. */
8509
8547
  folderId?: string | null;
8510
8548
  /** Exclude one conversation from chunk results (typically the active one). */
@@ -8578,7 +8616,30 @@ interface ReflectOptions extends RecallOptions, PortalLlmAuth {
8578
8616
  llmModel?: string;
8579
8617
  /** Cap response length. Default: 4096. */
8580
8618
  maxTokens?: number;
8581
- /** Override the grounding system prompt. */
8619
+ /**
8620
+ * Override the grounding system prompt.
8621
+ *
8622
+ * ⚠ DOING THIS MAKES THE REQUEST'S PROVENANCE YOURS. The default prompt's first sentence is
8623
+ * this flow's fingerprint in the portal's freeloader (anti-bot) detector (see
8624
+ * {@link DEFAULT_SYSTEM_PROMPT}); replacing it wholesale removes that, and a free-tier request
8625
+ * carrying no recognised provenance is rejected outright once the portal's markerless reject is
8626
+ * enabled — a 403, not a degraded answer.
8627
+ *
8628
+ * Which replacement is correct depends on what the call IS, and there is no safe default:
8629
+ *
8630
+ * - **A background/internal call** (a fixed-purpose helper, not a user's own question): prepend
8631
+ * {@link withInternalFlowMarker}, which is exported for exactly this. That is what
8632
+ * profile-facet synthesis does.
8633
+ * - **A user-facing call** (the person is asking their own question and expects an answer):
8634
+ * do NOT use the internal marker — it asserts "not user chat" and would be false. Keep the
8635
+ * default prompt, or append your instructions to it rather than replacing it, so the
8636
+ * fingerprint survives. A genuinely distinct user-facing flow needs its own fingerprint
8637
+ * registered in ai-portal `internal/detection/markers.go`.
8638
+ *
8639
+ * Appending is the cheap way to stay safe: `${DEFAULT_SYSTEM_PROMPT}\n\n${yourInstructions}`
8640
+ * keeps the fingerprint as a prefix. `reflect.test.ts` pins both the marked and the bare
8641
+ * override paths so this stays true.
8642
+ */
8582
8643
  systemPrompt?: string;
8583
8644
  /**
8584
8645
  * Extra caller instruction to carry on the USER turn, between the question and
@@ -9321,6 +9382,83 @@ declare function verifyMemoriesForPublish(memories: readonly MemoryToVerify[], s
9321
9382
  */
9322
9383
  declare function createMessageSourceResolver(ctx: StorageOperationsContext): VerificationSources;
9323
9384
 
9385
+ type MemoryContextLane = "profile" | "fact" | "episode" | "session";
9386
+ interface MemoryContextItem {
9387
+ id: string;
9388
+ content: string;
9389
+ score: number;
9390
+ lane: MemoryContextLane;
9391
+ sourceIds: string[];
9392
+ /** Ranked fact evidence, retained when profile deduplication wins placement. */
9393
+ recalled?: boolean;
9394
+ }
9395
+ interface MemoryContextOptions {
9396
+ query: string;
9397
+ recall: (query: string, options: RecallOptions) => Promise<RecallResult>;
9398
+ loadFacts?: ((options: Parameters<typeof getAllVaultMemoriesOp>[1]) => Promise<StoredVaultMemory[]>) | null;
9399
+ loadSessionRefs?: (() => Promise<Array<{
9400
+ memoryId: string;
9401
+ score: number;
9402
+ }>>) | null;
9403
+ recallOptions?: RecallOptions;
9404
+ /** Topic membership is applied before ranking and to every context lane. */
9405
+ memoryIds?: string[];
9406
+ /** Character budget for contents (formatting overhead is excluded). Default 12000. */
9407
+ maxChars?: number;
9408
+ includeEpisodes?: boolean;
9409
+ onDegraded?: (lane: MemoryContextLane, error: unknown) => void;
9410
+ }
9411
+ interface MemoryContextResult {
9412
+ items: MemoryContextItem[];
9413
+ ranked: boolean;
9414
+ rankedCount: number;
9415
+ degraded: MemoryContextLane[];
9416
+ truncated: boolean;
9417
+ }
9418
+ /** Only skip confidently trivial utterances. Word counts reject useful short
9419
+ * queries and languages whose writing does not separate words with spaces.
9420
+ *
9421
+ * The stoplist is an exact-match allowance for greetings and acknowledgments,
9422
+ * not a language model: anything not listed still recalls, so a missing
9423
+ * language costs a wasted lookup, never a missed memory. Kept to the handful of
9424
+ * forms that cannot carry a fact in the languages the app ships in. */
9425
+ declare function shouldRecallMemory(query: string): boolean;
9426
+ /** Assemble bounded stable/dynamic profile, relevant facts, source excerpts and
9427
+ * prior-turn facts. Lane failures are isolated: an outage cannot replace a
9428
+ * legitimate empty search with unrelated vault contents. */
9429
+ declare function assembleMemoryContext(options: MemoryContextOptions): Promise<MemoryContextResult>;
9430
+
9431
+ interface DurableAutoExtractorOptions extends Omit<CreateAutoExtractorOptions, "scope"> {
9432
+ /**
9433
+ * Scope for facts retained from newly queued turns. Pass an accessor to have
9434
+ * a privacy-mode flip observed at write time: a plain string is sampled once
9435
+ * at construction, which makes correctness depend on the caller disposing and
9436
+ * recreating the extractor on every flip. An accessor that throws is treated
9437
+ * as `"private"` — the direction that cannot publish.
9438
+ */
9439
+ scope?: string | (() => string);
9440
+ /** Coalesce arrivals after durably recording them. Defaults to 20 seconds. */
9441
+ debounceMs?: number;
9442
+ /** Retry delay for a failed batch. Defaults to 30 seconds; max three attempts
9443
+ * per session. Unfinished jobs remain available on the next resume. */
9444
+ retryDelayMs?: number;
9445
+ /**
9446
+ * Ceiling on one batch, from the extraction call through retention. Defaults
9447
+ * to 180 seconds — deliberately above the extraction call's own budget
9448
+ * (`timeoutMs`, 60s per attempt, x `maxAttempts`), so this is a backstop
9449
+ * against a promise that never settles at all rather than a second timeout
9450
+ * competing with that one. Use `timeoutMs`/`totalTimeoutMs` to bound the LLM
9451
+ * call itself. Without a ceiling here, one unsettled promise latched the
9452
+ * drain and killed the outbox for the rest of the session.
9453
+ */
9454
+ batchTimeoutMs?: number;
9455
+ }
9456
+ /** Durable client extraction. Call once per authenticated database session.
9457
+ * Resumes pending jobs on creation, reads bounded batches from encrypted
9458
+ * history, and acknowledges only successful batches. No plaintext snapshots
9459
+ * or pending facts are written to platform preferences. */
9460
+ declare function createDurableAutoExtractor(options: DurableAutoExtractorOptions): AutoExtractor;
9461
+
9324
9462
  /**
9325
9463
  * Text Chunking Utilities
9326
9464
  *
@@ -10145,10 +10283,7 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
10145
10283
  recall: (query: string, options?: RecallOptions) => Promise<RecallResult>;
10146
10284
  /** Get all vault memories for context injection. Soft-deleted memories are
10147
10285
  * excluded unless `includeDeleted` is set. */
10148
- getVaultMemories: (options?: {
10149
- scopes?: string[];
10150
- includeDeleted?: boolean;
10151
- }) => Promise<StoredVaultMemory[]>;
10286
+ getVaultMemories: (options?: Parameters<typeof getAllVaultMemoriesOp>[1]) => Promise<StoredVaultMemory[]>;
10152
10287
  /** Delete a vault memory by its ID (soft delete). */
10153
10288
  deleteVaultMemory: (id: string) => Promise<boolean>;
10154
10289
  /** Manually flush all queued operations for the current wallet. */
@@ -10301,8 +10436,15 @@ declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageR
10301
10436
  * - v45: Added `media` to memory_vault — the photo(s) a server-extracted
10302
10437
  * memory came from, as JSON `[{feed_item_id, object_key}]`. Null on every
10303
10438
  * row that did not come from a photo, which is all of them before this
10439
+ * migration ran
10440
+ * - v46: Added device-local memory_extraction_jobs outbox for restart-safe
10441
+ * extraction. Additive (a single createTable, no backfill), so a v45 database
10442
+ * upgrades cleanly. NOT reversible: WatermelonDB has no downgrade path, so
10443
+ * rolling a release back past v46 after a device has run it resets that
10444
+ * device's local database. Relevant to OTA, where a JS-only rollback can
10445
+ * land on a database the newer build already migrated
10304
10446
  */
10305
- declare const SDK_SCHEMA_VERSION = 45;
10447
+ declare const SDK_SCHEMA_VERSION = 46;
10306
10448
  /**
10307
10449
  * Combined WatermelonDB schema for all SDK storage modules.
10308
10450
  *
@@ -10921,4 +11063,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
10921
11063
  */
10922
11064
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
10923
11065
 
10924
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, 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, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
11066
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallEmptyReason, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };