@anuma/sdk 6.8.2 → 6.10.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.
@@ -17225,13 +17225,13 @@ async function upsertEntitiesInWrite(ctx, entities) {
17225
17225
  }
17226
17226
  const unique = Array.from(kindByName.keys());
17227
17227
  const out = /* @__PURE__ */ new Map();
17228
- if (unique.length === 0) return { entities: out, operations: [] };
17228
+ if (unique.length === 0) return { entities: out, operations: [], kindBackfills: [] };
17229
17229
  const existing = await ctx.entityCollection.query(import_watermelondb16.Q.where("canonical_name", import_watermelondb16.Q.oneOf(unique))).fetch();
17230
17230
  const existingNames = new Set(existing.map((e) => e.canonicalName));
17231
- const updates = existing.filter((e) => {
17231
+ const kindBackfills = existing.filter((e) => {
17232
17232
  const incoming = kindByName.get(e.canonicalName);
17233
17233
  return incoming !== void 0 && (e.kind === null || e.kind === void 0 || e.kind === "");
17234
- });
17234
+ }).map((record) => ({ record, kind: kindByName.get(record.canonicalName) }));
17235
17235
  const missing = unique.filter((n) => !existingNames.has(n));
17236
17236
  const created = missing.map(
17237
17237
  (name) => ctx.entityCollection.prepareCreate((record) => {
@@ -17240,14 +17240,19 @@ async function upsertEntitiesInWrite(ctx, entities) {
17240
17240
  if (kind !== void 0) record._setRaw("kind", kind);
17241
17241
  })
17242
17242
  );
17243
- const updated = updates.map(
17244
- (e) => e.prepareUpdate((record) => {
17245
- record._setRaw("kind", kindByName.get(e.canonicalName));
17246
- })
17247
- );
17248
17243
  for (const e of existing) out.set(e.canonicalName, entityToStored(e));
17249
17244
  for (const record of created) out.set(record.canonicalName, entityToStored(record));
17250
- return { entities: out, operations: [...created, ...updated] };
17245
+ for (const { record, kind } of kindBackfills) {
17246
+ out.set(record.canonicalName, { ...entityToStored(record), kind });
17247
+ }
17248
+ return { entities: out, operations: created, kindBackfills };
17249
+ }
17250
+ function prepareKindBackfills(backfills) {
17251
+ return backfills.map(
17252
+ ({ record, kind }) => record.prepareUpdate((r) => {
17253
+ r._setRaw("kind", kind);
17254
+ })
17255
+ );
17251
17256
  }
17252
17257
  async function findVaultRowInWrite(ctx, memoryId) {
17253
17258
  try {
@@ -17297,10 +17302,12 @@ function topicsForEntities(entities, displayNames, source) {
17297
17302
  function toEntityObjects(entityInputs) {
17298
17303
  return entityInputs.map((e) => typeof e === "string" ? { name: e } : e);
17299
17304
  }
17300
- async function prepareMemoryTopicsUpdate(ctx, memoryId, linked, inputs, source) {
17305
+ async function resolveMemoryTopicsWrite(ctx, memoryId, linked, inputs, source) {
17301
17306
  const row = await findVaultRowInWrite(ctx, memoryId);
17302
- const write = resolveTopicsWrite(row, linked, displayNamesOf(toEntityObjects(inputs)), source);
17303
- return write === null ? null : prepareTopicsUpdate(write.row, write.topics, Date.now());
17307
+ return resolveTopicsWrite(row, linked, displayNamesOf(toEntityObjects(inputs)), source);
17308
+ }
17309
+ function prepareMemoryTopicsUpdate(write) {
17310
+ return prepareTopicsUpdate(write.row, write.topics, Date.now());
17304
17311
  }
17305
17312
  async function linkMemoryEntitiesOp(ctx, memoryId, entityInputs, options) {
17306
17313
  if (entityInputs.length === 0) return [];
@@ -17309,15 +17316,16 @@ async function linkMemoryEntitiesOp(ctx, memoryId, entityInputs, options) {
17309
17316
  let skipped = false;
17310
17317
  let entities = [];
17311
17318
  await ctx.database.write(async () => {
17312
- const { entities: byName, operations: entityOps } = await upsertEntitiesInWrite(
17313
- ctx,
17314
- normalized
17315
- );
17319
+ const {
17320
+ entities: byName,
17321
+ operations: entityOps,
17322
+ kindBackfills
17323
+ } = await upsertEntitiesInWrite(ctx, normalized);
17316
17324
  entities = Array.from(byName.values());
17317
17325
  const vaultRow = await findVaultRowInWrite(ctx, memoryId);
17318
17326
  if (options?.unlessTopicsUserManaged && autoLinkBlocked(vaultRow)) {
17319
- if (entityOps.length > 0) {
17320
- await ctx.database.batch(...entityOps);
17327
+ if (entityOps.length > 0 || kindBackfills.length > 0) {
17328
+ await ctx.database.batch(...entityOps, ...prepareKindBackfills(kindBackfills));
17321
17329
  }
17322
17330
  skipped = true;
17323
17331
  return;
@@ -17337,7 +17345,9 @@ async function linkMemoryEntitiesOp(ctx, memoryId, entityInputs, options) {
17337
17345
  displayNamesOf(normalized),
17338
17346
  options?.topicsSource ?? "auto"
17339
17347
  );
17340
- if (entityOps.length === 0 && toCreate.length === 0 && topicsWrite === null) return;
17348
+ if (entityOps.length === 0 && kindBackfills.length === 0 && toCreate.length === 0 && topicsWrite === null) {
17349
+ return;
17350
+ }
17341
17351
  const linkOps = toCreate.map(
17342
17352
  (e) => ctx.memoryEntityCollection.prepareCreate((record) => {
17343
17353
  record._setRaw("memory_id", memoryId);
@@ -17347,6 +17357,7 @@ async function linkMemoryEntitiesOp(ctx, memoryId, entityInputs, options) {
17347
17357
  );
17348
17358
  await ctx.database.batch(
17349
17359
  ...entityOps,
17360
+ ...prepareKindBackfills(kindBackfills),
17350
17361
  ...linkOps,
17351
17362
  ...topicsWrite ? [prepareTopicsUpdate(topicsWrite.row, topicsWrite.topics, Date.now())] : []
17352
17363
  );
@@ -17384,10 +17395,11 @@ async function replaceMemoryEntities(ctx, memoryId, entityInputs, options) {
17384
17395
  skipped = true;
17385
17396
  return;
17386
17397
  }
17387
- const { entities: byName, operations: entityOps } = await upsertEntitiesInWrite(
17388
- ctx,
17389
- normalized
17390
- );
17398
+ const {
17399
+ entities: byName,
17400
+ operations: entityOps,
17401
+ kindBackfills
17402
+ } = await upsertEntitiesInWrite(ctx, normalized);
17391
17403
  entities = Array.from(byName.values());
17392
17404
  const existingLinks = await ctx.memoryEntityCollection.query(import_watermelondb16.Q.where("memory_id", memoryId)).fetch();
17393
17405
  const keep = new Set(entities.map((e) => e.uniqueId));
@@ -17400,12 +17412,13 @@ async function replaceMemoryEntities(ctx, memoryId, entityInputs, options) {
17400
17412
  displayNamesOf(normalized),
17401
17413
  options.topicsSource
17402
17414
  );
17403
- if (entityOps.length === 0 && toCreate.length === 0 && toDestroy.length === 0 && topicsWrite === null) {
17415
+ if (entityOps.length === 0 && kindBackfills.length === 0 && toCreate.length === 0 && toDestroy.length === 0 && topicsWrite === null) {
17404
17416
  return;
17405
17417
  }
17406
17418
  const orphans = await findOrphanedEntities(ctx, memoryId, toDestroy);
17407
17419
  await ctx.database.batch(
17408
17420
  ...entityOps,
17421
+ ...prepareKindBackfills(kindBackfills),
17409
17422
  ...toCreate.map(
17410
17423
  (e) => ctx.memoryEntityCollection.prepareCreate((record) => {
17411
17424
  record._setRaw("memory_id", memoryId);
@@ -18471,27 +18484,36 @@ async function backfillMemoryTopicsOp(ctx, memoryIds) {
18471
18484
  if (!entityCtx) {
18472
18485
  throw new Error("backfillMemoryTopicsOp requires ctx.entityCtx");
18473
18486
  }
18487
+ const uniqueIds = Array.from(new Set(memoryIds));
18488
+ if (uniqueIds.length === 0) return [];
18474
18489
  const filled = [];
18475
- for (const id of Array.from(new Set(memoryIds))) {
18476
- let record;
18477
- try {
18478
- record = await ctx.vaultMemoryCollection.find(id);
18479
- } catch {
18480
- continue;
18481
- }
18482
- if (record.isDeleted || !isOwnedByCtxUser(ctx, record)) continue;
18483
- if (parseTopics(record.topics) !== null) continue;
18484
- const links = await entityCtx.memoryEntityCollection.query(import_watermelondb17.Q.where("memory_id", id)).unsafeFetchRaw();
18485
- const entityIds = links.map((l) => String(l.entity_id));
18486
- if (entityIds.length === 0) continue;
18487
- const entities = await entityCtx.entityCollection.query(import_watermelondb17.Q.where("id", import_watermelondb17.Q.oneOf(entityIds))).fetch();
18488
- if (entities.length === 0) continue;
18489
- const source = record.topicsUserManaged ? "user" : "auto";
18490
+ const CHUNK = 500;
18491
+ for (let i = 0; i < uniqueIds.length; i += CHUNK) {
18492
+ const chunkIds = uniqueIds.slice(i, i + CHUNK);
18490
18493
  await ctx.database.write(async () => {
18491
- const topicsOp = await prepareMemoryTopicsUpdate(entityCtx, id, entities, [], source);
18492
- if (!topicsOp) return;
18493
- await ctx.database.batch(topicsOp);
18494
- filled.push(id);
18494
+ const writes = [];
18495
+ for (const id of chunkIds) {
18496
+ let record;
18497
+ try {
18498
+ record = await ctx.vaultMemoryCollection.find(id);
18499
+ } catch {
18500
+ continue;
18501
+ }
18502
+ if (record.isDeleted || !isOwnedByCtxUser(ctx, record)) continue;
18503
+ if (parseTopics(record.topics) !== null) continue;
18504
+ const links = await entityCtx.memoryEntityCollection.query(import_watermelondb17.Q.where("memory_id", id)).unsafeFetchRaw();
18505
+ const entityIds = links.map((l) => String(l.entity_id));
18506
+ if (entityIds.length === 0) continue;
18507
+ const entities = await entityCtx.entityCollection.query(import_watermelondb17.Q.where("id", import_watermelondb17.Q.oneOf(entityIds))).fetch();
18508
+ if (entities.length === 0) continue;
18509
+ const source = record.topicsUserManaged ? "user" : "auto";
18510
+ const write = await resolveMemoryTopicsWrite(entityCtx, id, entities, [], source);
18511
+ if (write) writes.push(write);
18512
+ }
18513
+ if (writes.length === 0) return;
18514
+ const prepared = writes.map(prepareMemoryTopicsUpdate);
18515
+ await ctx.database.batch(...prepared);
18516
+ for (const write of writes) filled.push(write.row.id);
18495
18517
  });
18496
18518
  }
18497
18519
  return filled;
@@ -24313,6 +24335,7 @@ __export(index_exports, {
24313
24335
  hasKeyPair: () => hasKeyPair,
24314
24336
  ingestPublishedPhotoMemoriesOp: () => ingestPublishedPhotoMemoriesOp,
24315
24337
  injectionSignatureCatalog: () => injectionSignatureCatalog,
24338
+ isDegradedTopicSkip: () => isDegradedTopicSkip,
24316
24339
  isRerankerAvailable: () => isRerankerAvailable,
24317
24340
  isSupportedFile: () => isSupportedFile,
24318
24341
  isSupportedMediaType: () => isSupportedMediaType,
@@ -30011,7 +30034,7 @@ function createAutoExtractor(options) {
30011
30034
  const t0 = Date.now();
30012
30035
  void (async () => {
30013
30036
  try {
30014
- const { candidates, results, failedCount, outcome } = await extractAndRetain(
30037
+ const { candidates, results, failedCount, outcome, failure } = await extractAndRetain(
30015
30038
  window2,
30016
30039
  retainCtx,
30017
30040
  {
@@ -30051,7 +30074,11 @@ function createAutoExtractor(options) {
30051
30074
  failedCount,
30052
30075
  durationMs: Date.now() - t0,
30053
30076
  conversationId,
30054
- outcome
30077
+ outcome,
30078
+ // Only set alongside `outcome: "empty-after-retry"`. Spread so the key
30079
+ // is absent rather than explicitly undefined on a healthy turn —
30080
+ // analytics backends store an explicit undefined as a real value.
30081
+ ...failure !== void 0 && { failure }
30055
30082
  });
30056
30083
  } catch (err) {
30057
30084
  options.onError?.(err instanceof Error ? err : new Error(String(err)), conversationId);
@@ -31353,6 +31380,18 @@ function parseTopicResponse(parsed, validIds) {
31353
31380
  }
31354
31381
  return out;
31355
31382
  }
31383
+ var DEGRADED_TOPIC_SKIP = {
31384
+ excluded: false,
31385
+ "link-declined": false,
31386
+ "stamp-declined": false,
31387
+ "llm-unanswered": true,
31388
+ unreadable: true,
31389
+ "not-found": true,
31390
+ "link-failed": true
31391
+ };
31392
+ function isDegradedTopicSkip(reason) {
31393
+ return DEGRADED_TOPIC_SKIP[reason] === true;
31394
+ }
31356
31395
  async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
31357
31396
  const entityCtx = ctx.entityCtx;
31358
31397
  if (!entityCtx) {
@@ -31361,17 +31400,24 @@ async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
31361
31400
  const log = getLogger();
31362
31401
  const extractedAt = options.now ?? Date.now();
31363
31402
  const skippedIds = [];
31403
+ const skippedReasons = /* @__PURE__ */ new Map();
31404
+ const skip = (id, reason) => {
31405
+ if (skippedReasons.has(id)) return;
31406
+ skippedIds.push(id);
31407
+ skippedReasons.set(id, reason);
31408
+ };
31364
31409
  const inputs = [];
31365
- for (const id of memoryIds) {
31410
+ for (const id of new Set(memoryIds)) {
31366
31411
  let record;
31367
31412
  try {
31368
31413
  record = await ctx.vaultMemoryCollection.find(id);
31369
- } catch {
31370
- skippedIds.push(id);
31414
+ } catch (err) {
31415
+ log.warn("[memory/topics] vault lookup failed for extraction", err);
31416
+ skip(id, "not-found");
31371
31417
  continue;
31372
31418
  }
31373
31419
  if (record.isDeleted || ctx.userId !== void 0 && record.userId !== ctx.userId || record.topicsUserManaged) {
31374
- skippedIds.push(id);
31420
+ skip(id, "excluded");
31375
31421
  continue;
31376
31422
  }
31377
31423
  try {
@@ -31384,7 +31430,7 @@ async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
31384
31430
  inputs.push({ id, content: stored.content });
31385
31431
  } catch (err) {
31386
31432
  log.warn("[memory/topics] failed to load memory for extraction", err);
31387
- skippedIds.push(id);
31433
+ skip(id, "unreadable");
31388
31434
  }
31389
31435
  }
31390
31436
  const entitiesByMemory = await extractEntitiesForMemories(inputs, options);
@@ -31392,19 +31438,19 @@ async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
31392
31438
  for (const input of inputs) {
31393
31439
  const entities = entitiesByMemory.get(input.id);
31394
31440
  if (entities === void 0) {
31395
- skippedIds.push(input.id);
31441
+ skip(input.id, "llm-unanswered");
31396
31442
  continue;
31397
31443
  }
31398
31444
  try {
31399
31445
  const linked = await replaceMemoryEntitiesGuardedOp(entityCtx, input.id, entities);
31400
31446
  if (linked === null) {
31401
- skippedIds.push(input.id);
31447
+ skip(input.id, "link-declined");
31402
31448
  entitiesByMemory.delete(input.id);
31403
31449
  continue;
31404
31450
  }
31405
31451
  } catch (err) {
31406
31452
  log.warn("[memory/topics] replaceMemoryEntitiesGuardedOp failed", err);
31407
- skippedIds.push(input.id);
31453
+ skip(input.id, "link-failed");
31408
31454
  entitiesByMemory.delete(input.id);
31409
31455
  continue;
31410
31456
  }
@@ -31414,11 +31460,11 @@ async function extractAndLinkEntitiesForMemoriesOp(ctx, memoryIds, options) {
31414
31460
  const stampedSet = new Set(stampedIds);
31415
31461
  for (const id of toStamp) {
31416
31462
  if (!stampedSet.has(id)) {
31417
- skippedIds.push(id);
31463
+ skip(id, "stamp-declined");
31418
31464
  entitiesByMemory.delete(id);
31419
31465
  }
31420
31466
  }
31421
- return { entitiesByMemory, stampedIds, skippedIds };
31467
+ return { entitiesByMemory, stampedIds, skippedIds, skippedReasons };
31422
31468
  }
31423
31469
 
31424
31470
  // src/lib/memory/verifySupport.ts
@@ -37486,6 +37532,7 @@ function buildSystemPrompt(ctx, options) {
37486
37532
  hasKeyPair,
37487
37533
  ingestPublishedPhotoMemoriesOp,
37488
37534
  injectionSignatureCatalog,
37535
+ isDegradedTopicSkip,
37489
37536
  isRerankerAvailable,
37490
37537
  isSupportedFile,
37491
37538
  isSupportedMediaType,
@@ -6615,6 +6615,14 @@ declare function relinkMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryI
6615
6615
  * row has: a curated memory's topics are recorded as `user`, everything else as
6616
6616
  * `auto`. Skips deleted, foreign-user, unlinked rows, and rows that already have
6617
6617
  * a record. Returns the ids filled.
6618
+ *
6619
+ * Runs as ONE writer over the whole (caller-bounded) list, in two phases:
6620
+ * resolve every row's write — all the awaits — and only then prepare and batch,
6621
+ * synchronously. Resolving and preparing per row inside its own writer is what
6622
+ * fired WatermelonDB's "wasn't sent to batch() synchronously" diagnostic once
6623
+ * per memory (~107 on a single dev launch, sdk#891); it also cost N writes.
6624
+ * Same treatment as {@link stampTopicsExtractedAtOp}, including its
6625
+ * transpilation hazard — the prepare pass MUST stay a `.map()`.
6618
6626
  */
6619
6627
  declare function backfillMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[]): Promise<string[]>;
6620
6628
  declare function deleteAllVaultMemoriesForUserOp(ctx: VaultMemoryOperationsContext, userId: string): Promise<number>;
@@ -7807,6 +7815,22 @@ interface TurnCompleteEvent {
7807
7815
  * previously indistinguishable (both surfaced as zero candidates).
7808
7816
  */
7809
7817
  outcome: ExtractOutcome;
7818
+ /**
7819
+ * Present only alongside `outcome: "empty-after-retry"` — WHICH failure ended
7820
+ * the turn (#888).
7821
+ *
7822
+ * `outcome` says extraction gave up; this says why, from a stable enum. The
7823
+ * distinction is the whole point: a 2026-08-11 audit measured ~63% of
7824
+ * production extraction turns ending in `empty-after-retry` and could not tell
7825
+ * from telemetry whether the cause was the freeloader 403 everyone assumed or
7826
+ * something else. It took a Prometheus cross-check to find the real one — the
7827
+ * portal returning HTTP 200 with an empty body, which it counts as a success.
7828
+ *
7829
+ * Forward `failure.reason` into your extraction analytics event; all three
7830
+ * fields are bounded (an enum, an HTTP status, a small attempt count) and none
7831
+ * carries content.
7832
+ */
7833
+ failure?: PortalLlmFailure;
7810
7834
  }
7811
7835
  /** @public */
7812
7836
  /**
@@ -9072,6 +9096,39 @@ interface TopicExtractOptions extends PortalLlmAuth {
9072
9096
  * later sweep, never stamp them.
9073
9097
  */
9074
9098
  declare function extractEntitiesForMemories(memories: readonly TopicExtractionInput[], options: TopicExtractOptions): Promise<Map<string, ExtractedEntity[]>>;
9099
+ /**
9100
+ * Why one memory was skipped by a topic sweep.
9101
+ *
9102
+ * Split along the line that actually matters operationally — did the sweep
9103
+ * DECLINE this row on purpose, or did something BREAK:
9104
+ *
9105
+ * Deliberate (healthy; a sweep of nothing but these is a success):
9106
+ * - `excluded` — deleted, owned by another user, or `topicsUserManaged`.
9107
+ * - `link-declined` — the entity-link write's in-row guard declined (the row
9108
+ * became user-managed / deleted / absent mid-run).
9109
+ * - `stamp-declined` — same, caught by the stamp op's own re-check.
9110
+ *
9111
+ * Degraded (something is wrong; see {@link isDegradedTopicSkip}):
9112
+ * - `llm-unanswered` — the batch failed or the model omitted this id. THE one
9113
+ * to alarm on: it is how a wholly broken sweep looks.
9114
+ * - `unreadable` — the row could not be loaded/decrypted.
9115
+ * - `not-found` — the lookup threw (absent row or read fault).
9116
+ * - `link-failed` — the entity-link write threw.
9117
+ *
9118
+ * @public
9119
+ */
9120
+ type TopicSkipReason = "excluded" | "link-declined" | "stamp-declined" | "llm-unanswered" | "unreadable" | "not-found" | "link-failed";
9121
+ /**
9122
+ * Whether a skip reason means the sweep FAILED on that row, rather than
9123
+ * deliberately passing over it.
9124
+ *
9125
+ * Exported so callers classify identically instead of each re-deriving the
9126
+ * split — the reason this type exists is that one wrong grouping turns a broken
9127
+ * sweep back into a healthy-looking one.
9128
+ *
9129
+ * @public
9130
+ */
9131
+ declare function isDegradedTopicSkip(reason: TopicSkipReason): boolean;
9075
9132
  /** Outcome of one {@link extractAndLinkEntitiesForMemoriesOp} run. */
9076
9133
  interface TopicExtractionRunResult {
9077
9134
  /** memoryId → entities the LLM returned (post-validation, post-linking). */
@@ -9084,6 +9141,24 @@ interface TopicExtractionRunResult {
9084
9141
  * LLM batches. Skipped ids are not stamped, so failed batches are retried
9085
9142
  * by a later sweep — callers should apply their own attempt caps. */
9086
9143
  skippedIds: string[];
9144
+ /**
9145
+ * Why each id in {@link skippedIds} was skipped.
9146
+ *
9147
+ * `skippedIds` alone cannot distinguish a sweep that deliberately declined
9148
+ * work from one that FAILED: a run where every LLM batch errored and a run
9149
+ * over rows the user has taken manual control of produce an identical array.
9150
+ * That is the same blindness `outcome: 'empty-after-retry'` had before #888 —
9151
+ * a degradation wearing the shape of normal control flow.
9152
+ *
9153
+ * It matters here because topics feed the entity recall lane, so a silently
9154
+ * failing sweep means memories that exist but cannot be found by entity, with
9155
+ * nothing in production saying so.
9156
+ *
9157
+ * Populated in lockstep with `skippedIds` (single `skip()` helper), so the two
9158
+ * cannot drift. Group by {@link isDegradedTopicSkip} to separate "declined" from
9159
+ * "broke".
9160
+ */
9161
+ skippedReasons: Map<string, TopicSkipReason>;
9087
9162
  }
9088
9163
  /**
9089
9164
  * Run LLM topic extraction over existing vault memories and persist the
@@ -10396,4 +10471,4 @@ declare function sanitizeQuotes(s: string): string;
10396
10471
  declare function renderTemplate(value: string | null | undefined, template: string): string | null;
10397
10472
  declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
10398
10473
 
10399
- export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, 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, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
10474
+ export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, 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, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
@@ -6615,6 +6615,14 @@ declare function relinkMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryI
6615
6615
  * row has: a curated memory's topics are recorded as `user`, everything else as
6616
6616
  * `auto`. Skips deleted, foreign-user, unlinked rows, and rows that already have
6617
6617
  * a record. Returns the ids filled.
6618
+ *
6619
+ * Runs as ONE writer over the whole (caller-bounded) list, in two phases:
6620
+ * resolve every row's write — all the awaits — and only then prepare and batch,
6621
+ * synchronously. Resolving and preparing per row inside its own writer is what
6622
+ * fired WatermelonDB's "wasn't sent to batch() synchronously" diagnostic once
6623
+ * per memory (~107 on a single dev launch, sdk#891); it also cost N writes.
6624
+ * Same treatment as {@link stampTopicsExtractedAtOp}, including its
6625
+ * transpilation hazard — the prepare pass MUST stay a `.map()`.
6618
6626
  */
6619
6627
  declare function backfillMemoryTopicsOp(ctx: VaultMemoryOperationsContext, memoryIds: readonly string[]): Promise<string[]>;
6620
6628
  declare function deleteAllVaultMemoriesForUserOp(ctx: VaultMemoryOperationsContext, userId: string): Promise<number>;
@@ -7807,6 +7815,22 @@ interface TurnCompleteEvent {
7807
7815
  * previously indistinguishable (both surfaced as zero candidates).
7808
7816
  */
7809
7817
  outcome: ExtractOutcome;
7818
+ /**
7819
+ * Present only alongside `outcome: "empty-after-retry"` — WHICH failure ended
7820
+ * the turn (#888).
7821
+ *
7822
+ * `outcome` says extraction gave up; this says why, from a stable enum. The
7823
+ * distinction is the whole point: a 2026-08-11 audit measured ~63% of
7824
+ * production extraction turns ending in `empty-after-retry` and could not tell
7825
+ * from telemetry whether the cause was the freeloader 403 everyone assumed or
7826
+ * something else. It took a Prometheus cross-check to find the real one — the
7827
+ * portal returning HTTP 200 with an empty body, which it counts as a success.
7828
+ *
7829
+ * Forward `failure.reason` into your extraction analytics event; all three
7830
+ * fields are bounded (an enum, an HTTP status, a small attempt count) and none
7831
+ * carries content.
7832
+ */
7833
+ failure?: PortalLlmFailure;
7810
7834
  }
7811
7835
  /** @public */
7812
7836
  /**
@@ -9072,6 +9096,39 @@ interface TopicExtractOptions extends PortalLlmAuth {
9072
9096
  * later sweep, never stamp them.
9073
9097
  */
9074
9098
  declare function extractEntitiesForMemories(memories: readonly TopicExtractionInput[], options: TopicExtractOptions): Promise<Map<string, ExtractedEntity[]>>;
9099
+ /**
9100
+ * Why one memory was skipped by a topic sweep.
9101
+ *
9102
+ * Split along the line that actually matters operationally — did the sweep
9103
+ * DECLINE this row on purpose, or did something BREAK:
9104
+ *
9105
+ * Deliberate (healthy; a sweep of nothing but these is a success):
9106
+ * - `excluded` — deleted, owned by another user, or `topicsUserManaged`.
9107
+ * - `link-declined` — the entity-link write's in-row guard declined (the row
9108
+ * became user-managed / deleted / absent mid-run).
9109
+ * - `stamp-declined` — same, caught by the stamp op's own re-check.
9110
+ *
9111
+ * Degraded (something is wrong; see {@link isDegradedTopicSkip}):
9112
+ * - `llm-unanswered` — the batch failed or the model omitted this id. THE one
9113
+ * to alarm on: it is how a wholly broken sweep looks.
9114
+ * - `unreadable` — the row could not be loaded/decrypted.
9115
+ * - `not-found` — the lookup threw (absent row or read fault).
9116
+ * - `link-failed` — the entity-link write threw.
9117
+ *
9118
+ * @public
9119
+ */
9120
+ type TopicSkipReason = "excluded" | "link-declined" | "stamp-declined" | "llm-unanswered" | "unreadable" | "not-found" | "link-failed";
9121
+ /**
9122
+ * Whether a skip reason means the sweep FAILED on that row, rather than
9123
+ * deliberately passing over it.
9124
+ *
9125
+ * Exported so callers classify identically instead of each re-deriving the
9126
+ * split — the reason this type exists is that one wrong grouping turns a broken
9127
+ * sweep back into a healthy-looking one.
9128
+ *
9129
+ * @public
9130
+ */
9131
+ declare function isDegradedTopicSkip(reason: TopicSkipReason): boolean;
9075
9132
  /** Outcome of one {@link extractAndLinkEntitiesForMemoriesOp} run. */
9076
9133
  interface TopicExtractionRunResult {
9077
9134
  /** memoryId → entities the LLM returned (post-validation, post-linking). */
@@ -9084,6 +9141,24 @@ interface TopicExtractionRunResult {
9084
9141
  * LLM batches. Skipped ids are not stamped, so failed batches are retried
9085
9142
  * by a later sweep — callers should apply their own attempt caps. */
9086
9143
  skippedIds: string[];
9144
+ /**
9145
+ * Why each id in {@link skippedIds} was skipped.
9146
+ *
9147
+ * `skippedIds` alone cannot distinguish a sweep that deliberately declined
9148
+ * work from one that FAILED: a run where every LLM batch errored and a run
9149
+ * over rows the user has taken manual control of produce an identical array.
9150
+ * That is the same blindness `outcome: 'empty-after-retry'` had before #888 —
9151
+ * a degradation wearing the shape of normal control flow.
9152
+ *
9153
+ * It matters here because topics feed the entity recall lane, so a silently
9154
+ * failing sweep means memories that exist but cannot be found by entity, with
9155
+ * nothing in production saying so.
9156
+ *
9157
+ * Populated in lockstep with `skippedIds` (single `skip()` helper), so the two
9158
+ * cannot drift. Group by {@link isDegradedTopicSkip} to separate "declined" from
9159
+ * "broke".
9160
+ */
9161
+ skippedReasons: Map<string, TopicSkipReason>;
9087
9162
  }
9088
9163
  /**
9089
9164
  * Run LLM topic extraction over existing vault memories and persist the
@@ -10396,4 +10471,4 @@ declare function sanitizeQuotes(s: string): string;
10396
10471
  declare function renderTemplate(value: string | null | undefined, template: string): string | null;
10397
10472
  declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
10398
10473
 
10399
- export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, 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, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
10474
+ export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, 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, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type PublishedPhotoMemory, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };