@anuma/sdk 3.3.1 → 3.5.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.
@@ -4649,11 +4649,20 @@ async function getModel() {
4649
4649
  function sigmoid(x) {
4650
4650
  return 1 / (1 + Math.exp(-x));
4651
4651
  }
4652
+ function formatRerankDoc(content, dateMs) {
4653
+ if (dateMs === null || dateMs === void 0 || !Number.isFinite(dateMs)) return content;
4654
+ const d = new Date(dateMs);
4655
+ if (!Number.isFinite(d.getTime())) return content;
4656
+ const yyyy = d.getFullYear();
4657
+ const mm = String(d.getMonth() + 1).padStart(2, "0");
4658
+ const dd = String(d.getDate()).padStart(2, "0");
4659
+ return `[Date: ${yyyy}-${mm}-${dd}] ${content}`;
4660
+ }
4652
4661
  async function rerankPairs(query, items) {
4653
4662
  if (items.length === 0 || !query) return [];
4654
4663
  const { tokenizer, model } = await getModel();
4655
4664
  const queries = items.map(() => query);
4656
- const docs = items.map((i) => i.content);
4665
+ const docs = items.map((i) => formatRerankDoc(i.content, i.dateMs));
4657
4666
  const tokenize2 = tokenizer;
4658
4667
  const inputs = tokenize2(queries, { text_pair: docs, padding: true, truncation: true });
4659
4668
  const forward = model;
@@ -5279,6 +5288,48 @@ var init_graphTraversal = __esm({
5279
5288
  }
5280
5289
  });
5281
5290
 
5291
+ // src/lib/memory/observationTrend.ts
5292
+ function toMs(value) {
5293
+ return value instanceof Date ? value.getTime() : value;
5294
+ }
5295
+ function classifyObservationTrend(input, now = Date.now()) {
5296
+ const createdMs = toMs(input.createdAt);
5297
+ if (!Number.isFinite(createdMs) || !Number.isFinite(now)) return "stable";
5298
+ const lastMsRaw = input.lastObservedAt;
5299
+ const lastMs = lastMsRaw !== null && lastMsRaw !== void 0 && Number.isFinite(lastMsRaw) ? Math.max(createdMs, lastMsRaw) : createdMs;
5300
+ const proofs = Math.max(1, input.proofCount ?? 1);
5301
+ const ageDays2 = Math.max(0, (now - createdMs) / DAY_MS2);
5302
+ const daysSinceLast = Math.max(0, (now - lastMs) / DAY_MS2);
5303
+ if (daysSinceLast >= TREND_STALE_WINDOW_DAYS) return "stale";
5304
+ if (daysSinceLast >= TREND_RECENT_WINDOW_DAYS) return "weakening";
5305
+ if (ageDays2 <= TREND_RECENT_WINDOW_DAYS && proofs <= 2) return "new";
5306
+ if (proofs >= 3) return "strengthening";
5307
+ if (proofs >= 2 && ageDays2 > TREND_RECENT_WINDOW_DAYS) return "strengthening";
5308
+ return "stable";
5309
+ }
5310
+ function summarizeObservationTrends(inputs, now = Date.now()) {
5311
+ const counts = {
5312
+ new: 0,
5313
+ strengthening: 0,
5314
+ stable: 0,
5315
+ weakening: 0,
5316
+ stale: 0
5317
+ };
5318
+ for (const input of inputs) {
5319
+ counts[classifyObservationTrend(input, now)]++;
5320
+ }
5321
+ return counts;
5322
+ }
5323
+ var DAY_MS2, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS;
5324
+ var init_observationTrend = __esm({
5325
+ "src/lib/memory/observationTrend.ts"() {
5326
+ "use strict";
5327
+ DAY_MS2 = 1e3 * 60 * 60 * 24;
5328
+ TREND_RECENT_WINDOW_DAYS = 30;
5329
+ TREND_STALE_WINDOW_DAYS = 90;
5330
+ }
5331
+ });
5332
+
5282
5333
  // src/lib/memory/queryTemporal.ts
5283
5334
  function startOfDay(ts) {
5284
5335
  const d = new Date(ts);
@@ -5678,7 +5729,7 @@ async function recall(query, ctx, options = {}) {
5678
5729
  const fuseStart = nowMs();
5679
5730
  if (types.length === 1 || factResults.length === 0 || chunkResults.length === 0) {
5680
5731
  const memories2 = [
5681
- ...factResults.map(toFactMemory),
5732
+ ...factResults.map((r) => toFactMemory(r, options.now)),
5682
5733
  ...chunkResults.map(toChunkMemory)
5683
5734
  ];
5684
5735
  memories2.sort((a, b) => b.score - a.score);
@@ -5699,7 +5750,7 @@ async function recall(query, ctx, options = {}) {
5699
5750
  const fused = rrfFuse([factRanking, chunkRanking], options.rrfK);
5700
5751
  const byId = /* @__PURE__ */ new Map();
5701
5752
  for (const r of factResults) {
5702
- const m = toFactMemory(r);
5753
+ const m = toFactMemory(r, options.now);
5703
5754
  m.score = fused.get(`fact:${r.uniqueId}`) ?? 0;
5704
5755
  if (!m.scoreBreakdown) m.scoreBreakdown = {};
5705
5756
  m.scoreBreakdown.fused = r.similarity;
@@ -5748,7 +5799,10 @@ async function recall(query, ctx, options = {}) {
5748
5799
  ...vaultSize !== void 0 && { vaultSize }
5749
5800
  };
5750
5801
  }
5751
- function toFactMemory(r) {
5802
+ function toFactMemory(r, now) {
5803
+ const createdAt = r.createdAt ?? /* @__PURE__ */ new Date(0);
5804
+ const proofCount = r.proofCount ?? void 0;
5805
+ const lastObservedAt = r.lastObservedAt ?? null;
5752
5806
  return {
5753
5807
  id: r.uniqueId,
5754
5808
  kind: "fact",
@@ -5764,6 +5818,18 @@ function toFactMemory(r) {
5764
5818
  // (and UI reading them) carry the fact's type. Undefined when untyped.
5765
5819
  ...r.factType !== void 0 && { factType: r.factType },
5766
5820
  ...r.sourceChunkIds !== void 0 && r.sourceChunkIds !== null && { sourceChunkIds: r.sourceChunkIds },
5821
+ ...proofCount !== void 0 && proofCount !== null && { proofCount },
5822
+ ...lastObservedAt !== null && { lastObservedAt },
5823
+ // C2 — algorithmic trend from evidence timestamps (no LLM). Honor
5824
+ // RecallOptions.now so back-dated eval harnesses get consistent labels.
5825
+ observationTrend: classifyObservationTrend(
5826
+ {
5827
+ createdAt,
5828
+ lastObservedAt,
5829
+ proofCount
5830
+ },
5831
+ now ?? Date.now()
5832
+ ),
5767
5833
  // r.similarity from searchVaultMemoriesWithSize is the fused score
5768
5834
  // (cosine + BM25 + RRF + recency + proof) when useFusion=true (the
5769
5835
  // default) and pure cosine when useFusion=false. The breakdown
@@ -5772,7 +5838,7 @@ function toFactMemory(r) {
5772
5838
  content: r.content,
5773
5839
  score: r.similarity,
5774
5840
  scoreBreakdown: { fused: r.similarity },
5775
- createdAt: r.createdAt ?? /* @__PURE__ */ new Date(0),
5841
+ createdAt,
5776
5842
  updatedAt: r.updatedAt ?? /* @__PURE__ */ new Date(0)
5777
5843
  };
5778
5844
  }
@@ -5855,6 +5921,7 @@ var init_recall = __esm({
5855
5921
  init_embeddings();
5856
5922
  init_searchTool();
5857
5923
  init_graphTraversal();
5924
+ init_observationTrend();
5858
5925
  init_queryEntities();
5859
5926
  init_queryTemporal();
5860
5927
  init_rrf();
@@ -5870,6 +5937,23 @@ var init_recall = __esm({
5870
5937
  function normalizeEventTimeKind(kind) {
5871
5938
  return kind === "point" || kind === "range" || kind === "ongoing" ? kind : null;
5872
5939
  }
5940
+ function rerankDateMs(item) {
5941
+ if (item.eventTimeStart !== null && item.eventTimeStart !== void 0 && Number.isFinite(item.eventTimeStart) && item.eventTimeStart > 0) {
5942
+ return item.eventTimeStart;
5943
+ }
5944
+ if (item.lastObservedAt !== null && item.lastObservedAt !== void 0 && Number.isFinite(item.lastObservedAt) && item.lastObservedAt > 0) {
5945
+ return item.lastObservedAt;
5946
+ }
5947
+ const updatedMs = item.updatedAt?.getTime();
5948
+ if (updatedMs !== null && updatedMs !== void 0 && Number.isFinite(updatedMs) && updatedMs > 0) {
5949
+ return updatedMs;
5950
+ }
5951
+ const createdMs = item.createdAt?.getTime();
5952
+ if (createdMs !== null && createdMs !== void 0 && Number.isFinite(createdMs) && createdMs > 0) {
5953
+ return createdMs;
5954
+ }
5955
+ return void 0;
5956
+ }
5873
5957
  function supersessionDelta(olderScore, newerScore, boostFactor = SUPERSESSION_BOOST_FACTOR) {
5874
5958
  const gap = olderScore - newerScore;
5875
5959
  return gap * boostFactor;
@@ -6072,6 +6156,7 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
6072
6156
  }
6073
6157
  let combined;
6074
6158
  let tailSlice = [];
6159
+ const itemById = new Map(items.map((i) => [i.id, i]));
6075
6160
  if (options?.rerank) {
6076
6161
  const rerankTopN = options.rerankTopN ?? 30;
6077
6162
  const ceWeight = options.ceWeight ?? 0.1;
@@ -6079,7 +6164,12 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
6079
6164
  try {
6080
6165
  const reranked = await rerankPairs(
6081
6166
  query,
6082
- headSlice.map((r) => ({ id: r.uniqueId, content: r.content }))
6167
+ headSlice.map((r) => ({
6168
+ id: r.uniqueId,
6169
+ content: r.content,
6170
+ // C4: date-prefix the CE doc so temporal alignment influences rank.
6171
+ dateMs: rerankDateMs(itemById.get(r.uniqueId) ?? r)
6172
+ }))
6083
6173
  );
6084
6174
  tailSlice = v2Ranked.slice(rerankTopN);
6085
6175
  const v2ScoreById = new Map(headSlice.map((r) => [r.uniqueId, r.similarity]));
@@ -6114,11 +6204,11 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
6114
6204
  const fused = rrfFuse([headIds, headIds, ...sideLanesAsync], options?.rrfK);
6115
6205
  const fusedHead = combined.map((r) => ({ ...r, similarity: fused.get(r.uniqueId) ?? r.similarity })).sort((a, b) => b.similarity - a.similarity);
6116
6206
  const seen = new Set(combined.map((r) => r.uniqueId));
6117
- const itemById = new Map(items.map((i) => [i.id, i]));
6207
+ const itemById2 = new Map(items.map((i) => [i.id, i]));
6118
6208
  for (const lane of sideLanesAsync) {
6119
6209
  for (const id of lane) {
6120
6210
  if (seen.has(id)) continue;
6121
- const it = itemById.get(id);
6211
+ const it = itemById2.get(id);
6122
6212
  if (!it) continue;
6123
6213
  fusedHead.push({
6124
6214
  uniqueId: id,
@@ -6137,11 +6227,11 @@ async function rankFusedVaultMemoriesAsync(query, queryEmbedding, items, options
6137
6227
  if (options?.mmr) {
6138
6228
  const lambda = options.mmrLambda ?? 0.7;
6139
6229
  const mmrTopN = options.mmrTopN ?? 20;
6140
- const itemById = new Map(items.map((i) => [i.id, i]));
6230
+ const itemById2 = new Map(items.map((i) => [i.id, i]));
6141
6231
  const mmrCandidates = combined.slice(0, mmrTopN).map((r) => ({
6142
6232
  id: r.uniqueId,
6143
6233
  score: r.similarity,
6144
- embedding: itemById.get(r.uniqueId)?.embedding ?? [],
6234
+ embedding: itemById2.get(r.uniqueId)?.embedding ?? [],
6145
6235
  content: r.content
6146
6236
  }));
6147
6237
  const picked = applyMMR(mmrCandidates, limit, lambda);
@@ -6263,7 +6353,12 @@ async function rankComposite(originalQuery, originalQueryEmbedding, subQueries,
6263
6353
  try {
6264
6354
  const reranked = await rerankPairs(
6265
6355
  originalQuery,
6266
- headSlice.map((r) => ({ id: r.uniqueId, content: r.content }))
6356
+ headSlice.map((r) => ({
6357
+ id: r.uniqueId,
6358
+ content: r.content,
6359
+ // C4: date-prefix the CE doc so temporal alignment influences rank.
6360
+ dateMs: rerankDateMs(itemById.get(r.uniqueId) ?? r)
6361
+ }))
6267
6362
  );
6268
6363
  const ceById = new Map(reranked.map((r) => [r.id, r.score]));
6269
6364
  const head = headSlice.map((r) => ({
@@ -6450,6 +6545,7 @@ async function searchVaultMemoriesWithSize(query, vaultCtx, embeddingOptions, ca
6450
6545
  createdAt: m.createdAt,
6451
6546
  updatedAt: m.updatedAt,
6452
6547
  proofCount: m.proofCount,
6548
+ lastObservedAt: m.lastObservedAt,
6453
6549
  eventTimeStart: m.eventTimeStart,
6454
6550
  sourceChunkIds: m.sourceChunkIds,
6455
6551
  eventTimeEnd: m.eventTimeEnd,
@@ -6466,13 +6562,27 @@ async function searchVaultMemoriesWithSize(query, vaultCtx, embeddingOptions, ca
6466
6562
  );
6467
6563
  }
6468
6564
  }
6469
- const timestampById = new Map(
6470
- memories.map((m) => [m.uniqueId, { createdAt: m.createdAt, updatedAt: m.updatedAt }])
6565
+ const metaById = new Map(
6566
+ memories.map((m) => [
6567
+ m.uniqueId,
6568
+ {
6569
+ createdAt: m.createdAt,
6570
+ updatedAt: m.updatedAt,
6571
+ proofCount: m.proofCount,
6572
+ lastObservedAt: m.lastObservedAt
6573
+ }
6574
+ ])
6471
6575
  );
6472
6576
  const stampTimestamps = (out) => {
6473
6577
  const results2 = out.results.map((r) => {
6474
- const ts = timestampById.get(r.uniqueId);
6475
- return ts ? { ...r, createdAt: ts.createdAt, updatedAt: ts.updatedAt } : r;
6578
+ const meta = metaById.get(r.uniqueId);
6579
+ return meta ? {
6580
+ ...r,
6581
+ createdAt: meta.createdAt,
6582
+ updatedAt: meta.updatedAt,
6583
+ proofCount: meta.proofCount,
6584
+ lastObservedAt: meta.lastObservedAt
6585
+ } : r;
6476
6586
  });
6477
6587
  return {
6478
6588
  results: results2,
@@ -6961,6 +7071,8 @@ __export(index_exports, {
6961
7071
  THEME_ATTRS: () => THEME_ATTRS,
6962
7072
  TOPICS_EXTRACTION_VERSION: () => TOPICS_EXTRACTION_VERSION,
6963
7073
  TOPIC_EXTRACTION_BATCH_SIZE: () => TOPIC_EXTRACTION_BATCH_SIZE,
7074
+ TREND_RECENT_WINDOW_DAYS: () => TREND_RECENT_WINDOW_DAYS,
7075
+ TREND_STALE_WINDOW_DAYS: () => TREND_STALE_WINDOW_DAYS,
6964
7076
  TextProcessor: () => TextProcessor,
6965
7077
  UIInteractionProvider: () => UIInteractionProvider,
6966
7078
  VAULT_SIZE_HOP_CAP: () => VAULT_SIZE_HOP_CAP,
@@ -6982,6 +7094,7 @@ __export(index_exports, {
6982
7094
  classifyCryptoPriceBatch: () => classifyCryptoPriceBatch,
6983
7095
  classifyDecay: () => classifyDecay,
6984
7096
  classifyInjectionCandidates: () => classifyInjectionCandidates,
7097
+ classifyObservationTrend: () => classifyObservationTrend,
6985
7098
  classifyStockPrice: () => classifyStockPrice,
6986
7099
  classifyStockPriceBatch: () => classifyStockPriceBatch,
6987
7100
  classifyWeather: () => classifyWeather,
@@ -7251,6 +7364,7 @@ __export(index_exports, {
7251
7364
  storeNotionReturnUrl: () => storeNotionReturnUrl,
7252
7365
  streamCancelPath: () => streamCancelPath,
7253
7366
  streamReplayPath: () => streamReplayPath,
7367
+ summarizeObservationTrends: () => summarizeObservationTrends,
7254
7368
  supersedeVaultMemoryOp: () => supersedeVaultMemoryOp,
7255
7369
  synthesizeProfile: () => synthesizeProfile,
7256
7370
  traverseGraphLane: () => traverseGraphLane,
@@ -15255,12 +15369,12 @@ function createChunkVectorCache(maxSize = DEFAULT_CHUNK_CACHE_SIZE) {
15255
15369
 
15256
15370
  // src/lib/memory/decay.ts
15257
15371
  init_logger();
15258
- var DAY_MS2 = 24 * 60 * 60 * 1e3;
15259
- var SHORT_TTL_MS = 30 * DAY_MS2;
15260
- var MEDIUM_TTL_MS = 180 * DAY_MS2;
15372
+ var DAY_MS3 = 24 * 60 * 60 * 1e3;
15373
+ var SHORT_TTL_MS = 30 * DAY_MS3;
15374
+ var MEDIUM_TTL_MS = 180 * DAY_MS3;
15261
15375
  var NEVER_TTL_MS = Number.POSITIVE_INFINITY;
15262
- var HARD_DELETE_WINDOW_MS = 30 * DAY_MS2;
15263
- var PAST_EVENT_GRACE_MS = 7 * DAY_MS2;
15376
+ var HARD_DELETE_WINDOW_MS = 30 * DAY_MS3;
15377
+ var PAST_EVENT_GRACE_MS = 7 * DAY_MS3;
15264
15378
  var DEFAULT_DECAY_POLICY = {
15265
15379
  ttlByType: {
15266
15380
  identity: NEVER_TTL_MS,
@@ -15520,6 +15634,7 @@ function createDecaySweeper(options) {
15520
15634
 
15521
15635
  // src/lib/memory/index.ts
15522
15636
  init_graphTraversal();
15637
+ init_observationTrend();
15523
15638
  init_recall();
15524
15639
 
15525
15640
  // src/lib/memory/recallTool.ts
@@ -15886,6 +16001,7 @@ init_logger();
15886
16001
  init_constants();
15887
16002
  init_embeddings();
15888
16003
  init_vector();
16004
+ init_observationTrend();
15889
16005
  var DEFAULT_SYNTHESIS_MODEL = "inclusionai/ling-2.6-flash";
15890
16006
  var DEFAULT_FACET_RECALL_LIMIT = 20;
15891
16007
  var DEFAULT_FACET_MAX_TOKENS = 512;
@@ -15971,6 +16087,13 @@ async function synthesizeProfile(ctx, options = {}) {
15971
16087
  includeSuperseded: true
15972
16088
  });
15973
16089
  const watermark = computeVaultWatermark(memories);
16090
+ const observationTrends = summarizeObservationTrends(
16091
+ memories.filter((m) => !m.isDeleted && m.supersededBy === null).map((m) => ({
16092
+ createdAt: m.createdAt,
16093
+ lastObservedAt: m.lastObservedAt,
16094
+ proofCount: m.proofCount
16095
+ }))
16096
+ );
15974
16097
  const presentIds = new Set(memories.map((m) => m.uniqueId));
15975
16098
  const hasStaleSections = previous?.sections.some((s) => s.stale);
15976
16099
  const citesMissingFact = previous?.sections.some(
@@ -15978,10 +16101,14 @@ async function synthesizeProfile(ctx, options = {}) {
15978
16101
  );
15979
16102
  if (previous && previous.vaultWatermark === watermark && !hasStaleSections && !citesMissingFact) {
15980
16103
  const sameOrder = previous.sections.length === facets.length && facets.every((f, i) => previous.sections[i]?.key === f.key);
15981
- if (sameOrder) return previous;
16104
+ if (sameOrder) {
16105
+ if (trendsEqual(previous.observationTrends, observationTrends)) return previous;
16106
+ return { ...previous, observationTrends };
16107
+ }
15982
16108
  return {
15983
16109
  ...previous,
15984
- sections: facets.map((f) => previous.sections.find((s) => s.key === f.key))
16110
+ sections: facets.map((f) => previous.sections.find((s) => s.key === f.key)),
16111
+ observationTrends
15985
16112
  };
15986
16113
  }
15987
16114
  const staleKeys = await computeStaleFacetKeys(ctx, memories, facets, previous, watermark);
@@ -16014,6 +16141,7 @@ async function synthesizeProfile(ctx, options = {}) {
16014
16141
  sections,
16015
16142
  vaultWatermark: watermark,
16016
16143
  config,
16144
+ observationTrends,
16017
16145
  generatedAt: Date.now()
16018
16146
  };
16019
16147
  }
@@ -16024,6 +16152,10 @@ function configMatches(a, b) {
16024
16152
  function facetsSignature(facets) {
16025
16153
  return facets.map((f) => JSON.stringify([f.key, f.label, f.query, f.guidance])).sort().join("\n");
16026
16154
  }
16155
+ function trendsEqual(a, b) {
16156
+ if (!a) return false;
16157
+ return a.new === b.new && a.strengthening === b.strengthening && a.stable === b.stable && a.weakening === b.weakening && a.stale === b.stale;
16158
+ }
16027
16159
  function changeTime(m) {
16028
16160
  return Math.max(m.updatedAt.getTime(), m.supersededAt ?? 0, m.lastObservedAt ?? 0);
16029
16161
  }
@@ -32085,6 +32217,8 @@ function renderAnumaJsx(jsx3) {
32085
32217
  THEME_ATTRS,
32086
32218
  TOPICS_EXTRACTION_VERSION,
32087
32219
  TOPIC_EXTRACTION_BATCH_SIZE,
32220
+ TREND_RECENT_WINDOW_DAYS,
32221
+ TREND_STALE_WINDOW_DAYS,
32088
32222
  TextProcessor,
32089
32223
  UIInteractionProvider,
32090
32224
  VAULT_SIZE_HOP_CAP,
@@ -32106,6 +32240,7 @@ function renderAnumaJsx(jsx3) {
32106
32240
  classifyCryptoPriceBatch,
32107
32241
  classifyDecay,
32108
32242
  classifyInjectionCandidates,
32243
+ classifyObservationTrend,
32109
32244
  classifyStockPrice,
32110
32245
  classifyStockPriceBatch,
32111
32246
  classifyWeather,
@@ -32375,6 +32510,7 @@ function renderAnumaJsx(jsx3) {
32375
32510
  storeNotionReturnUrl,
32376
32511
  streamCancelPath,
32377
32512
  streamReplayPath,
32513
+ summarizeObservationTrends,
32378
32514
  supersedeVaultMemoryOp,
32379
32515
  synthesizeProfile,
32380
32516
  traverseGraphLane,
@@ -6193,6 +6193,10 @@ interface VaultSearchResult {
6193
6193
  * real timestamps. Omitted when an item lacks the field upstream. */
6194
6194
  createdAt?: Date;
6195
6195
  updatedAt?: Date;
6196
+ /** Times this fact has been re-observed — for C2 trend labels. */
6197
+ proofCount?: number | null;
6198
+ /** C3 re-observation watermark (Unix ms) — for C2 trends + C4 CE dates. */
6199
+ lastObservedAt?: number | null;
6196
6200
  /** W6 temporal-lane anchors carried through to downstream `RankedMemory`
6197
6201
  * so the recall executor can surface dates to the answer model without
6198
6202
  * a second per-fact DB lookup + decrypt. Unix ms; null when the fact
@@ -6234,6 +6238,55 @@ declare function searchVaultMemories(query: string, vaultCtx: VaultMemoryOperati
6234
6238
  */
6235
6239
  declare function createMemoryVaultSearchTool(vaultCtx: VaultMemoryOperationsContext, embeddingOptions: EmbeddingOptions, cache: VaultEmbeddingCache, searchOptions?: MemoryVaultSearchOptions): ToolConfig;
6236
6240
 
6241
+ /**
6242
+ * C2 — Observation trend labels.
6243
+ *
6244
+ * Algorithmic (no LLM) classification of how a vault fact's evidence has
6245
+ * been evolving, derived from the C3 re-observation watermark
6246
+ * (`lastObservedAt`), `proofCount`, and `createdAt` over 30/90-day windows.
6247
+ *
6248
+ * We do not store a full observation-timestamp series — only first-seen,
6249
+ * last-seen, and count — so density is approximated from that triple.
6250
+ * Good enough for profile signals ("interests trending up") and vault
6251
+ * hygiene badges; not a substitute for an observations tier (C5).
6252
+ */
6253
+ /** Recent window — observations inside this count as "active". */
6254
+ declare const TREND_RECENT_WINDOW_DAYS = 30;
6255
+ /** Beyond this since last observation → stale. */
6256
+ declare const TREND_STALE_WINDOW_DAYS = 90;
6257
+ /**
6258
+ * How a fact's evidence has been evolving.
6259
+ *
6260
+ * - `new` — first seen inside the recent window, few proofs yet.
6261
+ * - `strengthening` — established fact re-observed recently (rising density).
6262
+ * - `stable` — known for a while, still observed inside the stale window.
6263
+ * - `weakening` — quiet for ≥30 and <90 days after having been observed.
6264
+ * - `stale` — no observation in ≥90 days.
6265
+ */
6266
+ type ObservationTrend = "new" | "strengthening" | "stable" | "weakening" | "stale";
6267
+ interface ObservationTrendInput {
6268
+ createdAt: Date | number;
6269
+ /**
6270
+ * C3 re-observation watermark (Unix ms). When null/undefined, the fact
6271
+ * has never been merged-into since the column landed — treat `createdAt`
6272
+ * as last-seen.
6273
+ */
6274
+ lastObservedAt?: number | null;
6275
+ /** Times this fact has been retained/merged. Defaults to 1. */
6276
+ proofCount?: number | null;
6277
+ }
6278
+ /**
6279
+ * Classify a vault fact's observation trend from its evidence timestamps.
6280
+ *
6281
+ * Pure + deterministic. Pass `now` for back-dated eval harnesses.
6282
+ */
6283
+ declare function classifyObservationTrend(input: ObservationTrendInput, now?: number): ObservationTrend;
6284
+ /**
6285
+ * Summarize trend counts over a set of facts — handy for profile synthesis
6286
+ * ("N interests strengthening") without another LLM pass.
6287
+ */
6288
+ declare function summarizeObservationTrends(inputs: readonly ObservationTrendInput[], now?: number): Record<ObservationTrend, number>;
6289
+
6237
6290
  /**
6238
6291
  * Unified memory layer types — the Recall / Retain API.
6239
6292
  *
@@ -6283,6 +6336,16 @@ interface RankedMemory {
6283
6336
  proofCount?: number;
6284
6337
  source?: string;
6285
6338
  folderId?: string | null;
6339
+ /**
6340
+ * C3 re-observation watermark (Unix ms). Null/undefined when the fact
6341
+ * has never been merge-reinforced since the column landed.
6342
+ */
6343
+ lastObservedAt?: number | null;
6344
+ /**
6345
+ * C2 observation-trend label derived from createdAt / lastObservedAt /
6346
+ * proofCount over 30/90-day windows. Fact-only; omitted for chunks.
6347
+ */
6348
+ observationTrend?: ObservationTrend;
6286
6349
  /**
6287
6350
  * Anchored event-time for the fact (the date the underlying event
6288
6351
  * occurred, not the write time). When present, the recall executor
@@ -8379,6 +8442,12 @@ interface ProfileDoc {
8379
8442
  vaultWatermark: number;
8380
8443
  /** The config that produced this doc — see {@link ProfileConfigFingerprint}. */
8381
8444
  config: ProfileConfigFingerprint;
8445
+ /**
8446
+ * C2 — counts of observation-trend labels over live vault facts at
8447
+ * synthesis time. Lets People Nearby surface "interests trending up"
8448
+ * without another LLM pass. Recomputed every synthesis (not delta-cached).
8449
+ */
8450
+ observationTrends: Record<ObservationTrend, number>;
8382
8451
  /** Unix ms this doc was produced. */
8383
8452
  generatedAt: number;
8384
8453
  }
@@ -13866,4 +13935,4 @@ declare function renderAnumaTree(node: AnumaNode): React.ReactElement | null;
13866
13935
  */
13867
13936
  declare function renderAnumaJsx(jsx: string): React.ReactElement | null;
13868
13937
 
13869
- export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageChunk, type MessageFeedback, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PlatformStorage, type PortalLlmAuth, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, THEME_ATTRS, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, backfillMemoryEntityUserIdsOp, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createPlatformCursorStore, createProjectOp, createRecallTool, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, fileExists, findById, findMatchingTools, findParentOfId, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getEntitiesByMemoryIdsOp, getGithubAccessToken, getGoogleDriveStoredToken, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, preEmbedVaultMemories, preprocessFiles, previewToolSelection, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, readEncryptedFile, recall, reflect, refreshCalendarToken, refreshDriveToken, refreshGithubToken, refreshNotionToken, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, settingsStorageSchema, shouldChunkMessage, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, walk, webPlatformStorage, writeEncryptedFile };
13938
+ export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, type DeckProps, type DisplayToolMigrations, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, ENTITY_FANOUT, ENTITY_KINDS, type EmbeddedWalletSignerFn, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GraphTraversalOptions, type GroupProps, HARD_DELETE_WINDOW_MS, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, type IconProps, type ImageProps, type InjectionClassifierOptions, type InjectionReason, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageChunk, type MessageFeedback, type MessageSkeleton, type ModelLoadProgress, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type OCRFile, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PlatformStorage, type PortalLlmAuth, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSection, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type QuantizedEmbedding, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScreenProps, type ScreenResult, type ScreenedCandidate, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, THEME_ATTRS, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, archiveVaultMemoryOp, backfillMemoryEntityUserIdsOp, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createGitHubTools, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createPlatformCursorStore, createProjectOp, createRecallTool, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, fileExists, findById, findMatchingTools, findParentOfId, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getEntitiesByMemoryIdsOp, getGithubAccessToken, getGoogleDriveStoredToken, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteDecayedOp, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, injectionSignatureCatalog, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, preEmbedVaultMemories, preprocessFiles, previewToolSelection, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, readEncryptedFile, recall, reflect, refreshCalendarToken, refreshDriveToken, refreshGithubToken, refreshNotionToken, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, restoreVaultMemoryOp, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, settingsStorageSchema, shouldChunkMessage, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, walk, webPlatformStorage, writeEncryptedFile };