@anuma/sdk 7.4.0 → 7.6.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.
@@ -22336,6 +22336,8 @@ var MAX_QUERY_TOPICS = 100;
22336
22336
  var MAX_QUERY_FILTER = 20;
22337
22337
  var GRAPH_LANE_ROWS = 256;
22338
22338
  var TEMPORAL_LANE_ROWS = 256;
22339
+ var REPAIR_ROWS = 50;
22340
+ var REPAIR_SCAN = 2e3;
22339
22341
  var DECAY_TRANSITIONS_PER_SWEEP = 200;
22340
22342
  var RemoteMemoryPartialCreateError = class extends Error {
22341
22343
  constructor(created, cause) {
@@ -22345,6 +22347,9 @@ var RemoteMemoryPartialCreateError = class extends Error {
22345
22347
  this.name = "RemoteMemoryPartialCreateError";
22346
22348
  }
22347
22349
  };
22350
+ function rejectsInput(error) {
22351
+ return error instanceof EmbeddingHttpError && error.status !== void 0 && error.status >= 400 && error.status < 500 && error.status !== 429 && !isFatalEmbeddingError(error);
22352
+ }
22348
22353
  function warnFailed(failed) {
22349
22354
  if (failed.length)
22350
22355
  getLogger().warn(
@@ -22961,9 +22966,104 @@ function createRemoteMemoryStore(options) {
22961
22966
  polling = false;
22962
22967
  });
22963
22968
  };
22969
+ const unrepairable = /* @__PURE__ */ new Set();
22970
+ let repairCursor;
22971
+ const repairEmbeddings = async ({
22972
+ maxRows = REPAIR_ROWS,
22973
+ maxScan = REPAIR_SCAN,
22974
+ cursor: start = repairCursor
22975
+ } = {}) => {
22976
+ const scannedRows = [];
22977
+ let cursor2 = start;
22978
+ do {
22979
+ const page = await metadata2({
22980
+ include_deleted: true,
22981
+ include_archived: true,
22982
+ include_quarantined: true,
22983
+ include_superseded: true,
22984
+ limit: Math.min(200, Math.max(1, maxScan - scannedRows.length)),
22985
+ ...cursor2 && { cursor: cursor2 }
22986
+ });
22987
+ scannedRows.push(...page.items);
22988
+ cursor2 = page.next_cursor;
22989
+ } while (cursor2 && scannedRows.length < maxScan);
22990
+ const allStale = scannedRows.filter(
22991
+ ({ memory }) => memory.embedding_model !== model && !unrepairable.has(memory.memory_id)
22992
+ );
22993
+ const repaired = /* @__PURE__ */ new Set();
22994
+ const result = {
22995
+ scanned: scannedRows.length,
22996
+ reembedded: 0,
22997
+ failed: 0,
22998
+ skippedConflict: 0
22999
+ };
23000
+ const finish = () => {
23001
+ const settled = allStale.every(
23002
+ ({ memory }) => repaired.has(memory.memory_id) || unrepairable.has(memory.memory_id)
23003
+ );
23004
+ repairCursor = settled ? cursor2 : start;
23005
+ return repairCursor ? { ...result, cursor: repairCursor } : result;
23006
+ };
23007
+ const stale = allStale.slice(0, maxRows).map(({ memory }) => memory.memory_id);
23008
+ if (stale.length === 0) return finish();
23009
+ const { records, unreadable } = await readEveryState(stale);
23010
+ result.failed += unreadable.size;
23011
+ for (const id of stale)
23012
+ if (unreadable.has(id) || !records.get(id)?.memory.content.trim()) unrepairable.add(id);
23013
+ const targets = stale.filter((id) => !unrepairable.has(id)).map((id) => records.get(id));
23014
+ if (targets.length === 0) return finish();
23015
+ const vectors = await embedForRepair(targets);
23016
+ if (!vectors) {
23017
+ result.failed += targets.length;
23018
+ return finish();
23019
+ }
23020
+ for (const [i, record2] of targets.entries()) {
23021
+ const vector = vectors[i];
23022
+ if (!vector) {
23023
+ result.failed++;
23024
+ continue;
23025
+ }
23026
+ await serialized(record2.memory.memory_id, async () => {
23027
+ try {
23028
+ const saved = await persistence.put(
23029
+ { ...record2.memory, embedding: storedVector(vector), embedding_model: model },
23030
+ record2
23031
+ );
23032
+ notify("embedding", [saved]);
23033
+ repaired.add(record2.memory.memory_id);
23034
+ result.reembedded++;
23035
+ } catch (error) {
23036
+ if (error instanceof RemoteMemoryError && error.code === "version_conflict")
23037
+ result.skippedConflict++;
23038
+ else result.failed++;
23039
+ }
23040
+ });
23041
+ }
23042
+ return finish();
23043
+ };
23044
+ const embedForRepair = async (targets) => {
23045
+ const texts = targets.map(({ memory }) => memory.content);
23046
+ try {
23047
+ return await generateEmbeddings(texts, embeddingOptions);
23048
+ } catch (error) {
23049
+ getLogger().warn("[memory/remote-store] Failed to embed memories for repair:", error);
23050
+ if (!rejectsInput(error)) return null;
23051
+ }
23052
+ const vectors = [];
23053
+ for (const [i, text14] of texts.entries()) {
23054
+ try {
23055
+ [vectors[i]] = await generateEmbeddings([text14], embeddingOptions);
23056
+ } catch (error) {
23057
+ if (!rejectsInput(error)) return null;
23058
+ unrepairable.add(targets[i].memory.memory_id);
23059
+ }
23060
+ }
23061
+ return vectors;
23062
+ };
22964
23063
  return {
22965
23064
  masksEmbeddingInput: embeddingOptions.maskInput !== void 0,
22966
23065
  topicMaintenance,
23066
+ repairEmbeddings,
22967
23067
  list: async (listOptions = {}) => (await listRows(decrypted, listOptions, listFilters(listOptions), maxOf(listOptions))).map(
22968
23068
  (r) => stored(r.memory)
22969
23069
  ),
@@ -24028,6 +24128,43 @@ function createDurableAutoExtractor(options) {
24028
24128
  return "private";
24029
24129
  }
24030
24130
  };
24131
+ async function fromSource(call) {
24132
+ let timeout;
24133
+ try {
24134
+ return await Promise.race([
24135
+ call,
24136
+ new Promise((_resolve, reject) => {
24137
+ timeout = setTimeout(
24138
+ () => reject(new Error("Message source did not answer in time")),
24139
+ options.sourceTimeoutMs ?? 3e4
24140
+ );
24141
+ })
24142
+ ]);
24143
+ } finally {
24144
+ if (timeout !== void 0) clearTimeout(timeout);
24145
+ }
24146
+ }
24147
+ async function loadFromSource(source, conversationId, ids) {
24148
+ const byId = new Map(
24149
+ (await fromSource(source.load(conversationId, ids))).map((m) => [m.id, m])
24150
+ );
24151
+ return ids.map((id) => {
24152
+ const message = byId.get(id);
24153
+ return message ? {
24154
+ uniqueId: message.id,
24155
+ messageId: message.seq,
24156
+ conversationId,
24157
+ role: message.role,
24158
+ content: message.content
24159
+ } : null;
24160
+ });
24161
+ }
24162
+ async function sourcesEligible(conversationId, ids) {
24163
+ const source = options.messageSource?.(conversationId);
24164
+ if (source)
24165
+ return await fromSource(source.status(conversationId)) === "ready" && (await loadFromSource(source, conversationId, ids)).every(Boolean);
24166
+ return await storage.conversationsCollection.query(import_watermelondb24.Q.where("conversation_id", conversationId), import_watermelondb24.Q.where("is_deleted", false)).fetchCount() > 0 && await storage.messagesCollection.query(import_watermelondb24.Q.where("conversation_id", conversationId), import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf(ids))).fetchCount() === ids.length;
24167
+ }
24031
24168
  function schedule(delay) {
24032
24169
  if (disposed) return;
24033
24170
  if (running || timer !== void 0) {
@@ -24056,7 +24193,7 @@ function createDurableAutoExtractor(options) {
24056
24193
  ...options.retainCtx,
24057
24194
  vaultCtx: {
24058
24195
  ...vault,
24059
- canWrite: async () => !disposed && !cancelled && await storage.conversationsCollection.query(import_watermelondb24.Q.where("conversation_id", conversationId), import_watermelondb24.Q.where("is_deleted", false)).fetchCount() > 0 && await storage.messagesCollection.query(import_watermelondb24.Q.where("conversation_id", conversationId), import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf(ids))).fetchCount() === ids.length && (!vault.canWrite || await vault.canWrite()) && !disposed && !cancelled
24196
+ canWrite: async () => !disposed && !cancelled && await sourcesEligible(conversationId, ids) && (!vault.canWrite || await vault.canWrite()) && !disposed && !cancelled
24060
24197
  }
24061
24198
  },
24062
24199
  extract: { ...options.extract, ...model !== void 0 && { model } },
@@ -24197,6 +24334,7 @@ function createDurableAutoExtractor(options) {
24197
24334
  wakeRequested = false;
24198
24335
  let retry = false;
24199
24336
  let scheduleAfterSuccess = false;
24337
+ let sourceWaiting = false;
24200
24338
  try {
24201
24339
  await writes;
24202
24340
  const pending = await jobs.query(import_watermelondb24.Q.where("owner_key", owner), import_watermelondb24.Q.where("message_ids", import_watermelondb24.Q.notEq("[]"))).fetch();
@@ -24207,23 +24345,37 @@ function createDurableAutoExtractor(options) {
24207
24345
  const attempted = attempts.get(job.id) ?? 0;
24208
24346
  if (attempted >= MAX_ATTEMPTS || skippedThisSession.has(job.id) || awaitingKey.has(job.id))
24209
24347
  continue;
24348
+ const conversationId = String(job._getRaw("conversation_id"));
24349
+ const source = options.messageSource?.(conversationId);
24350
+ let sourceStatus;
24351
+ if (source) {
24352
+ try {
24353
+ sourceStatus = await fromSource(source.status(conversationId));
24354
+ } catch (error) {
24355
+ reportError(error, conversationId);
24356
+ sourceStatus = "later";
24357
+ }
24358
+ if (sourceStatus === "later") {
24359
+ sourceWaiting = true;
24360
+ continue;
24361
+ }
24362
+ }
24210
24363
  if (processed >= MAX_JOBS_PER_PASS) {
24211
24364
  scheduleAfterSuccess = true;
24212
24365
  break;
24213
24366
  }
24214
24367
  processed++;
24215
- const conversationId = String(job._getRaw("conversation_id"));
24216
24368
  const epochAtRead = keyEpoch;
24217
24369
  let ids = [];
24218
24370
  let loaded = [];
24219
24371
  try {
24220
- const conversations = await storage.conversationsCollection.query(import_watermelondb24.Q.where("conversation_id", conversationId), import_watermelondb24.Q.where("is_deleted", false)).fetchCount();
24221
- if (!conversations) {
24372
+ const present = source ? sourceStatus === "ready" : await storage.conversationsCollection.query(import_watermelondb24.Q.where("conversation_id", conversationId), import_watermelondb24.Q.where("is_deleted", false)).fetchCount() > 0;
24373
+ if (!present) {
24222
24374
  await database.write(() => job.destroyPermanently());
24223
24375
  continue;
24224
24376
  }
24225
24377
  ids = idsOf(job).slice(0, 20);
24226
- loaded = await Promise.all(ids.map((id) => getMessageOp(storage, id)));
24378
+ loaded = source ? await loadFromSource(source, conversationId, ids) : await Promise.all(ids.map((id) => getMessageOp(storage, id)));
24227
24379
  const missing = ids.filter((_id, index) => loaded[index] === null);
24228
24380
  if (missing.length) {
24229
24381
  if (attempted < MAX_ATTEMPTS - 1)
@@ -24267,7 +24419,7 @@ function createDurableAutoExtractor(options) {
24267
24419
  );
24268
24420
  continue;
24269
24421
  }
24270
- const locked = loaded.filter(
24422
+ const locked = source ? [] : loaded.filter(
24271
24423
  (message) => !!message && isEncrypted(message.content)
24272
24424
  );
24273
24425
  if (locked.length) {
@@ -24355,6 +24507,7 @@ function createDurableAutoExtractor(options) {
24355
24507
  wakeRequested = false;
24356
24508
  if (retry || scheduleAfterSuccess || woken)
24357
24509
  schedule(retry ? options.retryDelayMs ?? 3e4 : 0);
24510
+ else if (sourceWaiting) schedule(options.retryDelayMs ?? 3e4);
24358
24511
  }
24359
24512
  }
24360
24513
  function dispose() {
@@ -24389,7 +24542,8 @@ function createDurableAutoExtractor(options) {
24389
24542
  (candidate) => candidate._getRaw("scope") === scope && (candidate._getRaw("folder_id") ?? null) === folderId
24390
24543
  );
24391
24544
  const positions = new Map(ids.map((id, index) => [id, index]));
24392
- const watermarks = existing.flatMap((prior) => {
24545
+ const fromSourceConversation = options.messageSource?.(conversationId) !== void 0;
24546
+ const watermarks = fromSourceConversation ? [] : existing.flatMap((prior) => {
24393
24547
  const watermark = prior._getRaw("watermark");
24394
24548
  return typeof watermark === "string" && watermark ? [watermark] : [];
24395
24549
  });
@@ -24407,11 +24561,16 @@ function createDurableAutoExtractor(options) {
24407
24561
  r._setRaw("watermark_seq", null);
24408
24562
  });
24409
24563
  }
24410
- const rows = await storage.messagesCollection.query(import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf(ids))).fetch();
24564
+ const rows = fromSourceConversation ? [] : await storage.messagesCollection.query(import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf(ids))).fetch();
24411
24565
  const foreignRows = new Set(
24412
24566
  rows.filter((row) => row._getRaw("conversation_id") !== conversationId).map((row) => row.id)
24413
24567
  );
24414
24568
  const sequences = /* @__PURE__ */ new Map();
24569
+ if (fromSourceConversation) {
24570
+ for (const message of messages)
24571
+ if (message.seq !== void 0 && message.seq > 0)
24572
+ sequences.set(message.id, message.seq);
24573
+ }
24415
24574
  for (const row of rows) {
24416
24575
  if (foreignRows.has(row.id)) continue;
24417
24576
  const sequence = Number(row._getRaw("message_id"));
@@ -24444,14 +24603,17 @@ function createDurableAutoExtractor(options) {
24444
24603
  reportError(error, conversationId);
24445
24604
  }
24446
24605
  }
24447
- if (boundary < 0 && existing.some((prior) => idsOf(prior).length > 0 || seqOf(prior) !== void 0)) {
24606
+ const ordered = fromSourceConversation && ids.every((id) => sequences.has(id));
24607
+ if (boundary < 0 && !ordered && existing.some(
24608
+ (prior) => idsOf(prior).length > 0 || seqOf(prior) !== void 0 || fromSourceConversation && !!prior._getRaw("watermark")
24609
+ )) {
24448
24610
  reportError(
24449
24611
  new Error("Extraction boundary unresolved; skipped rather than re-observing"),
24450
24612
  conversationId
24451
24613
  );
24452
24614
  return;
24453
24615
  }
24454
- const start = boundary >= 0 ? boundary + 1 : Math.max(0, ids.length - Math.max(1, options.windowSize ?? 6));
24616
+ const start = boundary >= 0 ? boundary + 1 : fromSourceConversation ? 0 : Math.max(0, ids.length - Math.max(1, options.windowSize ?? 6));
24455
24617
  if (start >= ids.length) return;
24456
24618
  const ownWatermark = job?._getRaw("watermark");
24457
24619
  const atOwnWatermark = !!job && boundary >= 0 && failedSessionsOf(job, String(ownWatermark)) < MAX_FAILED_SESSIONS && (ids[boundary] === ownWatermark || sequences.get(ids[boundary]) !== void 0 && sequences.get(ids[boundary]) === seqOf(job));
@@ -4987,6 +4987,8 @@ interface AutoExtractMessage {
4987
4987
  id: string;
4988
4988
  role: "user" | "assistant";
4989
4989
  content: string;
4990
+ /** Position in the conversation, for a conversation outside local chat history. */
4991
+ seq?: number;
4990
4992
  }
4991
4993
  /**
4992
4994
  * A named entity extracted from the conversation, with an optional
@@ -6660,6 +6662,24 @@ interface MemoryTopicMaintenance {
6660
6662
  /** Fill `topics` on pre-v42 rows from their existing links. Returns the ids filled. */
6661
6663
  backfillTopics(memoryIds: readonly string[]): Promise<string[]>;
6662
6664
  }
6665
+ /** @public */
6666
+ interface EmbeddingRepairOptions {
6667
+ /** Most memories one run re-embeds. Default 50. */
6668
+ maxRows?: number;
6669
+ /** Most memories one run inspects. Default 2000. */
6670
+ maxScan?: number;
6671
+ /** Where to resume the scan, from a previous result. Defaults to where this store's last run stopped. */
6672
+ cursor?: string;
6673
+ }
6674
+ /** @public */
6675
+ interface EmbeddingRepairResult {
6676
+ scanned: number;
6677
+ reembedded: number;
6678
+ failed: number;
6679
+ skippedConflict: number;
6680
+ /** Where the next run resumes; absent when the next run starts over from the newest memory. */
6681
+ cursor?: string;
6682
+ }
6663
6683
  /**
6664
6684
  * One user's memories, pitched at what the apps do with them rather than at
6665
6685
  * the storage ops underneath. Two backends are intended: the on-device
@@ -6727,6 +6747,8 @@ interface MemoryStore {
6727
6747
  * after subscribing. Returns the unsubscribe function.
6728
6748
  */
6729
6749
  subscribe(onChange: () => void, options?: MemorySubscribeOptions): () => void;
6750
+ /** Re-embeds memories the backend cannot rank with the current model. Absent where recall re-embeds lazily. */
6751
+ repairEmbeddings?(options?: EmbeddingRepairOptions): Promise<EmbeddingRepairResult>;
6730
6752
  /** TRANSITIONAL — see {@link MemoryMaintenance}. Absent on a remote backend. */
6731
6753
  maintenance?: MemoryMaintenance;
6732
6754
  /** Rule-based decay, available without the local-only {@link MemoryMaintenance}. */
@@ -10091,6 +10113,21 @@ declare function shouldRecallMemory(query: string): boolean;
10091
10113
  * legitimate empty search with unrelated vault contents. */
10092
10114
  declare function assembleMemoryContext(options: MemoryContextOptions): Promise<MemoryContextResult>;
10093
10115
 
10116
+ /** A message a {@link ExtractionMessageSource} resolves from a queued id. */
10117
+ interface ExtractionSourceMessage {
10118
+ id: string;
10119
+ role: "user" | "assistant";
10120
+ content: string;
10121
+ /** Position in the conversation; must increase with send order. */
10122
+ seq: number;
10123
+ }
10124
+ /** `ready` runs the job, `later` leaves it queued without counting an attempt, `gone` drops it. */
10125
+ type ExtractionSourceStatus = "ready" | "later" | "gone";
10126
+ /** Resolves queued ids for a conversation that does not live in local chat history. */
10127
+ interface ExtractionMessageSource {
10128
+ status(conversationId: string): Promise<ExtractionSourceStatus>;
10129
+ load(conversationId: string, ids: string[]): Promise<ExtractionSourceMessage[]>;
10130
+ }
10094
10131
  interface DurableAutoExtractorOptions extends Omit<CreateAutoExtractorOptions, "scope"> {
10095
10132
  /**
10096
10133
  * Scope for facts retained from newly queued turns. Pass an accessor to have
@@ -10129,6 +10166,14 @@ interface DurableAutoExtractorOptions extends Omit<CreateAutoExtractorOptions, "
10129
10166
  batchTimeoutMs?: number;
10130
10167
  /** Clock for the failed-session spacing. Defaults to `Date.now`. */
10131
10168
  now?: () => number;
10169
+ /**
10170
+ * Message source for a conversation outside local chat history, or `undefined`
10171
+ * for history. Jobs still store only ids; the source resolves them at drain
10172
+ * time and is re-checked before every write.
10173
+ */
10174
+ messageSource?: (conversationId: string) => ExtractionMessageSource | undefined;
10175
+ /** Ceiling on one `status` or `load` call of a message source. Defaults to 30 seconds. */
10176
+ sourceTimeoutMs?: number;
10132
10177
  }
10133
10178
  /** Durable client extraction. Call once per authenticated database session.
10134
10179
  * Resumes pending jobs on creation, reads bounded batches from encrypted
@@ -11476,4 +11521,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
11476
11521
  */
11477
11522
  declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
11478
11523
 
11479
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, 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 FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 NotionMcpCaller, 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 RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, 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 StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, 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 VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, 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, type WriteFailureReason, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, 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, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
11524
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, 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, type EmbeddingRepairOptions, type EmbeddingRepairResult, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionMessageSource, type ExtractionSourceMessage, type ExtractionSourceStatus, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 NotionMcpCaller, 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 RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, 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 StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, 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 VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, 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, type WriteFailureReason, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, 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, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
@@ -4987,6 +4987,8 @@ interface AutoExtractMessage {
4987
4987
  id: string;
4988
4988
  role: "user" | "assistant";
4989
4989
  content: string;
4990
+ /** Position in the conversation, for a conversation outside local chat history. */
4991
+ seq?: number;
4990
4992
  }
4991
4993
  /**
4992
4994
  * A named entity extracted from the conversation, with an optional
@@ -6660,6 +6662,24 @@ interface MemoryTopicMaintenance {
6660
6662
  /** Fill `topics` on pre-v42 rows from their existing links. Returns the ids filled. */
6661
6663
  backfillTopics(memoryIds: readonly string[]): Promise<string[]>;
6662
6664
  }
6665
+ /** @public */
6666
+ interface EmbeddingRepairOptions {
6667
+ /** Most memories one run re-embeds. Default 50. */
6668
+ maxRows?: number;
6669
+ /** Most memories one run inspects. Default 2000. */
6670
+ maxScan?: number;
6671
+ /** Where to resume the scan, from a previous result. Defaults to where this store's last run stopped. */
6672
+ cursor?: string;
6673
+ }
6674
+ /** @public */
6675
+ interface EmbeddingRepairResult {
6676
+ scanned: number;
6677
+ reembedded: number;
6678
+ failed: number;
6679
+ skippedConflict: number;
6680
+ /** Where the next run resumes; absent when the next run starts over from the newest memory. */
6681
+ cursor?: string;
6682
+ }
6663
6683
  /**
6664
6684
  * One user's memories, pitched at what the apps do with them rather than at
6665
6685
  * the storage ops underneath. Two backends are intended: the on-device
@@ -6727,6 +6747,8 @@ interface MemoryStore {
6727
6747
  * after subscribing. Returns the unsubscribe function.
6728
6748
  */
6729
6749
  subscribe(onChange: () => void, options?: MemorySubscribeOptions): () => void;
6750
+ /** Re-embeds memories the backend cannot rank with the current model. Absent where recall re-embeds lazily. */
6751
+ repairEmbeddings?(options?: EmbeddingRepairOptions): Promise<EmbeddingRepairResult>;
6730
6752
  /** TRANSITIONAL — see {@link MemoryMaintenance}. Absent on a remote backend. */
6731
6753
  maintenance?: MemoryMaintenance;
6732
6754
  /** Rule-based decay, available without the local-only {@link MemoryMaintenance}. */
@@ -10091,6 +10113,21 @@ declare function shouldRecallMemory(query: string): boolean;
10091
10113
  * legitimate empty search with unrelated vault contents. */
10092
10114
  declare function assembleMemoryContext(options: MemoryContextOptions): Promise<MemoryContextResult>;
10093
10115
 
10116
+ /** A message a {@link ExtractionMessageSource} resolves from a queued id. */
10117
+ interface ExtractionSourceMessage {
10118
+ id: string;
10119
+ role: "user" | "assistant";
10120
+ content: string;
10121
+ /** Position in the conversation; must increase with send order. */
10122
+ seq: number;
10123
+ }
10124
+ /** `ready` runs the job, `later` leaves it queued without counting an attempt, `gone` drops it. */
10125
+ type ExtractionSourceStatus = "ready" | "later" | "gone";
10126
+ /** Resolves queued ids for a conversation that does not live in local chat history. */
10127
+ interface ExtractionMessageSource {
10128
+ status(conversationId: string): Promise<ExtractionSourceStatus>;
10129
+ load(conversationId: string, ids: string[]): Promise<ExtractionSourceMessage[]>;
10130
+ }
10094
10131
  interface DurableAutoExtractorOptions extends Omit<CreateAutoExtractorOptions, "scope"> {
10095
10132
  /**
10096
10133
  * Scope for facts retained from newly queued turns. Pass an accessor to have
@@ -10129,6 +10166,14 @@ interface DurableAutoExtractorOptions extends Omit<CreateAutoExtractorOptions, "
10129
10166
  batchTimeoutMs?: number;
10130
10167
  /** Clock for the failed-session spacing. Defaults to `Date.now`. */
10131
10168
  now?: () => number;
10169
+ /**
10170
+ * Message source for a conversation outside local chat history, or `undefined`
10171
+ * for history. Jobs still store only ids; the source resolves them at drain
10172
+ * time and is re-checked before every write.
10173
+ */
10174
+ messageSource?: (conversationId: string) => ExtractionMessageSource | undefined;
10175
+ /** Ceiling on one `status` or `load` call of a message source. Defaults to 30 seconds. */
10176
+ sourceTimeoutMs?: number;
10132
10177
  }
10133
10178
  /** Durable client extraction. Call once per authenticated database session.
10134
10179
  * Resumes pending jobs on creation, reads bounded batches from encrypted
@@ -11476,4 +11521,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
11476
11521
  */
11477
11522
  declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
11478
11523
 
11479
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, 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 FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 NotionMcpCaller, 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 RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, 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 StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, 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 VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, 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, type WriteFailureReason, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, 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, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
11524
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, 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, type EmbeddingRepairOptions, type EmbeddingRepairResult, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionMessageSource, type ExtractionSourceMessage, type ExtractionSourceStatus, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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 LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 NotionMcpCaller, 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 RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, 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 StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, 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 VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, 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, type WriteFailureReason, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, 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, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };