@anuma/sdk 6.9.0 → 6.11.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.
@@ -6507,9 +6507,9 @@ function recencyMultiplier(updatedAt, opts = {}) {
6507
6507
  const updatedMs = updatedAt.getTime();
6508
6508
  if (!Number.isFinite(updatedMs)) return noDate;
6509
6509
  const now = opts.now ?? /* @__PURE__ */ new Date();
6510
- const nowMs2 = now.getTime();
6511
- if (!Number.isFinite(nowMs2)) return noDate;
6512
- const ageDays2 = Math.max(0, (nowMs2 - updatedMs) / DAY_MS2);
6510
+ const nowMs3 = now.getTime();
6511
+ if (!Number.isFinite(nowMs3)) return noDate;
6512
+ const ageDays2 = Math.max(0, (nowMs3 - updatedMs) / DAY_MS2);
6513
6513
  const perYearDecay = opts.perYearDecay ?? DEFAULT_PER_YEAR_DECAY;
6514
6514
  const floor = opts.floor ?? DEFAULT_FLOOR;
6515
6515
  const decay = perYearDecay * (ageDays2 / 365);
@@ -7563,6 +7563,9 @@ async function recall(query, ctx, options = {}) {
7563
7563
  const chunkResults = [];
7564
7564
  let vaultSize;
7565
7565
  let didRerank = false;
7566
+ let rerankMs = 0;
7567
+ let queryEmbedMs = 0;
7568
+ let vaultRowsEmbedded;
7566
7569
  let hadV2Head = false;
7567
7570
  let embeddingsUnavailable = false;
7568
7571
  let chunkEmbedFailed = false;
@@ -7587,12 +7590,15 @@ async function recall(query, ctx, options = {}) {
7587
7590
  ...vaultSize !== void 0 && { vaultSize },
7588
7591
  ...decryptLastRan !== void 0 && { decryptLast: decryptLastRan },
7589
7592
  ...vaultRowsDecrypted !== void 0 && { vaultRowsDecrypted },
7593
+ ...vaultRowsEmbedded !== void 0 && { vaultRowsEmbedded },
7590
7594
  factCount: factResults.length,
7591
7595
  chunkCount: chunkResults.length,
7592
7596
  timings: {
7593
7597
  total: nowMs() - t0,
7594
7598
  prep: prepMs,
7595
7599
  factLane: factLaneMs,
7600
+ rerank: rerankMs,
7601
+ queryEmbed: queryEmbedMs,
7596
7602
  chunkLane: chunkLaneMs,
7597
7603
  fuse: fuseMs
7598
7604
  },
@@ -7656,6 +7662,9 @@ async function recall(query, ctx, options = {}) {
7656
7662
  results,
7657
7663
  vaultSize: size,
7658
7664
  reranked,
7665
+ rerankMs: factRerankMs,
7666
+ queryEmbedMs: factQueryEmbedMs,
7667
+ rowsEmbedded: factRowsEmbedded,
7659
7668
  hadV2Head: v2Head,
7660
7669
  embeddingsUnavailable: factEmbeddingsUnavailable,
7661
7670
  rankedOnCosine: factRankedOnCosine,
@@ -7714,6 +7723,9 @@ async function recall(query, ctx, options = {}) {
7714
7723
  );
7715
7724
  vaultSize = size;
7716
7725
  didRerank = reranked;
7726
+ rerankMs = factRerankMs;
7727
+ queryEmbedMs = factQueryEmbedMs;
7728
+ vaultRowsEmbedded = factRowsEmbedded;
7717
7729
  hadV2Head = v2Head;
7718
7730
  if (factEmbeddingsUnavailable) embeddingsUnavailable = true;
7719
7731
  factLaneRankedOnCosine = factRankedOnCosine;
@@ -8178,6 +8190,7 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
8178
8190
  const rerankTopN = options.rerankTopN ?? 30;
8179
8191
  const ceWeight = options.ceWeight ?? 0.1;
8180
8192
  const headSlice = v2Ranked.slice(0, rerankTopN);
8193
+ const ceStart = nowMs2();
8181
8194
  try {
8182
8195
  const reranked = await rerankPairs(
8183
8196
  query,
@@ -8205,6 +8218,8 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
8205
8218
  getLogger().warn("[memory/search] cross-encoder rerank failed; using V2 ranking", err);
8206
8219
  }
8207
8220
  combined = v2Ranked;
8221
+ } finally {
8222
+ if (options.rerankStats) options.rerankStats.ms += nowMs2() - ceStart;
8208
8223
  }
8209
8224
  } else {
8210
8225
  combined = v2Ranked;
@@ -8371,6 +8386,7 @@ async function rankComposite(originalQuery, originalQueryEmbedding, subQueries,
8371
8386
  const ceWeight = options.ceWeight ?? 0.1;
8372
8387
  const headSlice = combined.slice(0, rerankTopN);
8373
8388
  const tailSlice = combined.slice(rerankTopN);
8389
+ const ceStart = nowMs2();
8374
8390
  try {
8375
8391
  const reranked = await rerankPairs(
8376
8392
  originalQuery,
@@ -8398,6 +8414,8 @@ async function rankComposite(originalQuery, originalQueryEmbedding, subQueries,
8398
8414
  err
8399
8415
  );
8400
8416
  }
8417
+ } finally {
8418
+ if (options.rerankStats) options.rerankStats.ms += nowMs2() - ceStart;
8401
8419
  }
8402
8420
  }
8403
8421
  if (options?.mmr) {
@@ -8524,11 +8542,13 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
8524
8542
  rowsDecrypted: 0
8525
8543
  };
8526
8544
  }
8545
+ const queryEmbedStart = nowMs2();
8527
8546
  const queryEmbedding = await embedQueryOrDegrade(
8528
8547
  query,
8529
8548
  embeddingOptions,
8530
8549
  opts.onEmbeddingDegraded
8531
8550
  );
8551
+ if (opts.embedStats) opts.embedStats.queryMs += nowMs2() - queryEmbedStart;
8532
8552
  const embeddingsDegraded = queryEmbedding.length === 0;
8533
8553
  const currentModel = embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
8534
8554
  const vectored = [];
@@ -8581,6 +8601,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
8581
8601
  const laneRows = laneFetched.filter((m) => !isEncrypted(m.content));
8582
8602
  if (laneRows.length > 0) {
8583
8603
  let laneVecs;
8604
+ if (opts.embedStats) opts.embedStats.rowsEmbedded += laneRows.length;
8584
8605
  try {
8585
8606
  laneVecs = await generateEmbeddings(
8586
8607
  laneRows.map((m) => m.content),
@@ -8659,6 +8680,10 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
8659
8680
  async function prepareVaultCandidates(query, vaultCtx, embeddingOptions, cache, searchOptions) {
8660
8681
  if (!query || typeof query !== "string") {
8661
8682
  return {
8683
+ // Nothing was read and nothing was embedded — the short-circuit fires
8684
+ // before either.
8685
+ queryEmbedMs: 0,
8686
+ rowsEmbedded: 0,
8662
8687
  memories: [],
8663
8688
  embeddedItems: [],
8664
8689
  queryEmbedding: [],
@@ -8691,6 +8716,7 @@ async function prepareVaultCandidates(query, vaultCtx, embeddingOptions, cache,
8691
8716
  embeddingsUnavailable = true;
8692
8717
  embeddingFailure = true;
8693
8718
  };
8719
+ const embedStats = { queryMs: 0, rowsEmbedded: 0 };
8694
8720
  if (searchOptions?.decryptLast) {
8695
8721
  const forceIncludeIds = [
8696
8722
  ...searchOptions.entityRanking ?? [],
@@ -8702,7 +8728,8 @@ async function prepareVaultCandidates(query, vaultCtx, embeddingOptions, cache,
8702
8728
  admitFloor: ADMIT_FLOOR,
8703
8729
  unembeddedCap: UNEMBEDDED_CAP,
8704
8730
  ...forceIncludeIds.length > 0 && { forceIncludeIds },
8705
- onEmbeddingDegraded
8731
+ onEmbeddingDegraded,
8732
+ embedStats
8706
8733
  });
8707
8734
  if (corpus.vaultSize === 0) {
8708
8735
  return {
@@ -8713,7 +8740,9 @@ async function prepareVaultCandidates(query, vaultCtx, embeddingOptions, cache,
8713
8740
  embeddingsUnavailable: false,
8714
8741
  embeddingFailure: false,
8715
8742
  decryptLast: true,
8716
- rowsDecrypted: corpus.rowsDecrypted
8743
+ rowsDecrypted: corpus.rowsDecrypted,
8744
+ queryEmbedMs: embedStats.queryMs,
8745
+ rowsEmbedded: embedStats.rowsEmbedded
8717
8746
  };
8718
8747
  }
8719
8748
  ({ memories, embeddedItems, queryEmbedding, vaultSize } = corpus);
@@ -8730,7 +8759,9 @@ async function prepareVaultCandidates(query, vaultCtx, embeddingOptions, cache,
8730
8759
  decryptLast: true,
8731
8760
  // Rows WERE decrypt-attempted even though none came back readable — that
8732
8761
  // is the whole point of reporting attempts rather than successes.
8733
- rowsDecrypted: corpus.rowsDecrypted
8762
+ rowsDecrypted: corpus.rowsDecrypted,
8763
+ queryEmbedMs: embedStats.queryMs,
8764
+ rowsEmbedded: embedStats.rowsEmbedded
8734
8765
  };
8735
8766
  }
8736
8767
  } else {
@@ -8755,10 +8786,14 @@ async function prepareVaultCandidates(query, vaultCtx, embeddingOptions, cache,
8755
8786
  embeddingsUnavailable: false,
8756
8787
  embeddingFailure: false,
8757
8788
  decryptLast: false,
8758
- rowsDecrypted: loaded.length
8789
+ rowsDecrypted: loaded.length,
8790
+ queryEmbedMs: embedStats.queryMs,
8791
+ rowsEmbedded: embedStats.rowsEmbedded
8759
8792
  };
8760
8793
  }
8794
+ const legacyEmbedStart = nowMs2();
8761
8795
  queryEmbedding = await embedQueryOrDegrade(query, embeddingOptions, onEmbeddingDegraded);
8796
+ embedStats.queryMs += nowMs2() - legacyEmbedStart;
8762
8797
  const currentModel = embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
8763
8798
  const uncachedTexts = [];
8764
8799
  const uncachedIndices = [];
@@ -8792,6 +8827,7 @@ async function prepareVaultCandidates(query, vaultCtx, embeddingOptions, cache,
8792
8827
  }
8793
8828
  if (uncachedTexts.length > 0) {
8794
8829
  let newEmbeddings;
8830
+ embedStats.rowsEmbedded += uncachedTexts.length;
8795
8831
  try {
8796
8832
  newEmbeddings = await generateEmbeddings(uncachedTexts, embeddingOptions);
8797
8833
  } catch (err) {
@@ -8835,6 +8871,8 @@ async function prepareVaultCandidates(query, vaultCtx, embeddingOptions, cache,
8835
8871
  embeddingsUnavailable = true;
8836
8872
  }
8837
8873
  return {
8874
+ queryEmbedMs: embedStats.queryMs,
8875
+ rowsEmbedded: embedStats.rowsEmbedded,
8838
8876
  memories,
8839
8877
  embeddedItems,
8840
8878
  queryEmbedding,
@@ -8885,11 +8923,15 @@ async function rankPreparedVaultCandidates(query, prepared, embeddingOptions, se
8885
8923
  results: results2,
8886
8924
  vaultSize: out.vaultSize,
8887
8925
  reranked: out.reranked ?? false,
8926
+ // Read straight off the shared stats object rather than being passed in at
8927
+ // each call site: every return in this function funnels through here, so a
8928
+ // path added later reports the CE bill without having to remember to.
8929
+ rerankMs: rerankStats.ms,
8888
8930
  hadV2Head: out.hadV2Head ?? false,
8889
8931
  embeddingsUnavailable
8890
8932
  };
8891
8933
  };
8892
- const rerankStats = { applied: false };
8934
+ const rerankStats = { applied: false, ms: 0 };
8893
8935
  const useFusion = searchOptions?.useFusion ?? true;
8894
8936
  const tuning = {
8895
8937
  ...searchOptions?.recencyAlpha !== void 0 && { recencyAlpha: searchOptions.recencyAlpha },
@@ -9008,13 +9050,16 @@ async function searchVaultMemoriesWithSize(query, vaultCtx, embeddingOptions, ca
9008
9050
  results: [],
9009
9051
  vaultSize: 0,
9010
9052
  reranked: false,
9053
+ rerankMs: 0,
9011
9054
  hadV2Head: false,
9012
9055
  embeddingsUnavailable: false,
9013
9056
  rankedOnCosine: false,
9014
9057
  // No storage read happened, so nothing was decrypted; report the path the
9015
9058
  // caller asked for so this turn is still attributable.
9016
9059
  decryptLast: !!searchOptions?.decryptLast,
9017
- rowsDecrypted: 0
9060
+ rowsDecrypted: 0,
9061
+ queryEmbedMs: 0,
9062
+ rowsEmbedded: 0
9018
9063
  };
9019
9064
  }
9020
9065
  if (searchOptions?.decompose === "llm" && normalizeSubQueries(searchOptions.subQueries).length < 2 && !warnedProgrammaticDecomposeIgnored) {
@@ -9035,11 +9080,14 @@ async function searchVaultMemoriesWithSize(query, vaultCtx, embeddingOptions, ca
9035
9080
  results: [],
9036
9081
  vaultSize: 0,
9037
9082
  reranked: false,
9083
+ rerankMs: 0,
9038
9084
  hadV2Head: false,
9039
9085
  embeddingsUnavailable: prepared.embeddingsUnavailable,
9040
9086
  rankedOnCosine: false,
9041
9087
  decryptLast: prepared.decryptLast,
9042
- rowsDecrypted: prepared.rowsDecrypted
9088
+ rowsDecrypted: prepared.rowsDecrypted,
9089
+ queryEmbedMs: prepared.queryEmbedMs,
9090
+ rowsEmbedded: prepared.rowsEmbedded
9043
9091
  };
9044
9092
  }
9045
9093
  if (prepared.memories.length === 0) {
@@ -9047,11 +9095,14 @@ async function searchVaultMemoriesWithSize(query, vaultCtx, embeddingOptions, ca
9047
9095
  results: [],
9048
9096
  vaultSize: prepared.vaultSize,
9049
9097
  reranked: false,
9098
+ rerankMs: 0,
9050
9099
  hadV2Head: false,
9051
9100
  embeddingsUnavailable: prepared.embeddingsUnavailable,
9052
9101
  rankedOnCosine: false,
9053
9102
  decryptLast: prepared.decryptLast,
9054
- rowsDecrypted: prepared.rowsDecrypted
9103
+ rowsDecrypted: prepared.rowsDecrypted,
9104
+ queryEmbedMs: prepared.queryEmbedMs,
9105
+ rowsEmbedded: prepared.rowsEmbedded
9055
9106
  };
9056
9107
  }
9057
9108
  const ranked = await rankPreparedVaultCandidates(
@@ -9064,7 +9115,9 @@ async function searchVaultMemoriesWithSize(query, vaultCtx, embeddingOptions, ca
9064
9115
  ...ranked,
9065
9116
  rankedOnCosine: !ranked.embeddingsUnavailable,
9066
9117
  decryptLast: prepared.decryptLast,
9067
- rowsDecrypted: prepared.rowsDecrypted
9118
+ rowsDecrypted: prepared.rowsDecrypted,
9119
+ queryEmbedMs: prepared.queryEmbedMs,
9120
+ rowsEmbedded: prepared.rowsEmbedded
9068
9121
  };
9069
9122
  }
9070
9123
  async function searchVaultMemories(query, vaultCtx, embeddingOptions, cache, searchOptions) {
@@ -9214,7 +9267,7 @@ ${formatted}`;
9214
9267
  }
9215
9268
  };
9216
9269
  }
9217
- var warnedProgrammaticDecomposeIgnored, SUPERSESSION_SIMILARITY_THRESHOLD, SUPERSESSION_MIN_AGE_GAP_MS, SUPERSESSION_BOOST_FACTOR, SUPERSESSION_MAX_WINDOW, EMBEDDINGS_DEGRADED_EMPTY_NO_LEXICAL;
9270
+ var nowMs2, warnedProgrammaticDecomposeIgnored, SUPERSESSION_SIMILARITY_THRESHOLD, SUPERSESSION_MIN_AGE_GAP_MS, SUPERSESSION_BOOST_FACTOR, SUPERSESSION_MAX_WINDOW, EMBEDDINGS_DEGRADED_EMPTY_NO_LEXICAL;
9218
9271
  var init_searchTool = __esm({
9219
9272
  "src/lib/memoryVault/searchTool.ts"() {
9220
9273
  "use strict";
@@ -9232,6 +9285,7 @@ var init_searchTool = __esm({
9232
9285
  init_bm25();
9233
9286
  init_decomposeQuery();
9234
9287
  init_lruCache();
9288
+ nowMs2 = () => typeof performance !== "undefined" && typeof performance.now === "function" ? performance.now() : Date.now();
9235
9289
  warnedProgrammaticDecomposeIgnored = false;
9236
9290
  SUPERSESSION_SIMILARITY_THRESHOLD = 0.7;
9237
9291
  SUPERSESSION_MIN_AGE_GAP_MS = 30 * 24 * 60 * 60 * 1e3;
@@ -9595,6 +9649,7 @@ __export(index_exports, {
9595
9649
  hasEncryptionKey: () => hasEncryptionKey,
9596
9650
  ingestPublishedPhotoMemoriesOp: () => ingestPublishedPhotoMemoriesOp,
9597
9651
  injectionSignatureCatalog: () => injectionSignatureCatalog,
9652
+ isDegradedTopicSkip: () => isDegradedTopicSkip,
9598
9653
  isPiiRedactor: () => isPiiRedactor,
9599
9654
  isRerankerAvailable: () => isRerankerAvailable,
9600
9655
  moveMemoriesToFolderOp: () => moveMemoriesToFolderOp,
@@ -18463,6 +18518,18 @@ function parseTopicResponse(parsed, validIds) {
18463
18518
  }
18464
18519
  return out;
18465
18520
  }
18521
+ var DEGRADED_TOPIC_SKIP = {
18522
+ excluded: false,
18523
+ "link-declined": false,
18524
+ "stamp-declined": false,
18525
+ "llm-unanswered": true,
18526
+ unreadable: true,
18527
+ "not-found": true,
18528
+ "link-failed": true
18529
+ };
18530
+ function isDegradedTopicSkip(reason) {
18531
+ return DEGRADED_TOPIC_SKIP[reason] === true;
18532
+ }
18466
18533
  async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
18467
18534
  const entityCtx = ctx.entityCtx;
18468
18535
  if (!entityCtx) {
@@ -18471,17 +18538,24 @@ async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
18471
18538
  const log = getLogger();
18472
18539
  const extractedAt = options.now ?? Date.now();
18473
18540
  const skippedIds = [];
18541
+ const skippedReasons = /* @__PURE__ */ new Map();
18542
+ const skip = (id, reason) => {
18543
+ if (skippedReasons.has(id)) return;
18544
+ skippedIds.push(id);
18545
+ skippedReasons.set(id, reason);
18546
+ };
18474
18547
  const inputs = [];
18475
- for (const id of memoryIds) {
18548
+ for (const id of new Set(memoryIds)) {
18476
18549
  let record;
18477
18550
  try {
18478
18551
  record = await ctx.vaultMemoryCollection.find(id);
18479
- } catch {
18480
- skippedIds.push(id);
18552
+ } catch (err) {
18553
+ log.warn("[memory/topics] vault lookup failed for extraction", err);
18554
+ skip(id, "not-found");
18481
18555
  continue;
18482
18556
  }
18483
18557
  if (record.isDeleted || ctx.userId !== void 0 && record.userId !== ctx.userId || record.topicsUserManaged) {
18484
- skippedIds.push(id);
18558
+ skip(id, "excluded");
18485
18559
  continue;
18486
18560
  }
18487
18561
  try {
@@ -18494,7 +18568,7 @@ async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
18494
18568
  inputs.push({ id, content: stored.content });
18495
18569
  } catch (err) {
18496
18570
  log.warn("[memory/topics] failed to load memory for extraction", err);
18497
- skippedIds.push(id);
18571
+ skip(id, "unreadable");
18498
18572
  }
18499
18573
  }
18500
18574
  const entitiesByMemory = await extractEntitiesForMemories(inputs, options);
@@ -18502,19 +18576,19 @@ async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
18502
18576
  for (const input of inputs) {
18503
18577
  const entities = entitiesByMemory.get(input.id);
18504
18578
  if (entities === void 0) {
18505
- skippedIds.push(input.id);
18579
+ skip(input.id, "llm-unanswered");
18506
18580
  continue;
18507
18581
  }
18508
18582
  try {
18509
18583
  const linked = await replaceMemoryEntitiesGuardedOp(entityCtx, input.id, entities);
18510
18584
  if (linked === null) {
18511
- skippedIds.push(input.id);
18585
+ skip(input.id, "link-declined");
18512
18586
  entitiesByMemory.delete(input.id);
18513
18587
  continue;
18514
18588
  }
18515
18589
  } catch (err) {
18516
18590
  log.warn("[memory/topics] replaceMemoryEntitiesGuardedOp failed", err);
18517
- skippedIds.push(input.id);
18591
+ skip(input.id, "link-failed");
18518
18592
  entitiesByMemory.delete(input.id);
18519
18593
  continue;
18520
18594
  }
@@ -18524,11 +18598,11 @@ async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
18524
18598
  const stampedSet = new Set(stampedIds);
18525
18599
  for (const id of toStamp) {
18526
18600
  if (!stampedSet.has(id)) {
18527
- skippedIds.push(id);
18601
+ skip(id, "stamp-declined");
18528
18602
  entitiesByMemory.delete(id);
18529
18603
  }
18530
18604
  }
18531
- return { entitiesByMemory, stampedIds, skippedIds };
18605
+ return { entitiesByMemory, stampedIds, skippedIds, skippedReasons };
18532
18606
  }
18533
18607
 
18534
18608
  // src/lib/memory/verifySupport.ts
@@ -24560,6 +24634,7 @@ function createNotionTools(getAccessToken, requestNotionAccess) {
24560
24634
  hasEncryptionKey,
24561
24635
  ingestPublishedPhotoMemoriesOp,
24562
24636
  injectionSignatureCatalog,
24637
+ isDegradedTopicSkip,
24563
24638
  isPiiRedactor,
24564
24639
  isRerankerAvailable,
24565
24640
  moveMemoriesToFolderOp,
@@ -5732,6 +5732,17 @@ interface RecallDiagnostics {
5732
5732
  * never the cost.
5733
5733
  */
5734
5734
  vaultRowsDecrypted?: number;
5735
+ /**
5736
+ * Rows the fact lane had to re-embed through the portal because their stored
5737
+ * vector was unusable — stale `embedding_model`, wrong dimension, or
5738
+ * unparseable. Absent when the fact lane didn't run.
5739
+ *
5740
+ * Expected to be 0 on a healthy vault: rows are embedded at write time and the
5741
+ * re-embed writes the current model back, so a persistently non-zero value
5742
+ * means the writeback is not sticking and every turn is paying for it. On the
5743
+ * LEGACY read path this batch is uncapped, so it can be the whole vault.
5744
+ */
5745
+ vaultRowsEmbedded?: number;
5735
5746
  /** Facts the fact lane returned (post-dedupe, pre-fusion). */
5736
5747
  factCount: number;
5737
5748
  /** Chunks the chunk lane returned (post-dedupe, pre-fusion). */
@@ -5744,6 +5755,37 @@ interface RecallDiagnostics {
5744
5755
  prep: number;
5745
5756
  /** Vault fact-lane search (`searchVaultMemoriesWithSize`). */
5746
5757
  factLane: number;
5758
+ /**
5759
+ * The cross-encoder's share of {@link factLane} — wall-clock spent inside
5760
+ * `rerankPairs`. Billed even when the CE threw partway through, because a
5761
+ * rerank that burned three seconds and then failed still cost them.
5762
+ *
5763
+ * A SUBSET of `factLane`, not a sibling: read `factLane - rerank` for
5764
+ * everything else the lane did (query embed, vault read, fused ranking).
5765
+ * 0 when the CE did not run; `reranked` is what distinguishes that from a
5766
+ * rerank that cost nothing.
5767
+ *
5768
+ * Exists because #845 spent three rounds arguing about which stage inside
5769
+ * the fact lane dominated — whole-vault read, then admission window, then
5770
+ * the CE — with one aggregate number for all of them. Every hypothesis was
5771
+ * an inference; this makes the question a query.
5772
+ */
5773
+ rerank: number;
5774
+ /**
5775
+ * The query embed's share of {@link factLane} — one portal round trip.
5776
+ *
5777
+ * Also a SUBSET of `factLane`. Together with `rerank` this makes the lane
5778
+ * decomposable: `factLane - queryEmbed - rerank` is the local work (vault
5779
+ * read, decrypt, BM25/cosine fusion), and each of the three implies a
5780
+ * completely different fix.
5781
+ *
5782
+ * 0 when the lane returned before embedding, which includes every empty
5783
+ * vault — `prepareVaultCandidates` short-circuits first. That is why the
5784
+ * fast `vault_size = 0` population never established a baseline for this
5785
+ * cost, and why the ~850ms floor on the smallest NON-empty vaults had no
5786
+ * attributable owner.
5787
+ */
5788
+ queryEmbed: number;
5747
5789
  /** Chunk-lane search (`searchChunksOp`). */
5748
5790
  chunkLane: number;
5749
5791
  /** Cross-lane RRF fusion + provenance dedup after both lanes. */
@@ -8519,6 +8561,39 @@ interface TopicExtractOptions extends PortalLlmAuth {
8519
8561
  * later sweep, never stamp them.
8520
8562
  */
8521
8563
  declare function extractEntitiesForMemories(memories: readonly TopicExtractionInput[], options: TopicExtractOptions): Promise<Map<string, ExtractedEntity[]>>;
8564
+ /**
8565
+ * Why one memory was skipped by a topic sweep.
8566
+ *
8567
+ * Split along the line that actually matters operationally — did the sweep
8568
+ * DECLINE this row on purpose, or did something BREAK:
8569
+ *
8570
+ * Deliberate (healthy; a sweep of nothing but these is a success):
8571
+ * - `excluded` — deleted, owned by another user, or `topicsUserManaged`.
8572
+ * - `link-declined` — the entity-link write's in-row guard declined (the row
8573
+ * became user-managed / deleted / absent mid-run).
8574
+ * - `stamp-declined` — same, caught by the stamp op's own re-check.
8575
+ *
8576
+ * Degraded (something is wrong; see {@link isDegradedTopicSkip}):
8577
+ * - `llm-unanswered` — the batch failed or the model omitted this id. THE one
8578
+ * to alarm on: it is how a wholly broken sweep looks.
8579
+ * - `unreadable` — the row could not be loaded/decrypted.
8580
+ * - `not-found` — the lookup threw (absent row or read fault).
8581
+ * - `link-failed` — the entity-link write threw.
8582
+ *
8583
+ * @public
8584
+ */
8585
+ type TopicSkipReason = "excluded" | "link-declined" | "stamp-declined" | "llm-unanswered" | "unreadable" | "not-found" | "link-failed";
8586
+ /**
8587
+ * Whether a skip reason means the sweep FAILED on that row, rather than
8588
+ * deliberately passing over it.
8589
+ *
8590
+ * Exported so callers classify identically instead of each re-deriving the
8591
+ * split — the reason this type exists is that one wrong grouping turns a broken
8592
+ * sweep back into a healthy-looking one.
8593
+ *
8594
+ * @public
8595
+ */
8596
+ declare function isDegradedTopicSkip(reason: TopicSkipReason): boolean;
8522
8597
  /** Outcome of one {@link extractAndLinkEntitiesForMemoriesOp} run. */
8523
8598
  interface TopicExtractionRunResult {
8524
8599
  /** memoryId → entities the LLM returned (post-validation, post-linking). */
@@ -8531,6 +8606,24 @@ interface TopicExtractionRunResult {
8531
8606
  * LLM batches. Skipped ids are not stamped, so failed batches are retried
8532
8607
  * by a later sweep — callers should apply their own attempt caps. */
8533
8608
  skippedIds: string[];
8609
+ /**
8610
+ * Why each id in {@link skippedIds} was skipped.
8611
+ *
8612
+ * `skippedIds` alone cannot distinguish a sweep that deliberately declined
8613
+ * work from one that FAILED: a run where every LLM batch errored and a run
8614
+ * over rows the user has taken manual control of produce an identical array.
8615
+ * That is the same blindness `outcome: 'empty-after-retry'` had before #888 —
8616
+ * a degradation wearing the shape of normal control flow.
8617
+ *
8618
+ * It matters here because topics feed the entity recall lane, so a silently
8619
+ * failing sweep means memories that exist but cannot be found by entity, with
8620
+ * nothing in production saying so.
8621
+ *
8622
+ * Populated in lockstep with `skippedIds` (single `skip()` helper), so the two
8623
+ * cannot drift. Group by {@link isDegradedTopicSkip} to separate "declined" from
8624
+ * "broke".
8625
+ */
8626
+ skippedReasons: Map<string, TopicSkipReason>;
8534
8627
  }
8535
8628
  /**
8536
8629
  * Run LLM topic extraction over existing vault memories and persist the
@@ -10377,4 +10470,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
10377
10470
  */
10378
10471
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
10379
10472
 
10380
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isPiiRedactor, isRerankerAvailable, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
10473
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };