@anuma/sdk 7.3.0 → 7.3.2

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.
@@ -2070,7 +2070,7 @@ function onKeyAvailable(address, callback) {
2070
2070
  callbacks.add(callback);
2071
2071
  return () => {
2072
2072
  callbacks.delete(callback);
2073
- if (callbacks.size === 0) {
2073
+ if (callbacks.size === 0 && keyAvailableCallbacks.get(address) === callbacks) {
2074
2074
  keyAvailableCallbacks.delete(address);
2075
2075
  }
2076
2076
  };
@@ -12722,9 +12722,72 @@ init_logger();
12722
12722
 
12723
12723
  // src/lib/db/entities/operations.ts
12724
12724
  var import_watermelondb19 = require("@nozbe/watermelondb");
12725
+
12726
+ // src/lib/db/memoryVault/types.ts
12727
+ var MEMORY_KINDS = [
12728
+ "display_name",
12729
+ "birth_date",
12730
+ "bio",
12731
+ "occupation",
12732
+ "interest",
12733
+ "gender",
12734
+ "height_cm",
12735
+ "looking_for",
12736
+ "politics",
12737
+ "religion",
12738
+ "ethnicity",
12739
+ "smoking",
12740
+ "drinking",
12741
+ "exercise",
12742
+ "sexuality",
12743
+ "prompt"
12744
+ ];
12745
+ var MEMORY_LEVELS = ["private", "matching", "profile"];
12746
+ var MemoryLevelError = class extends Error {
12747
+ constructor(message) {
12748
+ super(message);
12749
+ this.name = "MemoryLevelError";
12750
+ }
12751
+ };
12752
+ var MemorySourceIneligibleError = class extends Error {
12753
+ constructor() {
12754
+ super("Memory source is no longer eligible");
12755
+ this.name = "MemorySourceIneligibleError";
12756
+ }
12757
+ };
12758
+ var PUBLISHED_SCOPES = /* @__PURE__ */ new Set(["shared", "public"]);
12759
+ function levelFromScope(scope) {
12760
+ return typeof scope === "string" && PUBLISHED_SCOPES.has(scope) ? "matching" : "private";
12761
+ }
12762
+ function scopeForLevel(level) {
12763
+ return level === "private" ? "private" : "shared";
12764
+ }
12765
+ function resolveMemoryLevel(level, scope) {
12766
+ return typeof level === "string" && MEMORY_LEVELS.includes(level) ? level : levelFromScope(scope);
12767
+ }
12768
+ function levelForScopeChange(current, nextScope) {
12769
+ const implied = levelFromScope(nextScope);
12770
+ return implied === "matching" && resolveMemoryLevel(current.level, current.scope) === "profile" ? "profile" : implied;
12771
+ }
12772
+ function parseMedia(value) {
12773
+ if (typeof value !== "string" || value === "") return null;
12774
+ try {
12775
+ const parsed = JSON.parse(value);
12776
+ if (!Array.isArray(parsed)) return null;
12777
+ const refs = parsed.filter((r) => typeof r === "object" && r !== null).map((r) => ({
12778
+ feedItemId: Number(r.feedItemId ?? r.feed_item_id),
12779
+ objectKey: r.objectKey ?? r.object_key ?? null
12780
+ })).filter((r) => Number.isFinite(r.feedItemId));
12781
+ return refs.length > 0 ? refs : null;
12782
+ } catch {
12783
+ return null;
12784
+ }
12785
+ }
12786
+
12787
+ // src/lib/db/entities/operations.ts
12725
12788
  async function assertCanWrite(ctx) {
12726
12789
  if (ctx.canWrite && !await ctx.canWrite()) {
12727
- throw new Error("Memory source is no longer eligible");
12790
+ throw new MemorySourceIneligibleError();
12728
12791
  }
12729
12792
  }
12730
12793
  function entityToStored(e) {
@@ -13117,61 +13180,6 @@ function serializeSourceChunkIds(ids) {
13117
13180
  return JSON.stringify(ids.slice(start));
13118
13181
  }
13119
13182
 
13120
- // src/lib/db/memoryVault/types.ts
13121
- var MEMORY_KINDS = [
13122
- "display_name",
13123
- "birth_date",
13124
- "bio",
13125
- "occupation",
13126
- "interest",
13127
- "gender",
13128
- "height_cm",
13129
- "looking_for",
13130
- "politics",
13131
- "religion",
13132
- "ethnicity",
13133
- "smoking",
13134
- "drinking",
13135
- "exercise",
13136
- "sexuality",
13137
- "prompt"
13138
- ];
13139
- var MEMORY_LEVELS = ["private", "matching", "profile"];
13140
- var MemoryLevelError = class extends Error {
13141
- constructor(message) {
13142
- super(message);
13143
- this.name = "MemoryLevelError";
13144
- }
13145
- };
13146
- var PUBLISHED_SCOPES = /* @__PURE__ */ new Set(["shared", "public"]);
13147
- function levelFromScope(scope) {
13148
- return typeof scope === "string" && PUBLISHED_SCOPES.has(scope) ? "matching" : "private";
13149
- }
13150
- function scopeForLevel(level) {
13151
- return level === "private" ? "private" : "shared";
13152
- }
13153
- function resolveMemoryLevel(level, scope) {
13154
- return typeof level === "string" && MEMORY_LEVELS.includes(level) ? level : levelFromScope(scope);
13155
- }
13156
- function levelForScopeChange(current, nextScope) {
13157
- const implied = levelFromScope(nextScope);
13158
- return implied === "matching" && resolveMemoryLevel(current.level, current.scope) === "profile" ? "profile" : implied;
13159
- }
13160
- function parseMedia(value) {
13161
- if (typeof value !== "string" || value === "") return null;
13162
- try {
13163
- const parsed = JSON.parse(value);
13164
- if (!Array.isArray(parsed)) return null;
13165
- const refs = parsed.filter((r) => typeof r === "object" && r !== null).map((r) => ({
13166
- feedItemId: Number(r.feedItemId ?? r.feed_item_id),
13167
- objectKey: r.objectKey ?? r.object_key ?? null
13168
- })).filter((r) => Number.isFinite(r.feedItemId));
13169
- return refs.length > 0 ? refs : null;
13170
- } catch {
13171
- return null;
13172
- }
13173
- }
13174
-
13175
13183
  // src/lib/db/memoryVault/operations.ts
13176
13184
  function visibilityOrPrivate(value) {
13177
13185
  return value === "public" ? value : "private";
@@ -13191,7 +13199,7 @@ function isKinded(record2) {
13191
13199
  }
13192
13200
  async function assertCanWrite2(ctx) {
13193
13201
  if (ctx.canWrite && !await ctx.canWrite()) {
13194
- throw new Error("Memory source is no longer eligible");
13202
+ throw new MemorySourceIneligibleError();
13195
13203
  }
13196
13204
  }
13197
13205
  function assertValidKindLevel(kind, level) {
@@ -13882,7 +13890,7 @@ async function updateVaultMemoryOp(ctx, id, opts) {
13882
13890
  ctx.embeddedWalletSigner
13883
13891
  );
13884
13892
  } catch (err) {
13885
- if (err instanceof MemoryLevelError) throw err;
13893
+ if (err instanceof MemoryLevelError || err instanceof MemorySourceIneligibleError) throw err;
13886
13894
  return null;
13887
13895
  }
13888
13896
  }
@@ -17423,6 +17431,13 @@ var DEFAULT_AUTO_MERGE_THRESHOLD = 0.8;
17423
17431
  var DEFAULT_SCOPE = "private";
17424
17432
  var DEFAULT_CONSOLIDATE_THRESHOLD = 0.55;
17425
17433
  var DEFAULT_CONSOLIDATE_TOP_K = 20;
17434
+ var RetainError = class extends Error {
17435
+ constructor(reason, message) {
17436
+ super(message);
17437
+ this.reason = reason;
17438
+ this.name = "RetainError";
17439
+ }
17440
+ };
17426
17441
  async function retain(content, ctx, options = {}) {
17427
17442
  const embeddingOptions = {
17428
17443
  ...ctx.embeddingOptions,
@@ -17478,7 +17493,8 @@ async function retainWithPersistence(content, ctx, options = {}) {
17478
17493
  });
17479
17494
  prepared = withoutKindedRows(prepared);
17480
17495
  if (prepared.embeddingFailure || prepared.embeddingsUnavailable) {
17481
- throw new Error(
17496
+ throw new RetainError(
17497
+ "embeddings-unavailable",
17482
17498
  "retain: embeddings unavailable \u2014 refusing to auto-merge against an inert cosine lane, which would create a duplicate instead of merging into the existing memory. Retry when embeddings recover, or pass enableAutoMerge: false to force a create."
17483
17499
  );
17484
17500
  }
@@ -17848,7 +17864,10 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
17848
17864
  async function assertMergeTargetGoneOrThrow(ctx, targetId) {
17849
17865
  const stillExists = await (ctx.persistence.getFresh ? ctx.persistence.getFresh(targetId) : ctx.persistence.get(targetId));
17850
17866
  if (stillExists && (stillExists.kind === null || stillExists.kind === void 0)) {
17851
- throw new Error(`retain: merge into memory ${targetId} failed to persist`);
17867
+ throw new RetainError(
17868
+ "merge-not-persisted",
17869
+ `retain: merge into memory ${targetId} failed to persist`
17870
+ );
17852
17871
  }
17853
17872
  }
17854
17873
 
@@ -18006,6 +18025,12 @@ function restoreCandidates(candidates, redactor, ownNames) {
18006
18025
  (c) => c.candidate.content.length <= MAX_CONTENT_LENGTH && !c.unresolved && !isLowSignalContent(c.candidate.content, ownNames)
18007
18026
  ).map((c) => c.candidate);
18008
18027
  }
18028
+ function writeFailureReasonOf(err) {
18029
+ if (err instanceof MemorySourceIneligibleError) return "source-ineligible";
18030
+ if (err instanceof RetainError) return err.reason;
18031
+ if (err?.name === "AbortError") return "aborted";
18032
+ return "unknown";
18033
+ }
18009
18034
  async function extractAndRetain(messages, retainCtx, options) {
18010
18035
  const { memoryStore, signal } = options;
18011
18036
  if (memoryStore === null) throw new Error("Memory store is not ready");
@@ -18095,6 +18120,7 @@ async function extractAndRetain(messages, retainCtx, options) {
18095
18120
  const results = [];
18096
18121
  const quarantinedInfo = [];
18097
18122
  let failedWrites = 0;
18123
+ let writeFailureReason;
18098
18124
  let auditRows;
18099
18125
  const tRetain = Date.now();
18100
18126
  for (const { candidate, isQuarantined, reason, signature } of toRetain) {
@@ -18190,6 +18216,7 @@ async function extractAndRetain(messages, retainCtx, options) {
18190
18216
  }
18191
18217
  } catch (err) {
18192
18218
  failedWrites++;
18219
+ writeFailureReason ?? (writeFailureReason = writeFailureReasonOf(err));
18193
18220
  log.warn("[memory/extract] retain failed for one candidate", err);
18194
18221
  options.onCandidateFailed?.(candidate, err);
18195
18222
  }
@@ -18202,6 +18229,7 @@ async function extractAndRetain(messages, retainCtx, options) {
18202
18229
  candidates: succeededCandidates,
18203
18230
  results,
18204
18231
  failedCount: failedWrites,
18232
+ ...writeFailureReason !== void 0 && { writeFailureReason },
18205
18233
  outcome: outcome2,
18206
18234
  quarantined: quarantinedInfo,
18207
18235
  funnel: {
@@ -18472,7 +18500,17 @@ function createAutoExtractor(options) {
18472
18500
  const t0 = Date.now();
18473
18501
  void (async () => {
18474
18502
  try {
18475
- const { candidates, results, failedCount, outcome: outcome2, failure, funnel, timings, model } = await extractAndRetain(window2, retainCtx, {
18503
+ const {
18504
+ candidates,
18505
+ results,
18506
+ failedCount,
18507
+ writeFailureReason,
18508
+ outcome: outcome2,
18509
+ failure,
18510
+ funnel,
18511
+ timings,
18512
+ model
18513
+ } = await extractAndRetain(window2, retainCtx, {
18476
18514
  extract,
18477
18515
  memoryStore: options.memoryStore,
18478
18516
  signal: options.signal,
@@ -18508,6 +18546,7 @@ function createAutoExtractor(options) {
18508
18546
  candidates,
18509
18547
  results,
18510
18548
  failedCount,
18549
+ ...writeFailureReason !== void 0 && { writeFailureReason },
18511
18550
  durationMs: Date.now() - t0,
18512
18551
  conversationId,
18513
18552
  outcome: outcome2,
@@ -20613,10 +20652,10 @@ function createLocalMemoryStore(options) {
20613
20652
  const assertWrite = async (writeOptions) => {
20614
20653
  writeOptions?.signal?.throwIfAborted();
20615
20654
  if (writeOptions?.canWrite && !await writeOptions.canWrite()) {
20616
- throw new Error("Memory source is no longer eligible");
20655
+ throw new MemorySourceIneligibleError();
20617
20656
  }
20618
20657
  if (options.canWrite && !await options.canWrite()) {
20619
- throw new Error("Memory source is no longer eligible");
20658
+ throw new MemorySourceIneligibleError();
20620
20659
  }
20621
20660
  writeOptions?.signal?.throwIfAborted();
20622
20661
  };
@@ -21430,7 +21469,7 @@ function createRemoteMemoryPipeline(options) {
21430
21469
  const assertWrite = async () => {
21431
21470
  signal?.throwIfAborted();
21432
21471
  if (writeOptions?.canWrite && !await writeOptions.canWrite())
21433
- throw new Error("Memory source is no longer eligible");
21472
+ throw new MemorySourceIneligibleError();
21434
21473
  signal?.throwIfAborted();
21435
21474
  };
21436
21475
  const rejectUndecryptable = (failed) => {
@@ -22437,7 +22476,7 @@ function createRemoteMemoryStore(options) {
22437
22476
  if (!record2) return null;
22438
22477
  if (record2.memory.is_deleted) return null;
22439
22478
  if (writeOptions?.canWrite && !await writeOptions.canWrite())
22440
- throw new Error("Memory source is no longer eligible");
22479
+ throw new MemorySourceIneligibleError();
22441
22480
  writeOptions?.signal?.throwIfAborted();
22442
22481
  const next = edit(structuredClone(record2.memory));
22443
22482
  if (!next) return null;
@@ -23777,10 +23816,20 @@ function batchError(result) {
23777
23816
  var AccountFailureError = class extends Error {
23778
23817
  };
23779
23818
  var LockedSourcesError = class extends Error {
23780
- constructor(persistentIds) {
23781
- super("Source messages are locked; retained for retry");
23819
+ constructor(persistentIds, locked) {
23820
+ const counts = /* @__PURE__ */ new Map();
23821
+ for (const message of locked) {
23822
+ const version = /^enc:(v\d+):/.exec(message.content)?.[1] ?? "unknown";
23823
+ const key = `${message.decryptionStatus ?? "no_status"}:${version}`;
23824
+ counts.set(key, (counts.get(key) ?? 0) + 1);
23825
+ }
23826
+ const summary = [...counts].map(([key, count2]) => `${key}=${count2}`).join(", ");
23827
+ super(`Source messages are locked; retained for retry (${summary})`);
23782
23828
  this.persistentIds = persistentIds;
23783
23829
  }
23830
+ get awaitingKey() {
23831
+ return this.persistentIds.length === 0;
23832
+ }
23784
23833
  };
23785
23834
  function splitTurns(messages) {
23786
23835
  const turns = [];
@@ -23834,6 +23883,8 @@ function createDurableAutoExtractor(options) {
23834
23883
  const attempts = /* @__PURE__ */ new Map();
23835
23884
  const sessionFailures = /* @__PURE__ */ new Map();
23836
23885
  const skippedThisSession = /* @__PURE__ */ new Set();
23886
+ const awaitingKey = /* @__PURE__ */ new Set();
23887
+ let keyEpoch = 0;
23837
23888
  const clock = options.now ?? Date.now;
23838
23889
  const reportError = (error, conversationId) => {
23839
23890
  try {
@@ -24027,13 +24078,15 @@ function createDurableAutoExtractor(options) {
24027
24078
  for (const job of pending) {
24028
24079
  if (disposed) break;
24029
24080
  const attempted = attempts.get(job.id) ?? 0;
24030
- if (attempted >= MAX_ATTEMPTS || skippedThisSession.has(job.id)) continue;
24081
+ if (attempted >= MAX_ATTEMPTS || skippedThisSession.has(job.id) || awaitingKey.has(job.id))
24082
+ continue;
24031
24083
  if (processed >= MAX_JOBS_PER_PASS) {
24032
24084
  scheduleAfterSuccess = true;
24033
24085
  break;
24034
24086
  }
24035
24087
  processed++;
24036
24088
  const conversationId = String(job._getRaw("conversation_id"));
24089
+ const epochAtRead = keyEpoch;
24037
24090
  let ids = [];
24038
24091
  let loaded = [];
24039
24092
  try {
@@ -24067,16 +24120,39 @@ function createDurableAutoExtractor(options) {
24067
24120
  );
24068
24121
  continue;
24069
24122
  }
24070
- const locked = loaded.filter((message) => message && isEncrypted(message.content));
24123
+ const foreign = new Set(
24124
+ ids.filter((_id, index) => loaded[index]?.conversationId !== conversationId)
24125
+ );
24126
+ if (foreign.size) {
24127
+ await database.write(
24128
+ () => job.update(
24129
+ (r) => r._setRaw(
24130
+ "message_ids",
24131
+ JSON.stringify(idsOf(job).filter((id) => !foreign.has(id)))
24132
+ )
24133
+ )
24134
+ );
24135
+ attempts.delete(job.id);
24136
+ scheduleAfterSuccess = true;
24137
+ reportError(
24138
+ new Error(`Dropped ${foreign.size} source id(s) from another conversation`),
24139
+ conversationId
24140
+ );
24141
+ continue;
24142
+ }
24143
+ const locked = loaded.filter(
24144
+ (message) => !!message && isEncrypted(message.content)
24145
+ );
24071
24146
  if (locked.length) {
24072
24147
  throw new LockedSourcesError(
24073
24148
  locked.flatMap(
24074
24149
  (message) => message.decryptionStatus === "auth_mismatch" || message.decryptionStatus === "invalid_payload" ? [message.uniqueId] : []
24075
- )
24150
+ ),
24151
+ locked
24076
24152
  );
24077
24153
  }
24078
24154
  const messages = loaded.flatMap(
24079
- (m) => m && m.conversationId === conversationId && (m.role === "user" || m.role === "assistant") ? [{ id: m.uniqueId, role: m.role, content: m.content }] : []
24155
+ (m) => m && (m.role === "user" || m.role === "assistant") ? [{ id: m.uniqueId, role: m.role, content: m.content }] : []
24080
24156
  );
24081
24157
  const jobScope = currentScope() === "private" ? "private" : String(job._getRaw("scope"));
24082
24158
  const jobFolderId = job._getRaw("folder_id") ?? null;
@@ -24126,6 +24202,12 @@ function createDurableAutoExtractor(options) {
24126
24202
  scheduleAfterSuccess = true;
24127
24203
  } catch (error) {
24128
24204
  if (disposed) break;
24205
+ if (error instanceof LockedSourcesError && error.awaitingKey) {
24206
+ reportError(error, conversationId);
24207
+ if (keyEpoch === epochAtRead) awaitingKey.add(job.id);
24208
+ else scheduleAfterSuccess = true;
24209
+ continue;
24210
+ }
24129
24211
  attempts.set(job.id, attempted + 1);
24130
24212
  retry = true;
24131
24213
  reportError(error, conversationId);
@@ -24153,7 +24235,18 @@ function createDurableAutoExtractor(options) {
24153
24235
  activeBatch?.abort(options.signal?.reason);
24154
24236
  if (timer !== void 0) clearTimeout(timer);
24155
24237
  options.signal?.removeEventListener("abort", dispose);
24238
+ unsubscribeKey?.();
24156
24239
  }
24240
+ const unsubscribeKey = vault.walletAddress ? onKeyAvailable(vault.walletAddress, () => {
24241
+ keyEpoch++;
24242
+ if (!awaitingKey.size) return;
24243
+ awaitingKey.clear();
24244
+ if (timer !== void 0) {
24245
+ clearTimeout(timer);
24246
+ timer = void 0;
24247
+ }
24248
+ schedule(0);
24249
+ }) : void 0;
24157
24250
  if (options.signal?.aborted) dispose();
24158
24251
  else options.signal?.addEventListener("abort", dispose, { once: true });
24159
24252
  schedule(0);
@@ -24169,9 +24262,31 @@ function createDurableAutoExtractor(options) {
24169
24262
  (candidate) => candidate._getRaw("scope") === scope && (candidate._getRaw("folder_id") ?? null) === folderId
24170
24263
  );
24171
24264
  const positions = new Map(ids.map((id, index) => [id, index]));
24265
+ const watermarks = existing.flatMap((prior) => {
24266
+ const watermark = prior._getRaw("watermark");
24267
+ return typeof watermark === "string" && watermark ? [watermark] : [];
24268
+ });
24269
+ if (watermarks.length) {
24270
+ const misplaced = new Set(
24271
+ await storage.messagesCollection.query(
24272
+ import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf(watermarks)),
24273
+ import_watermelondb24.Q.where("conversation_id", import_watermelondb24.Q.notEq(conversationId))
24274
+ ).fetchIds()
24275
+ );
24276
+ for (const prior of existing)
24277
+ if (misplaced.has(String(prior._getRaw("watermark"))))
24278
+ await prior.update((r) => {
24279
+ r._setRaw("watermark", null);
24280
+ r._setRaw("watermark_seq", null);
24281
+ });
24282
+ }
24172
24283
  const rows = await storage.messagesCollection.query(import_watermelondb24.Q.where("id", import_watermelondb24.Q.oneOf(ids))).fetch();
24284
+ const foreignRows = new Set(
24285
+ rows.filter((row) => row._getRaw("conversation_id") !== conversationId).map((row) => row.id)
24286
+ );
24173
24287
  const sequences = /* @__PURE__ */ new Map();
24174
24288
  for (const row of rows) {
24289
+ if (foreignRows.has(row.id)) continue;
24175
24290
  const sequence = Number(row._getRaw("message_id"));
24176
24291
  if (Number.isFinite(sequence) && sequence > 0) sequences.set(row.id, sequence);
24177
24292
  }
@@ -24214,13 +24329,14 @@ function createDurableAutoExtractor(options) {
24214
24329
  const ownWatermark = job?._getRaw("watermark");
24215
24330
  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));
24216
24331
  const overlapStart = atOwnWatermark ? Math.max(0, boundary - 1) : start;
24217
- const fresh = ids.slice(overlapStart).filter((id) => !foreignSources.has(id));
24332
+ const fresh = ids.slice(overlapStart).filter((id) => !foreignSources.has(id) && !foreignRows.has(id));
24218
24333
  if (!fresh.length) return;
24219
24334
  if (job) {
24220
24335
  await job.update(
24221
24336
  (r) => r._setRaw("message_ids", JSON.stringify([.../* @__PURE__ */ new Set([...idsOf(job), ...fresh])]))
24222
24337
  );
24223
24338
  attempts.delete(job.id);
24339
+ awaitingKey.delete(job.id);
24224
24340
  } else {
24225
24341
  await jobs.create((r) => {
24226
24342
  r._setRaw("owner_key", owner);
@@ -5249,6 +5249,7 @@ declare function extractFacts(messages: AutoExtractMessage[], options: ExtractFa
5249
5249
  * look like `no-facts`.
5250
5250
  */
5251
5251
  type ExtractOutcome = "extracted" | "no-facts" | "empty-after-retry" | "dropped-after-redaction";
5252
+ type WriteFailureReason = "source-ineligible" | "embeddings-unavailable" | "merge-not-persisted" | "aborted" | "unknown";
5252
5253
  /**
5253
5254
  * Stage 2 — for each extracted candidate, call retain() with auto-merge
5254
5255
  * enabled. When `consolidateOptions` are wired, retain()'s consolidation pass
@@ -5319,6 +5320,7 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
5319
5320
  candidates: ExtractedCandidate[];
5320
5321
  results: RetainResult[];
5321
5322
  failedCount: number;
5323
+ writeFailureReason?: WriteFailureReason;
5322
5324
  outcome: ExtractOutcome;
5323
5325
  /**
5324
5326
  * Tier-0 security (PR3) — candidates quarantined by the injection screen and
@@ -8829,6 +8831,7 @@ interface TurnCompleteEvent {
8829
8831
  results: RetainResult[];
8830
8832
  /** Per-candidate retain() failures. `onError` only fires on pipeline throws. */
8831
8833
  failedCount: number;
8834
+ writeFailureReason?: WriteFailureReason;
8832
8835
  durationMs: number;
8833
8836
  conversationId?: string;
8834
8837
  /**
@@ -11457,4 +11460,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
11457
11460
  */
11458
11461
  declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
11459
11462
 
11460
- 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 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, 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 };
11463
+ 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 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 };
@@ -5249,6 +5249,7 @@ declare function extractFacts(messages: AutoExtractMessage[], options: ExtractFa
5249
5249
  * look like `no-facts`.
5250
5250
  */
5251
5251
  type ExtractOutcome = "extracted" | "no-facts" | "empty-after-retry" | "dropped-after-redaction";
5252
+ type WriteFailureReason = "source-ineligible" | "embeddings-unavailable" | "merge-not-persisted" | "aborted" | "unknown";
5252
5253
  /**
5253
5254
  * Stage 2 — for each extracted candidate, call retain() with auto-merge
5254
5255
  * enabled. When `consolidateOptions` are wired, retain()'s consolidation pass
@@ -5319,6 +5320,7 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
5319
5320
  candidates: ExtractedCandidate[];
5320
5321
  results: RetainResult[];
5321
5322
  failedCount: number;
5323
+ writeFailureReason?: WriteFailureReason;
5322
5324
  outcome: ExtractOutcome;
5323
5325
  /**
5324
5326
  * Tier-0 security (PR3) — candidates quarantined by the injection screen and
@@ -8829,6 +8831,7 @@ interface TurnCompleteEvent {
8829
8831
  results: RetainResult[];
8830
8832
  /** Per-candidate retain() failures. `onError` only fires on pipeline throws. */
8831
8833
  failedCount: number;
8834
+ writeFailureReason?: WriteFailureReason;
8832
8835
  durationMs: number;
8833
8836
  conversationId?: string;
8834
8837
  /**
@@ -11457,4 +11460,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
11457
11460
  */
11458
11461
  declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
11459
11462
 
11460
- 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 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, 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 };
11463
+ 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 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 };