@anuma/sdk 7.0.3-next.20261014203930 → 7.0.3

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.
@@ -19342,48 +19342,44 @@ async function recall(query, ctx, options = {}) {
19342
19342
  embeddingOptions,
19343
19343
  ctx.vaultCache,
19344
19344
  searchOptions
19345
- )))(
19346
- query,
19347
- {
19348
- limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
19349
- minSimilarity: vaultMinScore,
19350
- useFusion: true,
19351
- rerank: flags.rerank,
19352
- ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
19353
- ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
19354
- ...options.rerankLoadTimeoutMs !== void 0 && {
19355
- rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
19356
- },
19357
- ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
19358
- ...options.recency && { recency: options.recency },
19359
- ...options.mmr !== void 0 && { mmr: options.mmr },
19360
- ...options.supersessionBoost !== void 0 && {
19361
- supersessionBoost: options.supersessionBoost
19362
- },
19363
- ...options.supersessionWindow !== void 0 && {
19364
- supersessionWindow: options.supersessionWindow
19365
- },
19366
- ...options.proofCountAlpha !== void 0 && {
19367
- proofCountAlpha: options.proofCountAlpha
19368
- },
19369
- ...options.bm25AdmissionDivisor !== void 0 && {
19370
- bm25AdmissionDivisor: options.bm25AdmissionDivisor
19371
- },
19372
- ...options.rrfK !== void 0 && { rrfK: options.rrfK },
19373
- ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
19374
- ...subQueries && { subQueries },
19375
- ...options.scopes && { scopes: options.scopes },
19376
- ...options.folderId !== void 0 && { folderId: options.folderId },
19377
- ...options.factTypes?.length && { factTypes: options.factTypes },
19378
- ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
19379
- ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
19380
- ...entityRanking.length > 0 && { entityRanking },
19381
- ...temporalRanking.length > 0 && { temporalRanking },
19382
- ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
19383
- queryEmbedTotalTimeoutMs
19345
+ )))(query, {
19346
+ limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
19347
+ minSimilarity: vaultMinScore,
19348
+ useFusion: true,
19349
+ rerank: flags.rerank,
19350
+ ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
19351
+ ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
19352
+ ...options.rerankLoadTimeoutMs !== void 0 && {
19353
+ rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
19384
19354
  },
19385
- options.embeddingCache
19386
- );
19355
+ ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
19356
+ ...options.recency && { recency: options.recency },
19357
+ ...options.mmr !== void 0 && { mmr: options.mmr },
19358
+ ...options.supersessionBoost !== void 0 && {
19359
+ supersessionBoost: options.supersessionBoost
19360
+ },
19361
+ ...options.supersessionWindow !== void 0 && {
19362
+ supersessionWindow: options.supersessionWindow
19363
+ },
19364
+ ...options.proofCountAlpha !== void 0 && {
19365
+ proofCountAlpha: options.proofCountAlpha
19366
+ },
19367
+ ...options.bm25AdmissionDivisor !== void 0 && {
19368
+ bm25AdmissionDivisor: options.bm25AdmissionDivisor
19369
+ },
19370
+ ...options.rrfK !== void 0 && { rrfK: options.rrfK },
19371
+ ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
19372
+ ...subQueries && { subQueries },
19373
+ ...options.scopes && { scopes: options.scopes },
19374
+ ...options.folderId !== void 0 && { folderId: options.folderId },
19375
+ ...options.factTypes?.length && { factTypes: options.factTypes },
19376
+ ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
19377
+ ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
19378
+ ...entityRanking.length > 0 && { entityRanking },
19379
+ ...temporalRanking.length > 0 && { temporalRanking },
19380
+ ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
19381
+ queryEmbedTotalTimeoutMs
19382
+ });
19387
19383
  factResults.push(
19388
19384
  ...dedupeBy(
19389
19385
  results,
@@ -20530,19 +20526,10 @@ function createLocalMemoryStore(options) {
20530
20526
  retainOptions
20531
20527
  ),
20532
20528
  factSource: {
20533
- search: (query, searchOptions, embeddingCache) => searchVaultMemoriesWithSize(
20529
+ search: (query, searchOptions) => searchVaultMemoriesWithSize(
20534
20530
  query,
20535
20531
  vaultCtx,
20536
- {
20537
- ...options.embeddingOptions,
20538
- taskType: "memory_recall_embed",
20539
- ...embeddingCache && !options.embeddingOptions.cache && {
20540
- cache: maskScopedEmbeddingCache(
20541
- embeddingCache,
20542
- Boolean(options.embeddingOptions.maskInput)
20543
- )
20544
- }
20545
- },
20532
+ { ...options.embeddingOptions, taskType: "memory_recall_embed" },
20546
20533
  vaultCache,
20547
20534
  searchOptions
20548
20535
  ),
@@ -21174,7 +21161,7 @@ function stored(row) {
21174
21161
  function createRemoteMemoryPipeline(options) {
21175
21162
  const { persistence, embeddingOptions } = options;
21176
21163
  const model = embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
21177
- const operation = (mode, queryOptions = embeddingOptions) => {
21164
+ const operation = (mode) => {
21178
21165
  const rejectUndecryptable = (failed) => {
21179
21166
  if (!failed.length) return;
21180
21167
  if (mode === "retain")
@@ -21205,7 +21192,7 @@ function createRemoteMemoryPipeline(options) {
21205
21192
  const start = Date.now();
21206
21193
  const budgetMs = search.queryEmbedTotalTimeoutMs ?? 8e3;
21207
21194
  const embed = (texts) => generateEmbeddings(texts, {
21208
- ...queryOptions,
21195
+ ...embeddingOptions,
21209
21196
  taskType: mode === "retain" ? "memory_retain_embed" : "memory_recall_embed",
21210
21197
  totalTimeoutMs: budgetMs
21211
21198
  });
@@ -21225,11 +21212,7 @@ function createRemoteMemoryPipeline(options) {
21225
21212
  }
21226
21213
  };
21227
21214
  const [primary, facetEmbeddings] = await Promise.all([
21228
- search.queryEmbedding ?? (mode === "recall" && queryOptions.cache ? generateEmbedding(query, {
21229
- ...queryOptions,
21230
- taskType: "memory_recall_embed",
21231
- totalTimeoutMs: budgetMs
21232
- }) : embed([query]).then((vectors2) => vectors2[0])),
21215
+ search.queryEmbedding ?? embed([query]).then((vectors2) => vectors2[0]),
21233
21216
  embedFacets()
21234
21217
  ]);
21235
21218
  const queryEmbedding = storedVector(primary);
@@ -21453,17 +21436,15 @@ function createRemoteMemoryPipeline(options) {
21453
21436
  const factSource = {
21454
21437
  graphRanking: options.graphRanking,
21455
21438
  temporalRanking: options.temporalRanking,
21456
- search: async (text14, searchOptions, embeddingCache) => {
21457
- const queryOptions = {
21458
- ...embeddingOptions,
21459
- taskType: "memory_recall_embed",
21460
- ...embeddingCache && !embeddingOptions.cache && {
21461
- cache: maskScopedEmbeddingCache(embeddingCache, Boolean(embeddingOptions.maskInput))
21462
- }
21463
- };
21464
- const { prepare } = operation("recall", queryOptions);
21439
+ search: async (text14, searchOptions) => {
21440
+ const { prepare } = operation("recall");
21465
21441
  const prepared = await prepare(text14, searchOptions);
21466
- const ranked = await rankPreparedVaultCandidates(text14, prepared, queryOptions, searchOptions);
21442
+ const ranked = await rankPreparedVaultCandidates(
21443
+ text14,
21444
+ prepared,
21445
+ { ...embeddingOptions, taskType: "memory_recall_embed" },
21446
+ searchOptions
21447
+ );
21467
21448
  return {
21468
21449
  ...ranked,
21469
21450
  rankedOnCosine: prepared.memories.length > 0 && !prepared.embeddingsUnavailable,
@@ -4508,7 +4508,7 @@ interface RecallOptions {
4508
4508
  }
4509
4509
  /** A fact source supplies bounded candidates; recall owns ranking and result handling. */
4510
4510
  interface RecallFactSource {
4511
- search: (query: string, options?: MemoryVaultSearchOptions, embeddingCache?: Map<string, Float32Array>) => ReturnType<typeof searchVaultMemoriesWithSize>;
4511
+ search: (query: string, options?: MemoryVaultSearchOptions) => ReturnType<typeof searchVaultMemoriesWithSize>;
4512
4512
  graphRanking: (query: string, traverse: boolean, options: RecallOptions) => Promise<string[]>;
4513
4513
  temporalRanking: (query: string, now?: number) => Promise<string[]>;
4514
4514
  }
@@ -4508,7 +4508,7 @@ interface RecallOptions {
4508
4508
  }
4509
4509
  /** A fact source supplies bounded candidates; recall owns ranking and result handling. */
4510
4510
  interface RecallFactSource {
4511
- search: (query: string, options?: MemoryVaultSearchOptions, embeddingCache?: Map<string, Float32Array>) => ReturnType<typeof searchVaultMemoriesWithSize>;
4511
+ search: (query: string, options?: MemoryVaultSearchOptions) => ReturnType<typeof searchVaultMemoriesWithSize>;
4512
4512
  graphRanking: (query: string, traverse: boolean, options: RecallOptions) => Promise<string[]>;
4513
4513
  temporalRanking: (query: string, now?: number) => Promise<string[]>;
4514
4514
  }
@@ -17715,48 +17715,44 @@ async function recall(query, ctx, options = {}) {
17715
17715
  embeddingOptions,
17716
17716
  ctx.vaultCache,
17717
17717
  searchOptions
17718
- )))(
17719
- query,
17720
- {
17721
- limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
17722
- minSimilarity: vaultMinScore,
17723
- useFusion: true,
17724
- rerank: flags.rerank,
17725
- ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
17726
- ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
17727
- ...options.rerankLoadTimeoutMs !== void 0 && {
17728
- rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
17729
- },
17730
- ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
17731
- ...options.recency && { recency: options.recency },
17732
- ...options.mmr !== void 0 && { mmr: options.mmr },
17733
- ...options.supersessionBoost !== void 0 && {
17734
- supersessionBoost: options.supersessionBoost
17735
- },
17736
- ...options.supersessionWindow !== void 0 && {
17737
- supersessionWindow: options.supersessionWindow
17738
- },
17739
- ...options.proofCountAlpha !== void 0 && {
17740
- proofCountAlpha: options.proofCountAlpha
17741
- },
17742
- ...options.bm25AdmissionDivisor !== void 0 && {
17743
- bm25AdmissionDivisor: options.bm25AdmissionDivisor
17744
- },
17745
- ...options.rrfK !== void 0 && { rrfK: options.rrfK },
17746
- ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
17747
- ...subQueries && { subQueries },
17748
- ...options.scopes && { scopes: options.scopes },
17749
- ...options.folderId !== void 0 && { folderId: options.folderId },
17750
- ...options.factTypes?.length && { factTypes: options.factTypes },
17751
- ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
17752
- ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
17753
- ...entityRanking.length > 0 && { entityRanking },
17754
- ...temporalRanking.length > 0 && { temporalRanking },
17755
- ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
17756
- queryEmbedTotalTimeoutMs
17718
+ )))(query, {
17719
+ limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
17720
+ minSimilarity: vaultMinScore,
17721
+ useFusion: true,
17722
+ rerank: flags.rerank,
17723
+ ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
17724
+ ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
17725
+ ...options.rerankLoadTimeoutMs !== void 0 && {
17726
+ rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
17757
17727
  },
17758
- options.embeddingCache
17759
- );
17728
+ ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
17729
+ ...options.recency && { recency: options.recency },
17730
+ ...options.mmr !== void 0 && { mmr: options.mmr },
17731
+ ...options.supersessionBoost !== void 0 && {
17732
+ supersessionBoost: options.supersessionBoost
17733
+ },
17734
+ ...options.supersessionWindow !== void 0 && {
17735
+ supersessionWindow: options.supersessionWindow
17736
+ },
17737
+ ...options.proofCountAlpha !== void 0 && {
17738
+ proofCountAlpha: options.proofCountAlpha
17739
+ },
17740
+ ...options.bm25AdmissionDivisor !== void 0 && {
17741
+ bm25AdmissionDivisor: options.bm25AdmissionDivisor
17742
+ },
17743
+ ...options.rrfK !== void 0 && { rrfK: options.rrfK },
17744
+ ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
17745
+ ...subQueries && { subQueries },
17746
+ ...options.scopes && { scopes: options.scopes },
17747
+ ...options.folderId !== void 0 && { folderId: options.folderId },
17748
+ ...options.factTypes?.length && { factTypes: options.factTypes },
17749
+ ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
17750
+ ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
17751
+ ...entityRanking.length > 0 && { entityRanking },
17752
+ ...temporalRanking.length > 0 && { temporalRanking },
17753
+ ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
17754
+ queryEmbedTotalTimeoutMs
17755
+ });
17760
17756
  factResults.push(
17761
17757
  ...dedupeBy(
17762
17758
  results,
@@ -18895,19 +18891,10 @@ function createLocalMemoryStore(options) {
18895
18891
  retainOptions
18896
18892
  ),
18897
18893
  factSource: {
18898
- search: (query, searchOptions, embeddingCache) => searchVaultMemoriesWithSize(
18894
+ search: (query, searchOptions) => searchVaultMemoriesWithSize(
18899
18895
  query,
18900
18896
  vaultCtx,
18901
- {
18902
- ...options.embeddingOptions,
18903
- taskType: "memory_recall_embed",
18904
- ...embeddingCache && !options.embeddingOptions.cache && {
18905
- cache: maskScopedEmbeddingCache(
18906
- embeddingCache,
18907
- Boolean(options.embeddingOptions.maskInput)
18908
- )
18909
- }
18910
- },
18897
+ { ...options.embeddingOptions, taskType: "memory_recall_embed" },
18911
18898
  vaultCache,
18912
18899
  searchOptions
18913
18900
  ),
@@ -19537,7 +19524,7 @@ function stored(row) {
19537
19524
  function createRemoteMemoryPipeline(options) {
19538
19525
  const { persistence, embeddingOptions } = options;
19539
19526
  const model = embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
19540
- const operation = (mode, queryOptions = embeddingOptions) => {
19527
+ const operation = (mode) => {
19541
19528
  const rejectUndecryptable = (failed) => {
19542
19529
  if (!failed.length) return;
19543
19530
  if (mode === "retain")
@@ -19568,7 +19555,7 @@ function createRemoteMemoryPipeline(options) {
19568
19555
  const start = Date.now();
19569
19556
  const budgetMs = search.queryEmbedTotalTimeoutMs ?? 8e3;
19570
19557
  const embed = (texts) => generateEmbeddings(texts, {
19571
- ...queryOptions,
19558
+ ...embeddingOptions,
19572
19559
  taskType: mode === "retain" ? "memory_retain_embed" : "memory_recall_embed",
19573
19560
  totalTimeoutMs: budgetMs
19574
19561
  });
@@ -19588,11 +19575,7 @@ function createRemoteMemoryPipeline(options) {
19588
19575
  }
19589
19576
  };
19590
19577
  const [primary, facetEmbeddings] = await Promise.all([
19591
- search.queryEmbedding ?? (mode === "recall" && queryOptions.cache ? generateEmbedding(query, {
19592
- ...queryOptions,
19593
- taskType: "memory_recall_embed",
19594
- totalTimeoutMs: budgetMs
19595
- }) : embed([query]).then((vectors2) => vectors2[0])),
19578
+ search.queryEmbedding ?? embed([query]).then((vectors2) => vectors2[0]),
19596
19579
  embedFacets()
19597
19580
  ]);
19598
19581
  const queryEmbedding = storedVector(primary);
@@ -19816,17 +19799,15 @@ function createRemoteMemoryPipeline(options) {
19816
19799
  const factSource = {
19817
19800
  graphRanking: options.graphRanking,
19818
19801
  temporalRanking: options.temporalRanking,
19819
- search: async (text14, searchOptions, embeddingCache) => {
19820
- const queryOptions = {
19821
- ...embeddingOptions,
19822
- taskType: "memory_recall_embed",
19823
- ...embeddingCache && !embeddingOptions.cache && {
19824
- cache: maskScopedEmbeddingCache(embeddingCache, Boolean(embeddingOptions.maskInput))
19825
- }
19826
- };
19827
- const { prepare } = operation("recall", queryOptions);
19802
+ search: async (text14, searchOptions) => {
19803
+ const { prepare } = operation("recall");
19828
19804
  const prepared = await prepare(text14, searchOptions);
19829
- const ranked = await rankPreparedVaultCandidates(text14, prepared, queryOptions, searchOptions);
19805
+ const ranked = await rankPreparedVaultCandidates(
19806
+ text14,
19807
+ prepared,
19808
+ { ...embeddingOptions, taskType: "memory_recall_embed" },
19809
+ searchOptions
19810
+ );
19830
19811
  return {
19831
19812
  ...ranked,
19832
19813
  rankedOnCosine: prepared.memories.length > 0 && !prepared.embeddingsUnavailable,
@@ -21646,48 +21646,44 @@ async function recall(query, ctx, options = {}) {
21646
21646
  embeddingOptions,
21647
21647
  ctx.vaultCache,
21648
21648
  searchOptions
21649
- )))(
21650
- query,
21651
- {
21652
- limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
21653
- minSimilarity: vaultMinScore,
21654
- useFusion: true,
21655
- rerank: flags.rerank,
21656
- ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
21657
- ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
21658
- ...options.rerankLoadTimeoutMs !== void 0 && {
21659
- rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
21660
- },
21661
- ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
21662
- ...options.recency && { recency: options.recency },
21663
- ...options.mmr !== void 0 && { mmr: options.mmr },
21664
- ...options.supersessionBoost !== void 0 && {
21665
- supersessionBoost: options.supersessionBoost
21666
- },
21667
- ...options.supersessionWindow !== void 0 && {
21668
- supersessionWindow: options.supersessionWindow
21669
- },
21670
- ...options.proofCountAlpha !== void 0 && {
21671
- proofCountAlpha: options.proofCountAlpha
21672
- },
21673
- ...options.bm25AdmissionDivisor !== void 0 && {
21674
- bm25AdmissionDivisor: options.bm25AdmissionDivisor
21675
- },
21676
- ...options.rrfK !== void 0 && { rrfK: options.rrfK },
21677
- ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
21678
- ...subQueries && { subQueries },
21679
- ...options.scopes && { scopes: options.scopes },
21680
- ...options.folderId !== void 0 && { folderId: options.folderId },
21681
- ...options.factTypes?.length && { factTypes: options.factTypes },
21682
- ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
21683
- ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
21684
- ...entityRanking.length > 0 && { entityRanking },
21685
- ...temporalRanking.length > 0 && { temporalRanking },
21686
- ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
21687
- queryEmbedTotalTimeoutMs
21649
+ )))(query, {
21650
+ limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
21651
+ minSimilarity: vaultMinScore,
21652
+ useFusion: true,
21653
+ rerank: flags.rerank,
21654
+ ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
21655
+ ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
21656
+ ...options.rerankLoadTimeoutMs !== void 0 && {
21657
+ rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
21688
21658
  },
21689
- options.embeddingCache
21690
- );
21659
+ ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
21660
+ ...options.recency && { recency: options.recency },
21661
+ ...options.mmr !== void 0 && { mmr: options.mmr },
21662
+ ...options.supersessionBoost !== void 0 && {
21663
+ supersessionBoost: options.supersessionBoost
21664
+ },
21665
+ ...options.supersessionWindow !== void 0 && {
21666
+ supersessionWindow: options.supersessionWindow
21667
+ },
21668
+ ...options.proofCountAlpha !== void 0 && {
21669
+ proofCountAlpha: options.proofCountAlpha
21670
+ },
21671
+ ...options.bm25AdmissionDivisor !== void 0 && {
21672
+ bm25AdmissionDivisor: options.bm25AdmissionDivisor
21673
+ },
21674
+ ...options.rrfK !== void 0 && { rrfK: options.rrfK },
21675
+ ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
21676
+ ...subQueries && { subQueries },
21677
+ ...options.scopes && { scopes: options.scopes },
21678
+ ...options.folderId !== void 0 && { folderId: options.folderId },
21679
+ ...options.factTypes?.length && { factTypes: options.factTypes },
21680
+ ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
21681
+ ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
21682
+ ...entityRanking.length > 0 && { entityRanking },
21683
+ ...temporalRanking.length > 0 && { temporalRanking },
21684
+ ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
21685
+ queryEmbedTotalTimeoutMs
21686
+ });
21691
21687
  factResults.push(
21692
21688
  ...dedupeBy(
21693
21689
  results,
@@ -22834,19 +22830,10 @@ function createLocalMemoryStore(options) {
22834
22830
  retainOptions
22835
22831
  ),
22836
22832
  factSource: {
22837
- search: (query, searchOptions, embeddingCache) => searchVaultMemoriesWithSize(
22833
+ search: (query, searchOptions) => searchVaultMemoriesWithSize(
22838
22834
  query,
22839
22835
  vaultCtx,
22840
- {
22841
- ...options.embeddingOptions,
22842
- taskType: "memory_recall_embed",
22843
- ...embeddingCache && !options.embeddingOptions.cache && {
22844
- cache: maskScopedEmbeddingCache(
22845
- embeddingCache,
22846
- Boolean(options.embeddingOptions.maskInput)
22847
- )
22848
- }
22849
- },
22836
+ { ...options.embeddingOptions, taskType: "memory_recall_embed" },
22850
22837
  vaultCache,
22851
22838
  searchOptions
22852
22839
  ),
@@ -23478,7 +23465,7 @@ function stored(row) {
23478
23465
  function createRemoteMemoryPipeline(options) {
23479
23466
  const { persistence, embeddingOptions } = options;
23480
23467
  const model = embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
23481
- const operation = (mode, queryOptions = embeddingOptions) => {
23468
+ const operation = (mode) => {
23482
23469
  const rejectUndecryptable = (failed) => {
23483
23470
  if (!failed.length) return;
23484
23471
  if (mode === "retain")
@@ -23509,7 +23496,7 @@ function createRemoteMemoryPipeline(options) {
23509
23496
  const start = Date.now();
23510
23497
  const budgetMs = search.queryEmbedTotalTimeoutMs ?? 8e3;
23511
23498
  const embed = (texts) => generateEmbeddings(texts, {
23512
- ...queryOptions,
23499
+ ...embeddingOptions,
23513
23500
  taskType: mode === "retain" ? "memory_retain_embed" : "memory_recall_embed",
23514
23501
  totalTimeoutMs: budgetMs
23515
23502
  });
@@ -23529,11 +23516,7 @@ function createRemoteMemoryPipeline(options) {
23529
23516
  }
23530
23517
  };
23531
23518
  const [primary, facetEmbeddings] = await Promise.all([
23532
- search.queryEmbedding ?? (mode === "recall" && queryOptions.cache ? generateEmbedding(query, {
23533
- ...queryOptions,
23534
- taskType: "memory_recall_embed",
23535
- totalTimeoutMs: budgetMs
23536
- }) : embed([query]).then((vectors2) => vectors2[0])),
23519
+ search.queryEmbedding ?? embed([query]).then((vectors2) => vectors2[0]),
23537
23520
  embedFacets()
23538
23521
  ]);
23539
23522
  const queryEmbedding = storedVector(primary);
@@ -23757,17 +23740,15 @@ function createRemoteMemoryPipeline(options) {
23757
23740
  const factSource = {
23758
23741
  graphRanking: options.graphRanking,
23759
23742
  temporalRanking: options.temporalRanking,
23760
- search: async (text14, searchOptions, embeddingCache) => {
23761
- const queryOptions = {
23762
- ...embeddingOptions,
23763
- taskType: "memory_recall_embed",
23764
- ...embeddingCache && !embeddingOptions.cache && {
23765
- cache: maskScopedEmbeddingCache(embeddingCache, Boolean(embeddingOptions.maskInput))
23766
- }
23767
- };
23768
- const { prepare } = operation("recall", queryOptions);
23743
+ search: async (text14, searchOptions) => {
23744
+ const { prepare } = operation("recall");
23769
23745
  const prepared = await prepare(text14, searchOptions);
23770
- const ranked = await rankPreparedVaultCandidates(text14, prepared, queryOptions, searchOptions);
23746
+ const ranked = await rankPreparedVaultCandidates(
23747
+ text14,
23748
+ prepared,
23749
+ { ...embeddingOptions, taskType: "memory_recall_embed" },
23750
+ searchOptions
23751
+ );
23771
23752
  return {
23772
23753
  ...ranked,
23773
23754
  rankedOnCosine: prepared.memories.length > 0 && !prepared.embeddingsUnavailable,
@@ -5021,7 +5021,7 @@ interface RecallOptions {
5021
5021
  }
5022
5022
  /** A fact source supplies bounded candidates; recall owns ranking and result handling. */
5023
5023
  interface RecallFactSource {
5024
- search: (query: string, options?: MemoryVaultSearchOptions, embeddingCache?: Map<string, Float32Array>) => ReturnType<typeof searchVaultMemoriesWithSize>;
5024
+ search: (query: string, options?: MemoryVaultSearchOptions) => ReturnType<typeof searchVaultMemoriesWithSize>;
5025
5025
  graphRanking: (query: string, traverse: boolean, options: RecallOptions) => Promise<string[]>;
5026
5026
  temporalRanking: (query: string, now?: number) => Promise<string[]>;
5027
5027
  }
@@ -5021,7 +5021,7 @@ interface RecallOptions {
5021
5021
  }
5022
5022
  /** A fact source supplies bounded candidates; recall owns ranking and result handling. */
5023
5023
  interface RecallFactSource {
5024
- search: (query: string, options?: MemoryVaultSearchOptions, embeddingCache?: Map<string, Float32Array>) => ReturnType<typeof searchVaultMemoriesWithSize>;
5024
+ search: (query: string, options?: MemoryVaultSearchOptions) => ReturnType<typeof searchVaultMemoriesWithSize>;
5025
5025
  graphRanking: (query: string, traverse: boolean, options: RecallOptions) => Promise<string[]>;
5026
5026
  temporalRanking: (query: string, now?: number) => Promise<string[]>;
5027
5027
  }
@@ -19811,48 +19811,44 @@ async function recall(query, ctx, options = {}) {
19811
19811
  embeddingOptions,
19812
19812
  ctx.vaultCache,
19813
19813
  searchOptions
19814
- )))(
19815
- query,
19816
- {
19817
- limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
19818
- minSimilarity: vaultMinScore,
19819
- useFusion: true,
19820
- rerank: flags.rerank,
19821
- ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
19822
- ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
19823
- ...options.rerankLoadTimeoutMs !== void 0 && {
19824
- rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
19825
- },
19826
- ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
19827
- ...options.recency && { recency: options.recency },
19828
- ...options.mmr !== void 0 && { mmr: options.mmr },
19829
- ...options.supersessionBoost !== void 0 && {
19830
- supersessionBoost: options.supersessionBoost
19831
- },
19832
- ...options.supersessionWindow !== void 0 && {
19833
- supersessionWindow: options.supersessionWindow
19834
- },
19835
- ...options.proofCountAlpha !== void 0 && {
19836
- proofCountAlpha: options.proofCountAlpha
19837
- },
19838
- ...options.bm25AdmissionDivisor !== void 0 && {
19839
- bm25AdmissionDivisor: options.bm25AdmissionDivisor
19840
- },
19841
- ...options.rrfK !== void 0 && { rrfK: options.rrfK },
19842
- ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
19843
- ...subQueries && { subQueries },
19844
- ...options.scopes && { scopes: options.scopes },
19845
- ...options.folderId !== void 0 && { folderId: options.folderId },
19846
- ...options.factTypes?.length && { factTypes: options.factTypes },
19847
- ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
19848
- ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
19849
- ...entityRanking.length > 0 && { entityRanking },
19850
- ...temporalRanking.length > 0 && { temporalRanking },
19851
- ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
19852
- queryEmbedTotalTimeoutMs
19814
+ )))(query, {
19815
+ limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
19816
+ minSimilarity: vaultMinScore,
19817
+ useFusion: true,
19818
+ rerank: flags.rerank,
19819
+ ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
19820
+ ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
19821
+ ...options.rerankLoadTimeoutMs !== void 0 && {
19822
+ rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
19853
19823
  },
19854
- options.embeddingCache
19855
- );
19824
+ ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
19825
+ ...options.recency && { recency: options.recency },
19826
+ ...options.mmr !== void 0 && { mmr: options.mmr },
19827
+ ...options.supersessionBoost !== void 0 && {
19828
+ supersessionBoost: options.supersessionBoost
19829
+ },
19830
+ ...options.supersessionWindow !== void 0 && {
19831
+ supersessionWindow: options.supersessionWindow
19832
+ },
19833
+ ...options.proofCountAlpha !== void 0 && {
19834
+ proofCountAlpha: options.proofCountAlpha
19835
+ },
19836
+ ...options.bm25AdmissionDivisor !== void 0 && {
19837
+ bm25AdmissionDivisor: options.bm25AdmissionDivisor
19838
+ },
19839
+ ...options.rrfK !== void 0 && { rrfK: options.rrfK },
19840
+ ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
19841
+ ...subQueries && { subQueries },
19842
+ ...options.scopes && { scopes: options.scopes },
19843
+ ...options.folderId !== void 0 && { folderId: options.folderId },
19844
+ ...options.factTypes?.length && { factTypes: options.factTypes },
19845
+ ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
19846
+ ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
19847
+ ...entityRanking.length > 0 && { entityRanking },
19848
+ ...temporalRanking.length > 0 && { temporalRanking },
19849
+ ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
19850
+ queryEmbedTotalTimeoutMs
19851
+ });
19856
19852
  factResults.push(
19857
19853
  ...dedupeBy(
19858
19854
  results,
@@ -20991,19 +20987,10 @@ function createLocalMemoryStore(options) {
20991
20987
  retainOptions
20992
20988
  ),
20993
20989
  factSource: {
20994
- search: (query, searchOptions, embeddingCache) => searchVaultMemoriesWithSize(
20990
+ search: (query, searchOptions) => searchVaultMemoriesWithSize(
20995
20991
  query,
20996
20992
  vaultCtx,
20997
- {
20998
- ...options.embeddingOptions,
20999
- taskType: "memory_recall_embed",
21000
- ...embeddingCache && !options.embeddingOptions.cache && {
21001
- cache: maskScopedEmbeddingCache(
21002
- embeddingCache,
21003
- Boolean(options.embeddingOptions.maskInput)
21004
- )
21005
- }
21006
- },
20993
+ { ...options.embeddingOptions, taskType: "memory_recall_embed" },
21007
20994
  vaultCache,
21008
20995
  searchOptions
21009
20996
  ),
@@ -21633,7 +21620,7 @@ function stored(row) {
21633
21620
  function createRemoteMemoryPipeline(options) {
21634
21621
  const { persistence, embeddingOptions } = options;
21635
21622
  const model = embeddingOptions.model ?? DEFAULT_API_EMBEDDING_MODEL;
21636
- const operation = (mode, queryOptions = embeddingOptions) => {
21623
+ const operation = (mode) => {
21637
21624
  const rejectUndecryptable = (failed) => {
21638
21625
  if (!failed.length) return;
21639
21626
  if (mode === "retain")
@@ -21664,7 +21651,7 @@ function createRemoteMemoryPipeline(options) {
21664
21651
  const start = Date.now();
21665
21652
  const budgetMs = search.queryEmbedTotalTimeoutMs ?? 8e3;
21666
21653
  const embed = (texts) => generateEmbeddings(texts, {
21667
- ...queryOptions,
21654
+ ...embeddingOptions,
21668
21655
  taskType: mode === "retain" ? "memory_retain_embed" : "memory_recall_embed",
21669
21656
  totalTimeoutMs: budgetMs
21670
21657
  });
@@ -21684,11 +21671,7 @@ function createRemoteMemoryPipeline(options) {
21684
21671
  }
21685
21672
  };
21686
21673
  const [primary, facetEmbeddings] = await Promise.all([
21687
- search.queryEmbedding ?? (mode === "recall" && queryOptions.cache ? generateEmbedding(query, {
21688
- ...queryOptions,
21689
- taskType: "memory_recall_embed",
21690
- totalTimeoutMs: budgetMs
21691
- }) : embed([query]).then((vectors2) => vectors2[0])),
21674
+ search.queryEmbedding ?? embed([query]).then((vectors2) => vectors2[0]),
21692
21675
  embedFacets()
21693
21676
  ]);
21694
21677
  const queryEmbedding = storedVector(primary);
@@ -21912,17 +21895,15 @@ function createRemoteMemoryPipeline(options) {
21912
21895
  const factSource = {
21913
21896
  graphRanking: options.graphRanking,
21914
21897
  temporalRanking: options.temporalRanking,
21915
- search: async (text14, searchOptions, embeddingCache) => {
21916
- const queryOptions = {
21917
- ...embeddingOptions,
21918
- taskType: "memory_recall_embed",
21919
- ...embeddingCache && !embeddingOptions.cache && {
21920
- cache: maskScopedEmbeddingCache(embeddingCache, Boolean(embeddingOptions.maskInput))
21921
- }
21922
- };
21923
- const { prepare } = operation("recall", queryOptions);
21898
+ search: async (text14, searchOptions) => {
21899
+ const { prepare } = operation("recall");
21924
21900
  const prepared = await prepare(text14, searchOptions);
21925
- const ranked = await rankPreparedVaultCandidates(text14, prepared, queryOptions, searchOptions);
21901
+ const ranked = await rankPreparedVaultCandidates(
21902
+ text14,
21903
+ prepared,
21904
+ { ...embeddingOptions, taskType: "memory_recall_embed" },
21905
+ searchOptions
21906
+ );
21926
21907
  return {
21927
21908
  ...ranked,
21928
21909
  rankedOnCosine: prepared.memories.length > 0 && !prepared.embeddingsUnavailable,
@@ -34583,48 +34583,44 @@ async function recall(query, ctx, options = {}) {
34583
34583
  embeddingOptions,
34584
34584
  ctx.vaultCache,
34585
34585
  searchOptions
34586
- )))(
34587
- query,
34588
- {
34589
- limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
34590
- minSimilarity: vaultMinScore,
34591
- useFusion: true,
34592
- rerank: flags.rerank,
34593
- ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
34594
- ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
34595
- ...options.rerankLoadTimeoutMs !== void 0 && {
34596
- rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
34597
- },
34598
- ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
34599
- ...options.recency && { recency: options.recency },
34600
- ...options.mmr !== void 0 && { mmr: options.mmr },
34601
- ...options.supersessionBoost !== void 0 && {
34602
- supersessionBoost: options.supersessionBoost
34603
- },
34604
- ...options.supersessionWindow !== void 0 && {
34605
- supersessionWindow: options.supersessionWindow
34606
- },
34607
- ...options.proofCountAlpha !== void 0 && {
34608
- proofCountAlpha: options.proofCountAlpha
34609
- },
34610
- ...options.bm25AdmissionDivisor !== void 0 && {
34611
- bm25AdmissionDivisor: options.bm25AdmissionDivisor
34612
- },
34613
- ...options.rrfK !== void 0 && { rrfK: options.rrfK },
34614
- ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
34615
- ...subQueries && { subQueries },
34616
- ...options.scopes && { scopes: options.scopes },
34617
- ...options.folderId !== void 0 && { folderId: options.folderId },
34618
- ...options.factTypes?.length && { factTypes: options.factTypes },
34619
- ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
34620
- ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
34621
- ...entityRanking.length > 0 && { entityRanking },
34622
- ...temporalRanking.length > 0 && { temporalRanking },
34623
- ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
34624
- queryEmbedTotalTimeoutMs
34586
+ )))(query, {
34587
+ limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
34588
+ minSimilarity: vaultMinScore,
34589
+ useFusion: true,
34590
+ rerank: flags.rerank,
34591
+ ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
34592
+ ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
34593
+ ...options.rerankLoadTimeoutMs !== void 0 && {
34594
+ rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
34625
34595
  },
34626
- options.embeddingCache
34627
- );
34596
+ ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
34597
+ ...options.recency && { recency: options.recency },
34598
+ ...options.mmr !== void 0 && { mmr: options.mmr },
34599
+ ...options.supersessionBoost !== void 0 && {
34600
+ supersessionBoost: options.supersessionBoost
34601
+ },
34602
+ ...options.supersessionWindow !== void 0 && {
34603
+ supersessionWindow: options.supersessionWindow
34604
+ },
34605
+ ...options.proofCountAlpha !== void 0 && {
34606
+ proofCountAlpha: options.proofCountAlpha
34607
+ },
34608
+ ...options.bm25AdmissionDivisor !== void 0 && {
34609
+ bm25AdmissionDivisor: options.bm25AdmissionDivisor
34610
+ },
34611
+ ...options.rrfK !== void 0 && { rrfK: options.rrfK },
34612
+ ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
34613
+ ...subQueries && { subQueries },
34614
+ ...options.scopes && { scopes: options.scopes },
34615
+ ...options.folderId !== void 0 && { folderId: options.folderId },
34616
+ ...options.factTypes?.length && { factTypes: options.factTypes },
34617
+ ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
34618
+ ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
34619
+ ...entityRanking.length > 0 && { entityRanking },
34620
+ ...temporalRanking.length > 0 && { temporalRanking },
34621
+ ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
34622
+ queryEmbedTotalTimeoutMs
34623
+ });
34628
34624
  factResults.push(
34629
34625
  ...dedupeBy(
34630
34626
  results,
@@ -35771,19 +35767,10 @@ function createLocalMemoryStore(options) {
35771
35767
  retainOptions
35772
35768
  ),
35773
35769
  factSource: {
35774
- search: (query, searchOptions, embeddingCache) => searchVaultMemoriesWithSize(
35770
+ search: (query, searchOptions) => searchVaultMemoriesWithSize(
35775
35771
  query,
35776
35772
  vaultCtx,
35777
- {
35778
- ...options.embeddingOptions,
35779
- taskType: "memory_recall_embed",
35780
- ...embeddingCache && !options.embeddingOptions.cache && {
35781
- cache: maskScopedEmbeddingCache(
35782
- embeddingCache,
35783
- Boolean(options.embeddingOptions.maskInput)
35784
- )
35785
- }
35786
- },
35773
+ { ...options.embeddingOptions, taskType: "memory_recall_embed" },
35787
35774
  vaultCache,
35788
35775
  searchOptions
35789
35776
  ),
@@ -4187,7 +4187,7 @@ interface RecallOptions {
4187
4187
  }
4188
4188
  /** A fact source supplies bounded candidates; recall owns ranking and result handling. */
4189
4189
  interface RecallFactSource {
4190
- search: (query: string, options?: MemoryVaultSearchOptions, embeddingCache?: Map<string, Float32Array>) => ReturnType<typeof searchVaultMemoriesWithSize>;
4190
+ search: (query: string, options?: MemoryVaultSearchOptions) => ReturnType<typeof searchVaultMemoriesWithSize>;
4191
4191
  graphRanking: (query: string, traverse: boolean, options: RecallOptions) => Promise<string[]>;
4192
4192
  temporalRanking: (query: string, now?: number) => Promise<string[]>;
4193
4193
  }
@@ -4187,7 +4187,7 @@ interface RecallOptions {
4187
4187
  }
4188
4188
  /** A fact source supplies bounded candidates; recall owns ranking and result handling. */
4189
4189
  interface RecallFactSource {
4190
- search: (query: string, options?: MemoryVaultSearchOptions, embeddingCache?: Map<string, Float32Array>) => ReturnType<typeof searchVaultMemoriesWithSize>;
4190
+ search: (query: string, options?: MemoryVaultSearchOptions) => ReturnType<typeof searchVaultMemoriesWithSize>;
4191
4191
  graphRanking: (query: string, traverse: boolean, options: RecallOptions) => Promise<string[]>;
4192
4192
  temporalRanking: (query: string, now?: number) => Promise<string[]>;
4193
4193
  }
@@ -32866,48 +32866,44 @@ async function recall(query, ctx, options = {}) {
32866
32866
  embeddingOptions,
32867
32867
  ctx.vaultCache,
32868
32868
  searchOptions
32869
- )))(
32870
- query,
32871
- {
32872
- limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
32873
- minSimilarity: vaultMinScore,
32874
- useFusion: true,
32875
- rerank: flags.rerank,
32876
- ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
32877
- ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
32878
- ...options.rerankLoadTimeoutMs !== void 0 && {
32879
- rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
32880
- },
32881
- ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
32882
- ...options.recency && { recency: options.recency },
32883
- ...options.mmr !== void 0 && { mmr: options.mmr },
32884
- ...options.supersessionBoost !== void 0 && {
32885
- supersessionBoost: options.supersessionBoost
32886
- },
32887
- ...options.supersessionWindow !== void 0 && {
32888
- supersessionWindow: options.supersessionWindow
32889
- },
32890
- ...options.proofCountAlpha !== void 0 && {
32891
- proofCountAlpha: options.proofCountAlpha
32892
- },
32893
- ...options.bm25AdmissionDivisor !== void 0 && {
32894
- bm25AdmissionDivisor: options.bm25AdmissionDivisor
32895
- },
32896
- ...options.rrfK !== void 0 && { rrfK: options.rrfK },
32897
- ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
32898
- ...subQueries && { subQueries },
32899
- ...options.scopes && { scopes: options.scopes },
32900
- ...options.folderId !== void 0 && { folderId: options.folderId },
32901
- ...options.factTypes?.length && { factTypes: options.factTypes },
32902
- ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
32903
- ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
32904
- ...entityRanking.length > 0 && { entityRanking },
32905
- ...temporalRanking.length > 0 && { temporalRanking },
32906
- ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
32907
- queryEmbedTotalTimeoutMs
32869
+ )))(query, {
32870
+ limit: types.includes("chunk") ? Math.max(limit * 2, 16) : limit,
32871
+ minSimilarity: vaultMinScore,
32872
+ useFusion: true,
32873
+ rerank: flags.rerank,
32874
+ ...options.rerankTopN !== void 0 && { rerankTopN: options.rerankTopN },
32875
+ ...options.ceWeight !== void 0 && { ceWeight: options.ceWeight },
32876
+ ...options.rerankLoadTimeoutMs !== void 0 && {
32877
+ rerankLoadTimeoutMs: options.rerankLoadTimeoutMs
32908
32878
  },
32909
- options.embeddingCache
32910
- );
32879
+ ...options.recencyAlpha !== void 0 && { recencyAlpha: options.recencyAlpha },
32880
+ ...options.recency && { recency: options.recency },
32881
+ ...options.mmr !== void 0 && { mmr: options.mmr },
32882
+ ...options.supersessionBoost !== void 0 && {
32883
+ supersessionBoost: options.supersessionBoost
32884
+ },
32885
+ ...options.supersessionWindow !== void 0 && {
32886
+ supersessionWindow: options.supersessionWindow
32887
+ },
32888
+ ...options.proofCountAlpha !== void 0 && {
32889
+ proofCountAlpha: options.proofCountAlpha
32890
+ },
32891
+ ...options.bm25AdmissionDivisor !== void 0 && {
32892
+ bm25AdmissionDivisor: options.bm25AdmissionDivisor
32893
+ },
32894
+ ...options.rrfK !== void 0 && { rrfK: options.rrfK },
32895
+ ...options.decryptLast !== void 0 && { decryptLast: options.decryptLast },
32896
+ ...subQueries && { subQueries },
32897
+ ...options.scopes && { scopes: options.scopes },
32898
+ ...options.folderId !== void 0 && { folderId: options.folderId },
32899
+ ...options.factTypes?.length && { factTypes: options.factTypes },
32900
+ ...options.memoryIds !== void 0 && { memoryIds: options.memoryIds },
32901
+ ...options.factTypeWeights && { factTypeWeights: options.factTypeWeights },
32902
+ ...entityRanking.length > 0 && { entityRanking },
32903
+ ...temporalRanking.length > 0 && { temporalRanking },
32904
+ ...needsChunkEmbedding && { queryEmbedding: queryEmbedding ?? [] },
32905
+ queryEmbedTotalTimeoutMs
32906
+ });
32911
32907
  factResults.push(
32912
32908
  ...dedupeBy(
32913
32909
  results,
@@ -34046,19 +34042,10 @@ function createLocalMemoryStore(options) {
34046
34042
  retainOptions
34047
34043
  ),
34048
34044
  factSource: {
34049
- search: (query, searchOptions, embeddingCache) => searchVaultMemoriesWithSize(
34045
+ search: (query, searchOptions) => searchVaultMemoriesWithSize(
34050
34046
  query,
34051
34047
  vaultCtx,
34052
- {
34053
- ...options.embeddingOptions,
34054
- taskType: "memory_recall_embed",
34055
- ...embeddingCache && !options.embeddingOptions.cache && {
34056
- cache: maskScopedEmbeddingCache(
34057
- embeddingCache,
34058
- Boolean(options.embeddingOptions.maskInput)
34059
- )
34060
- }
34061
- },
34048
+ { ...options.embeddingOptions, taskType: "memory_recall_embed" },
34062
34049
  vaultCache,
34063
34050
  searchOptions
34064
34051
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anuma/sdk",
3
- "version": "7.0.3-next.20261014203930",
3
+ "version": "7.0.3",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",