@anuma/sdk 6.19.1 → 6.20.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.
@@ -823,6 +823,7 @@ var client = createClient(createClientConfig(createConfig()));
823
823
  var getWellKnownJwksJson = (options) => (options?.client ?? client).get({ url: "/.well-known/jwks.json", ...options });
824
824
  var getAdminReferralGrantsStats = (options) => (options?.client ?? client).get({ url: "/admin/referral-grants/stats", ...options });
825
825
  var deleteApiV1Account = (options) => (options?.client ?? client).delete({ url: "/api/v1/account", ...options });
826
+ var postApiV1AccountVerifyChallenge = (options) => (options?.client ?? client).post({ url: "/api/v1/account/verify-challenge", ...options });
826
827
  var postApiV1AdminAddCredits = (options) => (options.client ?? client).post({
827
828
  url: "/api/v1/admin/add-credits",
828
829
  ...options,
@@ -906,6 +907,34 @@ var putApiV1AdminConnectorsByProvider = (options) => (options.client ?? client).
906
907
  ...options.headers
907
908
  }
908
909
  });
910
+ var getApiV1AdminModerationCsam = (options) => (options.client ?? client).get({ url: "/api/v1/admin/moderation/csam", ...options });
911
+ var getApiV1AdminModerationCsamByIdHistory = (options) => (options.client ?? client).get({ url: "/api/v1/admin/moderation/csam/{id}/history", ...options });
912
+ var putApiV1AdminModerationCsamByIdReview = (options) => (options.client ?? client).put({
913
+ url: "/api/v1/admin/moderation/csam/{id}/review",
914
+ ...options,
915
+ headers: {
916
+ "Content-Type": "application/json",
917
+ ...options.headers
918
+ }
919
+ });
920
+ var getApiV1AdminNearbyAccessCodes = (options) => (options.client ?? client).get({ url: "/api/v1/admin/nearby/access-codes", ...options });
921
+ var postApiV1AdminNearbyAccessCodes = (options) => (options.client ?? client).post({
922
+ url: "/api/v1/admin/nearby/access-codes",
923
+ ...options,
924
+ headers: {
925
+ "Content-Type": "application/json",
926
+ ...options.headers
927
+ }
928
+ });
929
+ var postApiV1AdminNearbyAccessCodesRevoke = (options) => (options.client ?? client).post({
930
+ url: "/api/v1/admin/nearby/access-codes/revoke",
931
+ ...options,
932
+ headers: {
933
+ "Content-Type": "application/json",
934
+ ...options.headers
935
+ }
936
+ });
937
+ var getApiV1AdminNearbyMeetupsById = (options) => (options.client ?? client).get({ url: "/api/v1/admin/nearby/meetups/{id}", ...options });
909
938
  var postApiV1AdminNotificationsAnnounceModel = (options) => (options.client ?? client).post({
910
939
  url: "/api/v1/admin/notifications/announce-model",
911
940
  ...options,
@@ -1017,6 +1046,14 @@ var postApiV1AdminUsersInternalTester = (options) => (options.client ?? client).
1017
1046
  }
1018
1047
  });
1019
1048
  var getApiV1AdminUsersLookup = (options) => (options.client ?? client).get({ url: "/api/v1/admin/users/lookup", ...options });
1049
+ var postApiV1AdminUsersNearbyBeta = (options) => (options.client ?? client).post({
1050
+ url: "/api/v1/admin/users/nearby-beta",
1051
+ ...options,
1052
+ headers: {
1053
+ "Content-Type": "application/json",
1054
+ ...options.headers
1055
+ }
1056
+ });
1020
1057
  var postApiV1AdminUsersSuspend = (options) => (options.client ?? client).post({
1021
1058
  url: "/api/v1/admin/users/suspend",
1022
1059
  ...options,
@@ -1261,14 +1298,6 @@ var postApiV1GuestChatCompletions = (options) => (options.client ?? client).post
1261
1298
  var getApiV1Me = (options) => (options?.client ?? client).get({ url: "/api/v1/me", ...options });
1262
1299
  var getApiV1MediaSharedBySlug = (options) => (options.client ?? client).get({ url: "/api/v1/media/shared/{slug}", ...options });
1263
1300
  var getApiV1Models = (options) => (options?.client ?? client).get({ url: "/api/v1/models", ...options });
1264
- var postApiV1Moderate = (options) => (options.client ?? client).post({
1265
- url: "/api/v1/moderate",
1266
- ...options,
1267
- headers: {
1268
- "Content-Type": "application/json",
1269
- ...options.headers
1270
- }
1271
- });
1272
1301
  var postApiV1NotificationsDevices = (options) => (options.client ?? client).post({
1273
1302
  url: "/api/v1/notifications/devices",
1274
1303
  ...options,
@@ -1525,6 +1554,14 @@ var postInternalComplete = (options) => (options.client ?? client).post({
1525
1554
  ...options.headers
1526
1555
  }
1527
1556
  });
1557
+ var postInternalDmRequests = (options) => (options.client ?? client).post({
1558
+ url: "/internal/dm/requests",
1559
+ ...options,
1560
+ headers: {
1561
+ "Content-Type": "application/json",
1562
+ ...options.headers
1563
+ }
1564
+ });
1528
1565
  var postInternalEmbeddings = (options) => (options.client ?? client).post({
1529
1566
  url: "/internal/embeddings",
1530
1567
  ...options,
@@ -1541,8 +1578,8 @@ var postInternalExtractPhotoFacts = (options) => (options.client ?? client).post
1541
1578
  ...options.headers
1542
1579
  }
1543
1580
  });
1544
- var postInternalModerate = (options) => (options.client ?? client).post({
1545
- url: "/internal/moderate",
1581
+ var postInternalMeetupsJoins = (options) => (options.client ?? client).post({
1582
+ url: "/internal/meetups/joins",
1546
1583
  ...options,
1547
1584
  headers: {
1548
1585
  "Content-Type": "application/json",
@@ -1565,6 +1602,15 @@ var postInternalPrefineryClaimTokens = (options) => (options.client ?? client).p
1565
1602
  ...options.headers
1566
1603
  }
1567
1604
  });
1605
+ var getNearbyAccess = (options) => (options?.client ?? client).get({ url: "/nearby/access", ...options });
1606
+ var postNearbyAccessCode = (options) => (options.client ?? client).post({
1607
+ url: "/nearby/access-code",
1608
+ ...options,
1609
+ headers: {
1610
+ "Content-Type": "application/json",
1611
+ ...options.headers
1612
+ }
1613
+ });
1568
1614
  var postNearbyWaitlist = (options) => (options.client ?? client).post({
1569
1615
  url: "/nearby/waitlist",
1570
1616
  ...options,
@@ -1620,6 +1666,7 @@ var postReferralInvite = (options) => (options.client ?? client).post({
1620
1666
  }
1621
1667
  });
1622
1668
  var getReferralMe = (options) => (options?.client ?? client).get({ url: "/referral/me", ...options });
1669
+ var getReferralRewards = (options) => (options?.client ?? client).get({ url: "/referral/rewards", ...options });
1623
1670
  var postWebhooksPrefinery = (options) => (options?.client ?? client).post({
1624
1671
  url: "/webhooks/prefinery",
1625
1672
  ...options,
@@ -1654,6 +1701,10 @@ export {
1654
1701
  getApiV1AdminAppsById,
1655
1702
  getApiV1AdminBotStatus,
1656
1703
  getApiV1AdminConnectors,
1704
+ getApiV1AdminModerationCsam,
1705
+ getApiV1AdminModerationCsamByIdHistory,
1706
+ getApiV1AdminNearbyAccessCodes,
1707
+ getApiV1AdminNearbyMeetupsById,
1657
1708
  getApiV1AdminNotificationsCampaigns,
1658
1709
  getApiV1AdminNotificationsCampaignsByCampaignId,
1659
1710
  getApiV1AdminOauthClients,
@@ -1710,21 +1761,26 @@ export {
1710
1761
  getConnectorsByProviderConnect,
1711
1762
  getHealth,
1712
1763
  getInternalAccountsByDidByDid,
1764
+ getNearbyAccess,
1713
1765
  getOauthAuthorize,
1714
1766
  getOauthConsent,
1715
1767
  getReferralMe,
1768
+ getReferralRewards,
1716
1769
  getWellKnownJwksJson,
1717
1770
  patchApiV1AdminNotificationsCampaignsByCampaignId,
1718
1771
  patchApiV1AdminOauthClientsByClientId,
1719
1772
  patchApiV1DeveloperAppsByAppUuid,
1720
1773
  patchApiV1DeveloperAppsByAppUuidUsersByAddress,
1721
1774
  patchApiV1UserOauthGrantsById,
1775
+ postApiV1AccountVerifyChallenge,
1722
1776
  postApiV1AdminAddCredits,
1723
1777
  postApiV1AdminAgents,
1724
1778
  postApiV1AdminApps,
1725
1779
  postApiV1AdminAppsByAppIdApiKeys,
1726
1780
  postApiV1AdminBotPollerStart,
1727
1781
  postApiV1AdminBotPollerStop,
1782
+ postApiV1AdminNearbyAccessCodes,
1783
+ postApiV1AdminNearbyAccessCodesRevoke,
1728
1784
  postApiV1AdminNotificationsAnnounceModel,
1729
1785
  postApiV1AdminNotificationsCampaigns,
1730
1786
  postApiV1AdminNotificationsCampaignsByCampaignIdCancel,
@@ -1737,6 +1793,7 @@ export {
1737
1793
  postApiV1AdminSeedApps,
1738
1794
  postApiV1AdminSubscriptionTier,
1739
1795
  postApiV1AdminUsersInternalTester,
1796
+ postApiV1AdminUsersNearbyBeta,
1740
1797
  postApiV1AdminUsersSuspend,
1741
1798
  postApiV1AdminUsersUnsuspend,
1742
1799
  postApiV1AuthMfaDisable,
@@ -1764,7 +1821,6 @@ export {
1764
1821
  postApiV1DeveloperAppsByAppUuidUsersByAddressTopUp,
1765
1822
  postApiV1Embeddings,
1766
1823
  postApiV1GuestChatCompletions,
1767
- postApiV1Moderate,
1768
1824
  postApiV1NotificationsDevices,
1769
1825
  postApiV1NotificationsDevicesUnregister,
1770
1826
  postApiV1PhoneCalls,
@@ -1795,11 +1851,13 @@ export {
1795
1851
  postAuthOauthByProviderRevoke,
1796
1852
  postInternalAccountsByPhoneHashes,
1797
1853
  postInternalComplete,
1854
+ postInternalDmRequests,
1798
1855
  postInternalEmbeddings,
1799
1856
  postInternalExtractPhotoFacts,
1800
- postInternalModerate,
1857
+ postInternalMeetupsJoins,
1801
1858
  postInternalNearbyActivations,
1802
1859
  postInternalPrefineryClaimTokens,
1860
+ postNearbyAccessCode,
1803
1861
  postNearbyWaitlist,
1804
1862
  postOauthConsent,
1805
1863
  postOauthRevoke,
@@ -1813,6 +1871,7 @@ export {
1813
1871
  putApiV1AdminAppsById,
1814
1872
  putApiV1AdminBotConfig,
1815
1873
  putApiV1AdminConnectorsByProvider,
1874
+ putApiV1AdminModerationCsamByIdReview,
1816
1875
  putApiV1AdminPersonasById,
1817
1876
  putApiV1AgentsByIdPreference,
1818
1877
  putApiV1ConnectorsByProviderScopes,
@@ -6912,7 +6912,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
6912
6912
  subQueries = decomp.subQueries;
6913
6913
  }
6914
6914
  }
6915
- const { recall: recall2 } = await import("./recall-PI7FZQNO.mjs");
6915
+ const { recall: recall2 } = await import("./recall-SCMH2R24.mjs");
6916
6916
  let recallDegraded = [];
6917
6917
  const result = await recall2(
6918
6918
  query,
@@ -16385,6 +16385,7 @@ async function retain(content, ctx, options = {}) {
16385
16385
  const threshold = options.autoMergeThreshold ?? DEFAULT_AUTO_MERGE_THRESHOLD;
16386
16386
  const resolvedScope = options.scope ?? DEFAULT_SCOPE;
16387
16387
  let supersedeTargetIds = [];
16388
+ let consolidationDecidedCreate = false;
16388
16389
  let supersedeContent;
16389
16390
  let prepared;
16390
16391
  if (enableAutoMerge) {
@@ -16412,8 +16413,12 @@ async function retain(content, ctx, options = {}) {
16412
16413
  const outcome = await tryConsolidate(trimmed, ctx, options, prepared);
16413
16414
  if (outcome) {
16414
16415
  if ("done" in outcome) return outcome.done;
16415
- supersedeTargetIds = outcome.supersede;
16416
- supersedeContent = outcome.content;
16416
+ if ("create" in outcome) {
16417
+ consolidationDecidedCreate = true;
16418
+ } else {
16419
+ supersedeTargetIds = outcome.supersede;
16420
+ supersedeContent = outcome.content;
16421
+ }
16417
16422
  }
16418
16423
  }
16419
16424
  if (supersedeTargetIds.length === 0) {
@@ -16463,7 +16468,14 @@ async function retain(content, ctx, options = {}) {
16463
16468
  action: "merge",
16464
16469
  memoryId: targetId,
16465
16470
  targetId,
16466
- proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
16471
+ proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
16472
+ similarity: matches[0].similarity,
16473
+ // Stage 1 may have run and explicitly said `create`, and Stage 2
16474
+ // then found a strict-cosine match anyway. Reporting the decision
16475
+ // here is what makes that DISAGREEMENT visible — without it the
16476
+ // model's create silently vanished from the distribution whenever
16477
+ // the cosine stage won.
16478
+ ...consolidationDecidedCreate && { consolidation: "create" }
16467
16479
  };
16468
16480
  }
16469
16481
  await assertMergeTargetGoneOrThrow(ctx, targetId);
@@ -16476,12 +16488,18 @@ async function retain(content, ctx, options = {}) {
16476
16488
  const embedding = reusableQueryEmbedding ?? await generateEmbedding(contentToWrite, ctx.embeddingOptions);
16477
16489
  const embeddingModel = ctx.embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
16478
16490
  if (options.respectTombstones) {
16479
- const tombstoneId = await findTombstoneMatch(embedding, embeddingModel, resolvedScope, ctx, {
16491
+ const tombstone = await findTombstoneMatch(embedding, embeddingModel, resolvedScope, ctx, {
16480
16492
  threshold,
16481
16493
  folderId: options.folderId
16482
16494
  });
16483
- if (tombstoneId) {
16484
- return { action: "suppressed", memoryId: tombstoneId, tombstoneId, proofCount: 0 };
16495
+ if (tombstone) {
16496
+ return {
16497
+ action: "suppressed",
16498
+ memoryId: tombstone.id,
16499
+ tombstoneId: tombstone.id,
16500
+ proofCount: 0,
16501
+ similarity: tombstone.similarity
16502
+ };
16485
16503
  }
16486
16504
  }
16487
16505
  const createOpts = {
@@ -16548,7 +16566,8 @@ async function retain(content, ctx, options = {}) {
16548
16566
  action: "supersede",
16549
16567
  memoryId: created2.uniqueId,
16550
16568
  targetId: primaryTargetId,
16551
- proofCount: 1
16569
+ proofCount: 1,
16570
+ consolidation: "supersede"
16552
16571
  };
16553
16572
  }
16554
16573
  notifyConsolidationFallback(
@@ -16562,7 +16581,8 @@ async function retain(content, ctx, options = {}) {
16562
16581
  return {
16563
16582
  action: "create",
16564
16583
  memoryId: created.uniqueId,
16565
- proofCount: 1
16584
+ proofCount: 1,
16585
+ ...consolidationDecidedCreate && { consolidation: "create" }
16566
16586
  };
16567
16587
  }
16568
16588
  function unionStrings(a, b) {
@@ -16592,7 +16612,7 @@ async function findTombstoneMatch(embedding, embeddingModel, scope, ctx, opts) {
16592
16612
  bestId = row.uniqueId;
16593
16613
  }
16594
16614
  }
16595
- return bestId;
16615
+ return bestId === null ? null : { id: bestId, similarity: bestSim };
16596
16616
  }
16597
16617
  function pickEventTimeUpdate(existing, incoming) {
16598
16618
  if (incoming === void 0 || incoming === null) return void 0;
@@ -16634,7 +16654,7 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
16634
16654
  }));
16635
16655
  const { consolidateMemory: doConsolidate } = await Promise.resolve().then(() => (init_consolidate(), consolidate_exports));
16636
16656
  const decision = await doConsolidate(trimmed, candidates, consolidateOptions);
16637
- if (decision.action === "create") return null;
16657
+ if (decision.action === "create") return decision.fallbackReason ? null : { create: true };
16638
16658
  if (decision.action === "supersede" && decision.content) {
16639
16659
  const requestedIds = decision.targetIds?.length ? decision.targetIds : decision.targetId ? [decision.targetId] : [];
16640
16660
  if (requestedIds.length === 0) return null;
@@ -16693,7 +16713,8 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
16693
16713
  action: "merge",
16694
16714
  memoryId: decision.targetId,
16695
16715
  targetId: decision.targetId,
16696
- proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
16716
+ proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
16717
+ consolidation: "noop"
16697
16718
  }
16698
16719
  };
16699
16720
  }
@@ -16746,7 +16767,8 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
16746
16767
  action: "update",
16747
16768
  memoryId: decision.targetId,
16748
16769
  targetId: decision.targetId,
16749
- proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1
16770
+ proofCount: updated.proofCount ?? (existing.proofCount ?? 1) + 1,
16771
+ consolidation: "update"
16750
16772
  }
16751
16773
  };
16752
16774
  }
@@ -16888,6 +16910,11 @@ Extract durable user facts.`,
16888
16910
  fallbackSourceId,
16889
16911
  options.userIdentity ?? []
16890
16912
  );
16913
+ const rawCandidates = parsed.candidates;
16914
+ options.onCandidatesParsed?.({
16915
+ rawCount: Array.isArray(rawCandidates) ? rawCandidates.length : 0,
16916
+ validCount: candidates.length
16917
+ });
16891
16918
  if (!redactor) return candidates;
16892
16919
  const restored = restoreCandidates(candidates, redactor, options.userIdentity ?? []);
16893
16920
  if (candidates.length > 0 && restored.length === 0) {
@@ -16924,8 +16951,12 @@ async function extractAndRetain(messages, retainCtx, options) {
16924
16951
  let exhaustedEmpty = false;
16925
16952
  let exhaustedFailure;
16926
16953
  let droppedAfterRedaction = false;
16954
+ let rawCandidateCount = 0;
16955
+ let validCandidateCount = 0;
16927
16956
  const callerOnExhaustedEmpty = options.extract.onExhaustedEmpty;
16928
16957
  const callerOnCandidatesDropped = options.extract.onCandidatesDropped;
16958
+ const callerOnCandidatesParsed = options.extract.onCandidatesParsed;
16959
+ const tExtract = Date.now();
16929
16960
  const candidates = await extractFacts(messages, {
16930
16961
  ...options.extract,
16931
16962
  onExhaustedEmpty: (failure) => {
@@ -16936,8 +16967,14 @@ async function extractAndRetain(messages, retainCtx, options) {
16936
16967
  onCandidatesDropped: () => {
16937
16968
  droppedAfterRedaction = true;
16938
16969
  callerOnCandidatesDropped?.();
16970
+ },
16971
+ onCandidatesParsed: (stats) => {
16972
+ rawCandidateCount = stats.rawCount;
16973
+ validCandidateCount = stats.validCount;
16974
+ callerOnCandidatesParsed?.(stats);
16939
16975
  }
16940
16976
  });
16977
+ const extractMs = Date.now() - tExtract;
16941
16978
  const filtered = candidates.filter((c) => c.confidence >= minConfidence);
16942
16979
  const log = getLogger();
16943
16980
  const screened = screenCandidatesForInjection(filtered);
@@ -16985,6 +17022,7 @@ async function extractAndRetain(messages, retainCtx, options) {
16985
17022
  const results = [];
16986
17023
  const quarantinedInfo = [];
16987
17024
  let failedWrites = 0;
17025
+ const tRetain = Date.now();
16988
17026
  for (const { candidate, isQuarantined, reason, signature } of toRetain) {
16989
17027
  try {
16990
17028
  const result = await retain(candidate.content, retainCtx, {
@@ -17051,6 +17089,21 @@ async function extractAndRetain(messages, retainCtx, options) {
17051
17089
  failedCount: failedWrites,
17052
17090
  outcome,
17053
17091
  quarantined: quarantinedInfo,
17092
+ funnel: {
17093
+ rawCandidateCount,
17094
+ validCandidateCount,
17095
+ afterRedactionCount: candidates.length,
17096
+ aboveConfidenceCount: filtered.length,
17097
+ // The PERSISTED quarantines (`quarantinedInfo`), not the screened list: a
17098
+ // screened candidate whose retain() throws is counted in `failedCount`,
17099
+ // and counting it here too would double it and break the identity below.
17100
+ // This also keeps the count equal to `quarantined.length` on the result.
17101
+ quarantinedCount: quarantinedInfo.length,
17102
+ retainedCount: results.length,
17103
+ failedCount: failedWrites
17104
+ },
17105
+ timings: { extractMs, retainMs: Date.now() - tRetain },
17106
+ model: options.extract.model ?? DEFAULT_EXTRACTION_MODEL,
17054
17107
  // Only meaningful alongside `outcome: "empty-after-retry"`. Returned as well
17055
17108
  // as pushed through the callback so a consumer that only inspects the result
17056
17109
  // (rather than wiring a hook) can still report WHY.
@@ -17306,27 +17359,23 @@ function createAutoExtractor(options) {
17306
17359
  const t0 = Date.now();
17307
17360
  void (async () => {
17308
17361
  try {
17309
- const { candidates, results, failedCount, outcome, failure } = await extractAndRetain(
17310
- window2,
17311
- retainCtx,
17312
- {
17313
- extract,
17314
- ...options.minConfidence !== void 0 && { minConfidence: options.minConfidence },
17315
- ...options.entityCtx !== void 0 && { entityCtx: options.entityCtx },
17316
- ...options.scope !== void 0 && { scope: options.scope },
17317
- ...options.folderId !== void 0 && { folderId: options.folderId },
17318
- ...consolidateOptions !== void 0 && { consolidateOptions },
17319
- ...injectionClassifierOptions !== void 0 && {
17320
- injectionClassifier: injectionClassifierOptions
17321
- },
17322
- ...options.onCandidateFailed && {
17323
- onCandidateFailed: (candidate, error) => options.onCandidateFailed?.({ candidate, error, conversationId })
17324
- },
17325
- ...options.onMemoryQuarantined && {
17326
- onQuarantined: (info) => options.onMemoryQuarantined?.({ ...info, conversationId })
17327
- }
17362
+ const { candidates, results, failedCount, outcome, failure, funnel, timings, model } = await extractAndRetain(window2, retainCtx, {
17363
+ extract,
17364
+ ...options.minConfidence !== void 0 && { minConfidence: options.minConfidence },
17365
+ ...options.entityCtx !== void 0 && { entityCtx: options.entityCtx },
17366
+ ...options.scope !== void 0 && { scope: options.scope },
17367
+ ...options.folderId !== void 0 && { folderId: options.folderId },
17368
+ ...consolidateOptions !== void 0 && { consolidateOptions },
17369
+ ...injectionClassifierOptions !== void 0 && {
17370
+ injectionClassifier: injectionClassifierOptions
17371
+ },
17372
+ ...options.onCandidateFailed && {
17373
+ onCandidateFailed: (candidate, error) => options.onCandidateFailed?.({ candidate, error, conversationId })
17374
+ },
17375
+ ...options.onMemoryQuarantined && {
17376
+ onQuarantined: (info) => options.onMemoryQuarantined?.({ ...info, conversationId })
17328
17377
  }
17329
- );
17378
+ });
17330
17379
  if (outcome !== "empty-after-retry") {
17331
17380
  const advancedTo = window2[window2.length - 1].id;
17332
17381
  stateFor(conversationId).watermark = advancedTo;
@@ -17347,6 +17396,9 @@ function createAutoExtractor(options) {
17347
17396
  durationMs: Date.now() - t0,
17348
17397
  conversationId,
17349
17398
  outcome,
17399
+ funnel,
17400
+ timings,
17401
+ model,
17350
17402
  // Only set alongside `outcome: "empty-after-retry"`. Spread so the key
17351
17403
  // is absent rather than explicitly undefined on a healthy turn —
17352
17404
  // analytics backends store an explicit undefined as a real value.
@@ -5940,6 +5940,15 @@ interface RecallDiagnostics {
5940
5940
  degraded: RecallDegradation[];
5941
5941
  }
5942
5942
  type RetainAction = "create" | "merge" | "update" | "skip" | "suppressed" | "supersede";
5943
+ /**
5944
+ * The consolidation LLM's decision for a candidate, when it made one. Reported
5945
+ * on {@link RetainResult.consolidation} so a host can tell an LLM `noop` (the
5946
+ * fact already exists) from a cosine auto-merge — both arrive as
5947
+ * `action: "merge"` — and can read how often the model reaches for `supersede`
5948
+ * or `update` versus `create`. A degraded fallback create (LLM error, bad
5949
+ * response) carries no decision; `onFallback` reports those.
5950
+ */
5951
+ type ConsolidationAction = "create" | "update" | "noop" | "supersede";
5943
5952
  type RetainSource = "manual" | "auto-extracted" | "capsule";
5944
5953
  /**
5945
5954
  * Why a retain returned "create" instead of applying a consolidation decision.
@@ -6079,6 +6088,33 @@ interface RetainResult {
6079
6088
  tombstoneId?: string;
6080
6089
  /** Updated proof_count after this write. 0 when nothing was written (suppressed). */
6081
6090
  proofCount: number;
6091
+ /**
6092
+ * How close the write was to the threshold that allowed it. Absent on the
6093
+ * actions that have no such score (`create`, `update`, `supersede`, `skip`).
6094
+ *
6095
+ * The two paths report DIFFERENT things and a dashboard has to know which:
6096
+ *
6097
+ * - `suppressed` — an exact cosine against the tombstone, computed in
6098
+ * `findTombstoneMatch`.
6099
+ * - `merge` — the RANKER's score for the target, not a pure cosine. The
6100
+ * cosine is what cleared `minSimilarity`, but the supersession pass may
6101
+ * then adjust it (`oldScore - delta` / `newScore + delta`) before this
6102
+ * value is read, and can in principle reorder the winner. Read it as
6103
+ * "the score the merge was chosen on", within the supersession delta of
6104
+ * the cosine — not as the raw pairwise similarity.
6105
+ */
6106
+ similarity?: number;
6107
+ /**
6108
+ * What the consolidation LLM decided for this candidate, when consolidation
6109
+ * ran — see {@link ConsolidationAction}.
6110
+ *
6111
+ * Reported for the DECISION, not for what the write ended up doing, so the
6112
+ * two can disagree and be read as such: a `merge` carrying
6113
+ * `consolidation: "create"` is the model saying "new fact" and the strict
6114
+ * cosine stage merging anyway. Absent when consolidation did not run, and
6115
+ * absent on a degraded fallback create (`onFallback` owns that signal).
6116
+ */
6117
+ consolidation?: ConsolidationAction;
6082
6118
  }
6083
6119
 
6084
6120
  /**
@@ -6305,6 +6341,61 @@ interface ExtractFactsOptions extends PortalLlmAuth {
6305
6341
  * callers may leave it unset.
6306
6342
  */
6307
6343
  onAttempt?: (attempt: PortalLlmAttempt) => void;
6344
+ /**
6345
+ * Fired once per successful completion with how many candidates the model
6346
+ * emitted (`rawCount`) and how many survived {@link validateCandidates}
6347
+ * (`validCount`) — the non-string / empty / over-cap / low-signal / bad-
6348
+ * confidence drops that until now were a bare `continue` nobody counted.
6349
+ *
6350
+ * Without it a `no-facts` turn cannot be split into "the model found nothing"
6351
+ * and "the model found things we threw away", which is the difference between
6352
+ * a prompt problem and a validator problem. Counts only; never content.
6353
+ */
6354
+ onCandidatesParsed?: (stats: {
6355
+ rawCount: number;
6356
+ validCount: number;
6357
+ }) => void;
6358
+ }
6359
+ /**
6360
+ * Where a turn's candidates went between the model's completion and the vault —
6361
+ * every stage that can drop one, as a count. Returned by {@link extractAndRetain}
6362
+ * and forwarded on `TurnCompleteEvent` so a host can emit it; nothing here is
6363
+ * content.
6364
+ *
6365
+ * Reads as a funnel: `raw ≥ valid ≥ afterRedaction ≥ aboveConfidence`, then
6366
+ * `aboveConfidence = quarantined + retained + failed`.
6367
+ * @public
6368
+ */
6369
+ interface ExtractionFunnel {
6370
+ /** Candidates in the model's completion, before any validation. */
6371
+ rawCandidateCount: number;
6372
+ /** Survivors of {@link validateCandidates} (shape, length, low-signal, confidence-is-a-number). */
6373
+ validCandidateCount: number;
6374
+ /** Survivors of PII de-anonymization (equals `validCandidateCount` when redaction is off). */
6375
+ afterRedactionCount: number;
6376
+ /** Survivors of the `minConfidence` floor — the candidates that reached the injection screen. */
6377
+ aboveConfidenceCount: number;
6378
+ /**
6379
+ * Held for review by the injection screen and SUCCESSFULLY persisted — the
6380
+ * same set as `extractAndRetain`'s `quarantined`. A screened candidate whose
6381
+ * `retain()` threw is in `failedCount` instead, never both.
6382
+ */
6383
+ quarantinedCount: number;
6384
+ /** Written through `retain()` (any disposition). */
6385
+ retainedCount: number;
6386
+ /** `retain()` threw. */
6387
+ failedCount: number;
6388
+ }
6389
+ /**
6390
+ * Wall-clock split of one {@link extractAndRetain} call. The worker's
6391
+ * `durationMs` is the sum plus the screen; these say which half is slow.
6392
+ * @public
6393
+ */
6394
+ interface ExtractionTimings {
6395
+ /** The extraction LLM call, all attempts and backoff included. */
6396
+ extractMs: number;
6397
+ /** The retain loop — embeddings, consolidation LLM calls, writes — over every candidate. */
6398
+ retainMs: number;
6308
6399
  }
6309
6400
  /**
6310
6401
  * Stage 1 — call the LLM to extract candidate facts from the recent
@@ -6422,6 +6513,12 @@ declare function extractAndRetain(messages: AutoExtractMessage[], retainCtx: Ret
6422
6513
  * the give-up, so "extraction is failing" can be reported as *why* it failed.
6423
6514
  */
6424
6515
  failure?: PortalLlmFailure;
6516
+ /** Where the candidates went, stage by stage — see {@link ExtractionFunnel}. */
6517
+ funnel: ExtractionFunnel;
6518
+ /** Extract vs. retain wall-clock — see {@link ExtractionTimings}. */
6519
+ timings: ExtractionTimings;
6520
+ /** The extraction model this call asked for (the resolved default when unset). */
6521
+ model: string;
6425
6522
  }>;
6426
6523
 
6427
6524
  /**
@@ -7485,6 +7582,16 @@ interface TurnCompleteEvent {
7485
7582
  * carries content.
7486
7583
  */
7487
7584
  failure?: PortalLlmFailure;
7585
+ /**
7586
+ * Where the candidates went between the model and the vault, as counts — the
7587
+ * drops before `retain()` that `candidates`/`results` cannot show. See
7588
+ * {@link ExtractionFunnel}.
7589
+ */
7590
+ funnel?: ExtractionFunnel;
7591
+ /** Extract vs. retain wall-clock split of `durationMs`. See {@link ExtractionTimings}. */
7592
+ timings?: ExtractionTimings;
7593
+ /** The extraction model this turn asked for. */
7594
+ model?: string;
7488
7595
  }
7489
7596
  /** @public */
7490
7597
  /**
@@ -10753,4 +10860,4 @@ declare function refreshNotionAccessToken(params: NotionRefreshTokenParams): Pro
10753
10860
  */
10754
10861
  declare function createNotionTools(getAccessToken: () => string | null, requestNotionAccess: () => Promise<string>): ToolConfig[];
10755
10862
 
10756
- export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
10863
+ export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, type ManualFactType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RedactionResult, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, addConversationMemoriesOp, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionTools, createPlatformCursorStore, createRecallTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, deleteAllVaultMemoriesForUserOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };