@anuma/sdk 3.9.1 → 3.9.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.
- package/dist/client/index.cjs +10 -0
- package/dist/client/index.d.mts +38 -1
- package/dist/client/index.d.ts +38 -1
- package/dist/client/index.mjs +9 -0
- package/dist/expo/{chunk-YFJAHJMB.mjs → chunk-UQQCL7KP.mjs} +40 -14
- package/dist/expo/index.cjs +39 -13
- package/dist/expo/index.mjs +1 -1
- package/dist/expo/{recall-KWTVD4IR.mjs → recall-RSLYPJ5L.mjs} +1 -1
- package/dist/react/{chunk-GDS7GHBF.mjs → chunk-HLBQICNL.mjs} +40 -14
- package/dist/react/index.cjs +39 -13
- package/dist/react/index.d.mts +25 -2
- package/dist/react/index.d.ts +25 -2
- package/dist/react/index.mjs +1 -1
- package/dist/react/{recall-SBQ4LNRJ.mjs → recall-UCCIEG37.mjs} +1 -1
- package/dist/server/{chunk-QC4WHNIJ.mjs → chunk-ICGTS7X6.mjs} +40 -14
- package/dist/server/index.cjs +39 -13
- package/dist/server/index.mjs +1 -1
- package/dist/server/{recall-NLJNELJY.mjs → recall-5OW4RJVC.mjs} +1 -1
- package/package.json +2 -2
package/dist/client/index.mjs
CHANGED
|
@@ -1470,6 +1470,14 @@ var getConnectorsByProviderCallback = (options) => (options.client ?? client).ge
|
|
|
1470
1470
|
var getConnectorsByProviderConnect = (options) => (options.client ?? client).get({ url: "/connectors/{provider}/connect", ...options });
|
|
1471
1471
|
var getHealth = (options) => (options?.client ?? client).get({ url: "/health", ...options });
|
|
1472
1472
|
var getInternalAccountsByDidByDid = (options) => (options.client ?? client).get({ url: "/internal/accounts/by-did/{did}", ...options });
|
|
1473
|
+
var postInternalComplete = (options) => (options.client ?? client).post({
|
|
1474
|
+
url: "/internal/complete",
|
|
1475
|
+
...options,
|
|
1476
|
+
headers: {
|
|
1477
|
+
"Content-Type": "application/json",
|
|
1478
|
+
...options.headers
|
|
1479
|
+
}
|
|
1480
|
+
});
|
|
1473
1481
|
var postInternalEmbeddings = (options) => (options.client ?? client).post({
|
|
1474
1482
|
url: "/internal/embeddings",
|
|
1475
1483
|
...options,
|
|
@@ -1669,6 +1677,7 @@ export {
|
|
|
1669
1677
|
postAuthOauthByProviderExchange,
|
|
1670
1678
|
postAuthOauthByProviderRefresh,
|
|
1671
1679
|
postAuthOauthByProviderRevoke,
|
|
1680
|
+
postInternalComplete,
|
|
1672
1681
|
postInternalEmbeddings,
|
|
1673
1682
|
postInternalModerate,
|
|
1674
1683
|
postOauthConsent,
|
|
@@ -2381,10 +2381,12 @@ async function getAllVaultMemoriesOp(ctx, options) {
|
|
|
2381
2381
|
(raw) => vaultMemoryRawToStored(raw, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner)
|
|
2382
2382
|
);
|
|
2383
2383
|
}
|
|
2384
|
-
function baseVaultSql(ctx) {
|
|
2384
|
+
function baseVaultSql(ctx, options) {
|
|
2385
2385
|
const clauses = [
|
|
2386
2386
|
'"is_deleted" = 0',
|
|
2387
|
-
'
|
|
2387
|
+
// Mirrors `baseVaultConditions`' `includeArchived` branch. Defaults to
|
|
2388
|
+
// excluding archived rows, so every existing caller is unchanged.
|
|
2389
|
+
...options?.includeArchived ? [] : ['"archived_at" is null'],
|
|
2388
2390
|
`"trust_tier" is not 'quarantined'`,
|
|
2389
2391
|
'"superseded_by" is null'
|
|
2390
2392
|
];
|
|
@@ -2404,7 +2406,9 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
2404
2406
|
updatedAt: new Date(raw.updated_at)
|
|
2405
2407
|
});
|
|
2406
2408
|
try {
|
|
2407
|
-
const base = baseVaultSql(ctx
|
|
2409
|
+
const base = baseVaultSql(ctx, {
|
|
2410
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
2411
|
+
});
|
|
2408
2412
|
const clauses = [base.sql];
|
|
2409
2413
|
const args = [...base.args];
|
|
2410
2414
|
if (options?.scopes?.length) {
|
|
@@ -2415,6 +2419,10 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
2415
2419
|
clauses.push(options.folderId === null ? '"folder_id" is null' : '"folder_id" = ?');
|
|
2416
2420
|
if (options.folderId !== null) args.push(options.folderId);
|
|
2417
2421
|
}
|
|
2422
|
+
if (options?.factTypes?.length) {
|
|
2423
|
+
clauses.push(`"fact_type" in (${options.factTypes.map(() => "?").join(",")})`);
|
|
2424
|
+
args.push(...options.factTypes);
|
|
2425
|
+
}
|
|
2418
2426
|
const sql = `select "id", "scope", "folder_id", "embedding_model", "updated_at" from "memory_vault" where ${clauses.join(" and ")}`;
|
|
2419
2427
|
const rows = await ctx.vaultMemoryCollection.query(Q3.unsafeSqlQuery(sql, args)).unsafeFetchRaw();
|
|
2420
2428
|
return rows.map(mapRaw);
|
|
@@ -2423,15 +2431,18 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
2423
2431
|
"memoryVault: getVaultCandidateKeysOp projected SQL unavailable, using full-load fallback: " + (err instanceof Error ? err.message : String(err))
|
|
2424
2432
|
);
|
|
2425
2433
|
const conditions = [
|
|
2426
|
-
...baseVaultConditions(ctx
|
|
2434
|
+
...baseVaultConditions(ctx, {
|
|
2435
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
2436
|
+
}),
|
|
2427
2437
|
...options?.scopes?.length ? [Q3.where("scope", Q3.oneOf(options.scopes))] : [],
|
|
2428
|
-
...options?.folderId !== void 0 ? [Q3.where("folder_id", options.folderId)] : []
|
|
2438
|
+
...options?.folderId !== void 0 ? [Q3.where("folder_id", options.folderId)] : [],
|
|
2439
|
+
...options?.factTypes?.length ? [Q3.where("fact_type", Q3.oneOf(options.factTypes))] : []
|
|
2429
2440
|
];
|
|
2430
2441
|
const rows = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
2431
2442
|
return rows.map(mapRaw);
|
|
2432
2443
|
}
|
|
2433
2444
|
}
|
|
2434
|
-
async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
2445
|
+
async function getVaultEmbeddingsByIdsOp(ctx, ids, options) {
|
|
2435
2446
|
if (ids.length === 0) return [];
|
|
2436
2447
|
const mapRaw = (raw) => ({
|
|
2437
2448
|
uniqueId: raw.id,
|
|
@@ -2439,7 +2450,9 @@ async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
|
2439
2450
|
embeddingModel: raw.embedding_model ?? null
|
|
2440
2451
|
});
|
|
2441
2452
|
try {
|
|
2442
|
-
const base = baseVaultSql(ctx
|
|
2453
|
+
const base = baseVaultSql(ctx, {
|
|
2454
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
2455
|
+
});
|
|
2443
2456
|
const sql = `select "id", "embedding", "embedding_model" from "memory_vault" where ${base.sql} and "id" in (${ids.map(() => "?").join(",")})`;
|
|
2444
2457
|
const rows = await ctx.vaultMemoryCollection.query(Q3.unsafeSqlQuery(sql, [...base.args, ...ids])).unsafeFetchRaw();
|
|
2445
2458
|
return rows.map(mapRaw);
|
|
@@ -2447,13 +2460,25 @@ async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
|
2447
2460
|
getLogger().debug(
|
|
2448
2461
|
"memoryVault: getVaultEmbeddingsByIdsOp projected SQL unavailable, using full-load fallback: " + (err instanceof Error ? err.message : String(err))
|
|
2449
2462
|
);
|
|
2450
|
-
const rows = await ctx.vaultMemoryCollection.query(
|
|
2463
|
+
const rows = await ctx.vaultMemoryCollection.query(
|
|
2464
|
+
...baseVaultConditions(ctx, {
|
|
2465
|
+
...options?.includeArchived !== void 0 && {
|
|
2466
|
+
includeArchived: options.includeArchived
|
|
2467
|
+
}
|
|
2468
|
+
}),
|
|
2469
|
+
Q3.where("id", Q3.oneOf(ids))
|
|
2470
|
+
).unsafeFetchRaw();
|
|
2451
2471
|
return rows.map(mapRaw);
|
|
2452
2472
|
}
|
|
2453
2473
|
}
|
|
2454
|
-
async function getVaultMemoriesByIdsOp(ctx, ids) {
|
|
2474
|
+
async function getVaultMemoriesByIdsOp(ctx, ids, options) {
|
|
2455
2475
|
if (ids.length === 0) return [];
|
|
2456
|
-
const conditions = [
|
|
2476
|
+
const conditions = [
|
|
2477
|
+
...baseVaultConditions(ctx, {
|
|
2478
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
2479
|
+
}),
|
|
2480
|
+
Q3.where("id", Q3.oneOf(ids))
|
|
2481
|
+
];
|
|
2457
2482
|
const results = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
2458
2483
|
return mapInBatches(
|
|
2459
2484
|
results,
|
|
@@ -5158,6 +5183,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
5158
5183
|
vaultCtx,
|
|
5159
5184
|
Object.keys(queryOpts).length > 0 ? queryOpts : void 0
|
|
5160
5185
|
);
|
|
5186
|
+
const hydrateOpts = queryOpts.includeArchived ? { includeArchived: true } : void 0;
|
|
5161
5187
|
const vaultSize = keys.length;
|
|
5162
5188
|
if (keys.length === 0) {
|
|
5163
5189
|
return { memories: [], embeddedItems: [], queryEmbedding: [], vaultSize: 0 };
|
|
@@ -5179,7 +5205,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
5179
5205
|
else noVectorIds.push(k2.uniqueId);
|
|
5180
5206
|
}
|
|
5181
5207
|
if (missIds.length > 0) {
|
|
5182
|
-
const rows = await getVaultEmbeddingsByIdsOp(vaultCtx, missIds);
|
|
5208
|
+
const rows = await getVaultEmbeddingsByIdsOp(vaultCtx, missIds, hydrateOpts);
|
|
5183
5209
|
const gotVector = /* @__PURE__ */ new Set();
|
|
5184
5210
|
for (const r of rows) {
|
|
5185
5211
|
if (!r.embedding) continue;
|
|
@@ -5204,7 +5230,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
5204
5230
|
`memoryVault: projected search un-embedded lane capped at ${laneIds.length}/${noVectorIds.length}`
|
|
5205
5231
|
);
|
|
5206
5232
|
}
|
|
5207
|
-
const laneRows = (await getVaultMemoriesByIdsOp(vaultCtx, laneIds)).filter(
|
|
5233
|
+
const laneRows = (await getVaultMemoriesByIdsOp(vaultCtx, laneIds, hydrateOpts)).filter(
|
|
5208
5234
|
(m) => !isEncrypted(m.content)
|
|
5209
5235
|
);
|
|
5210
5236
|
if (laneRows.length > 0) {
|
|
@@ -5234,7 +5260,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
5234
5260
|
if (keyById.has(id)) admissionSet.add(id);
|
|
5235
5261
|
}
|
|
5236
5262
|
}
|
|
5237
|
-
const admittedRows = await getVaultMemoriesByIdsOp(vaultCtx, [...admissionSet]);
|
|
5263
|
+
const admittedRows = await getVaultMemoriesByIdsOp(vaultCtx, [...admissionSet], hydrateOpts);
|
|
5238
5264
|
const memories = admittedRows.filter((m) => !isEncrypted(m.content));
|
|
5239
5265
|
if (memories.length < admittedRows.length) {
|
|
5240
5266
|
getLogger().warn(
|
|
@@ -5598,7 +5624,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
5598
5624
|
legacy.map((r) => ({ id: r.uniqueId, content: r.content, score: r.similarity }))
|
|
5599
5625
|
);
|
|
5600
5626
|
}
|
|
5601
|
-
const { recall: recall2 } = await import("./recall-
|
|
5627
|
+
const { recall: recall2 } = await import("./recall-RSLYPJ5L.mjs");
|
|
5602
5628
|
const result = await recall2(
|
|
5603
5629
|
query,
|
|
5604
5630
|
{ vaultCtx, embeddingOptions, vaultCache: cache },
|
package/dist/expo/index.cjs
CHANGED
|
@@ -4622,10 +4622,12 @@ async function getAllVaultMemoriesOp(ctx, options) {
|
|
|
4622
4622
|
(raw) => vaultMemoryRawToStored(raw, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner)
|
|
4623
4623
|
);
|
|
4624
4624
|
}
|
|
4625
|
-
function baseVaultSql(ctx) {
|
|
4625
|
+
function baseVaultSql(ctx, options) {
|
|
4626
4626
|
const clauses = [
|
|
4627
4627
|
'"is_deleted" = 0',
|
|
4628
|
-
'
|
|
4628
|
+
// Mirrors `baseVaultConditions`' `includeArchived` branch. Defaults to
|
|
4629
|
+
// excluding archived rows, so every existing caller is unchanged.
|
|
4630
|
+
...options?.includeArchived ? [] : ['"archived_at" is null'],
|
|
4629
4631
|
`"trust_tier" is not 'quarantined'`,
|
|
4630
4632
|
'"superseded_by" is null'
|
|
4631
4633
|
];
|
|
@@ -4645,7 +4647,9 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
4645
4647
|
updatedAt: new Date(raw.updated_at)
|
|
4646
4648
|
});
|
|
4647
4649
|
try {
|
|
4648
|
-
const base = baseVaultSql(ctx
|
|
4650
|
+
const base = baseVaultSql(ctx, {
|
|
4651
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
4652
|
+
});
|
|
4649
4653
|
const clauses = [base.sql];
|
|
4650
4654
|
const args = [...base.args];
|
|
4651
4655
|
if (options?.scopes?.length) {
|
|
@@ -4656,6 +4660,10 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
4656
4660
|
clauses.push(options.folderId === null ? '"folder_id" is null' : '"folder_id" = ?');
|
|
4657
4661
|
if (options.folderId !== null) args.push(options.folderId);
|
|
4658
4662
|
}
|
|
4663
|
+
if (options?.factTypes?.length) {
|
|
4664
|
+
clauses.push(`"fact_type" in (${options.factTypes.map(() => "?").join(",")})`);
|
|
4665
|
+
args.push(...options.factTypes);
|
|
4666
|
+
}
|
|
4659
4667
|
const sql = `select "id", "scope", "folder_id", "embedding_model", "updated_at" from "memory_vault" where ${clauses.join(" and ")}`;
|
|
4660
4668
|
const rows = await ctx.vaultMemoryCollection.query(import_watermelondb9.Q.unsafeSqlQuery(sql, args)).unsafeFetchRaw();
|
|
4661
4669
|
return rows.map(mapRaw);
|
|
@@ -4664,15 +4672,18 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
4664
4672
|
"memoryVault: getVaultCandidateKeysOp projected SQL unavailable, using full-load fallback: " + (err instanceof Error ? err.message : String(err))
|
|
4665
4673
|
);
|
|
4666
4674
|
const conditions = [
|
|
4667
|
-
...baseVaultConditions(ctx
|
|
4675
|
+
...baseVaultConditions(ctx, {
|
|
4676
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
4677
|
+
}),
|
|
4668
4678
|
...options?.scopes?.length ? [import_watermelondb9.Q.where("scope", import_watermelondb9.Q.oneOf(options.scopes))] : [],
|
|
4669
|
-
...options?.folderId !== void 0 ? [import_watermelondb9.Q.where("folder_id", options.folderId)] : []
|
|
4679
|
+
...options?.folderId !== void 0 ? [import_watermelondb9.Q.where("folder_id", options.folderId)] : [],
|
|
4680
|
+
...options?.factTypes?.length ? [import_watermelondb9.Q.where("fact_type", import_watermelondb9.Q.oneOf(options.factTypes))] : []
|
|
4670
4681
|
];
|
|
4671
4682
|
const rows = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
4672
4683
|
return rows.map(mapRaw);
|
|
4673
4684
|
}
|
|
4674
4685
|
}
|
|
4675
|
-
async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
4686
|
+
async function getVaultEmbeddingsByIdsOp(ctx, ids, options) {
|
|
4676
4687
|
if (ids.length === 0) return [];
|
|
4677
4688
|
const mapRaw = (raw) => ({
|
|
4678
4689
|
uniqueId: raw.id,
|
|
@@ -4680,7 +4691,9 @@ async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
|
4680
4691
|
embeddingModel: raw.embedding_model ?? null
|
|
4681
4692
|
});
|
|
4682
4693
|
try {
|
|
4683
|
-
const base = baseVaultSql(ctx
|
|
4694
|
+
const base = baseVaultSql(ctx, {
|
|
4695
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
4696
|
+
});
|
|
4684
4697
|
const sql = `select "id", "embedding", "embedding_model" from "memory_vault" where ${base.sql} and "id" in (${ids.map(() => "?").join(",")})`;
|
|
4685
4698
|
const rows = await ctx.vaultMemoryCollection.query(import_watermelondb9.Q.unsafeSqlQuery(sql, [...base.args, ...ids])).unsafeFetchRaw();
|
|
4686
4699
|
return rows.map(mapRaw);
|
|
@@ -4688,13 +4701,25 @@ async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
|
4688
4701
|
getLogger().debug(
|
|
4689
4702
|
"memoryVault: getVaultEmbeddingsByIdsOp projected SQL unavailable, using full-load fallback: " + (err instanceof Error ? err.message : String(err))
|
|
4690
4703
|
);
|
|
4691
|
-
const rows = await ctx.vaultMemoryCollection.query(
|
|
4704
|
+
const rows = await ctx.vaultMemoryCollection.query(
|
|
4705
|
+
...baseVaultConditions(ctx, {
|
|
4706
|
+
...options?.includeArchived !== void 0 && {
|
|
4707
|
+
includeArchived: options.includeArchived
|
|
4708
|
+
}
|
|
4709
|
+
}),
|
|
4710
|
+
import_watermelondb9.Q.where("id", import_watermelondb9.Q.oneOf(ids))
|
|
4711
|
+
).unsafeFetchRaw();
|
|
4692
4712
|
return rows.map(mapRaw);
|
|
4693
4713
|
}
|
|
4694
4714
|
}
|
|
4695
|
-
async function getVaultMemoriesByIdsOp(ctx, ids) {
|
|
4715
|
+
async function getVaultMemoriesByIdsOp(ctx, ids, options) {
|
|
4696
4716
|
if (ids.length === 0) return [];
|
|
4697
|
-
const conditions = [
|
|
4717
|
+
const conditions = [
|
|
4718
|
+
...baseVaultConditions(ctx, {
|
|
4719
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
4720
|
+
}),
|
|
4721
|
+
import_watermelondb9.Q.where("id", import_watermelondb9.Q.oneOf(ids))
|
|
4722
|
+
];
|
|
4698
4723
|
const results = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
4699
4724
|
return mapInBatches(
|
|
4700
4725
|
results,
|
|
@@ -7277,6 +7302,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
7277
7302
|
vaultCtx,
|
|
7278
7303
|
Object.keys(queryOpts).length > 0 ? queryOpts : void 0
|
|
7279
7304
|
);
|
|
7305
|
+
const hydrateOpts = queryOpts.includeArchived ? { includeArchived: true } : void 0;
|
|
7280
7306
|
const vaultSize = keys.length;
|
|
7281
7307
|
if (keys.length === 0) {
|
|
7282
7308
|
return { memories: [], embeddedItems: [], queryEmbedding: [], vaultSize: 0 };
|
|
@@ -7298,7 +7324,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
7298
7324
|
else noVectorIds.push(k2.uniqueId);
|
|
7299
7325
|
}
|
|
7300
7326
|
if (missIds.length > 0) {
|
|
7301
|
-
const rows = await getVaultEmbeddingsByIdsOp(vaultCtx, missIds);
|
|
7327
|
+
const rows = await getVaultEmbeddingsByIdsOp(vaultCtx, missIds, hydrateOpts);
|
|
7302
7328
|
const gotVector = /* @__PURE__ */ new Set();
|
|
7303
7329
|
for (const r of rows) {
|
|
7304
7330
|
if (!r.embedding) continue;
|
|
@@ -7323,7 +7349,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
7323
7349
|
`memoryVault: projected search un-embedded lane capped at ${laneIds.length}/${noVectorIds.length}`
|
|
7324
7350
|
);
|
|
7325
7351
|
}
|
|
7326
|
-
const laneRows = (await getVaultMemoriesByIdsOp(vaultCtx, laneIds)).filter(
|
|
7352
|
+
const laneRows = (await getVaultMemoriesByIdsOp(vaultCtx, laneIds, hydrateOpts)).filter(
|
|
7327
7353
|
(m) => !isEncrypted(m.content)
|
|
7328
7354
|
);
|
|
7329
7355
|
if (laneRows.length > 0) {
|
|
@@ -7353,7 +7379,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
7353
7379
|
if (keyById.has(id)) admissionSet.add(id);
|
|
7354
7380
|
}
|
|
7355
7381
|
}
|
|
7356
|
-
const admittedRows = await getVaultMemoriesByIdsOp(vaultCtx, [...admissionSet]);
|
|
7382
|
+
const admittedRows = await getVaultMemoriesByIdsOp(vaultCtx, [...admissionSet], hydrateOpts);
|
|
7357
7383
|
const memories = admittedRows.filter((m) => !isEncrypted(m.content));
|
|
7358
7384
|
if (memories.length < admittedRows.length) {
|
|
7359
7385
|
getLogger().warn(
|
package/dist/expo/index.mjs
CHANGED
|
@@ -2554,10 +2554,12 @@ async function getVaultRankingProjectionsOp(ctx, options) {
|
|
|
2554
2554
|
const results = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
2555
2555
|
return results.map(vaultMemoryRawToRankable);
|
|
2556
2556
|
}
|
|
2557
|
-
function baseVaultSql(ctx) {
|
|
2557
|
+
function baseVaultSql(ctx, options) {
|
|
2558
2558
|
const clauses = [
|
|
2559
2559
|
'"is_deleted" = 0',
|
|
2560
|
-
'
|
|
2560
|
+
// Mirrors `baseVaultConditions`' `includeArchived` branch. Defaults to
|
|
2561
|
+
// excluding archived rows, so every existing caller is unchanged.
|
|
2562
|
+
...options?.includeArchived ? [] : ['"archived_at" is null'],
|
|
2561
2563
|
`"trust_tier" is not 'quarantined'`,
|
|
2562
2564
|
'"superseded_by" is null'
|
|
2563
2565
|
];
|
|
@@ -2577,7 +2579,9 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
2577
2579
|
updatedAt: new Date(raw.updated_at)
|
|
2578
2580
|
});
|
|
2579
2581
|
try {
|
|
2580
|
-
const base = baseVaultSql(ctx
|
|
2582
|
+
const base = baseVaultSql(ctx, {
|
|
2583
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
2584
|
+
});
|
|
2581
2585
|
const clauses = [base.sql];
|
|
2582
2586
|
const args = [...base.args];
|
|
2583
2587
|
if (options?.scopes?.length) {
|
|
@@ -2588,6 +2592,10 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
2588
2592
|
clauses.push(options.folderId === null ? '"folder_id" is null' : '"folder_id" = ?');
|
|
2589
2593
|
if (options.folderId !== null) args.push(options.folderId);
|
|
2590
2594
|
}
|
|
2595
|
+
if (options?.factTypes?.length) {
|
|
2596
|
+
clauses.push(`"fact_type" in (${options.factTypes.map(() => "?").join(",")})`);
|
|
2597
|
+
args.push(...options.factTypes);
|
|
2598
|
+
}
|
|
2591
2599
|
const sql = `select "id", "scope", "folder_id", "embedding_model", "updated_at" from "memory_vault" where ${clauses.join(" and ")}`;
|
|
2592
2600
|
const rows = await ctx.vaultMemoryCollection.query(Q3.unsafeSqlQuery(sql, args)).unsafeFetchRaw();
|
|
2593
2601
|
return rows.map(mapRaw);
|
|
@@ -2596,15 +2604,18 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
2596
2604
|
"memoryVault: getVaultCandidateKeysOp projected SQL unavailable, using full-load fallback: " + (err instanceof Error ? err.message : String(err))
|
|
2597
2605
|
);
|
|
2598
2606
|
const conditions = [
|
|
2599
|
-
...baseVaultConditions(ctx
|
|
2607
|
+
...baseVaultConditions(ctx, {
|
|
2608
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
2609
|
+
}),
|
|
2600
2610
|
...options?.scopes?.length ? [Q3.where("scope", Q3.oneOf(options.scopes))] : [],
|
|
2601
|
-
...options?.folderId !== void 0 ? [Q3.where("folder_id", options.folderId)] : []
|
|
2611
|
+
...options?.folderId !== void 0 ? [Q3.where("folder_id", options.folderId)] : [],
|
|
2612
|
+
...options?.factTypes?.length ? [Q3.where("fact_type", Q3.oneOf(options.factTypes))] : []
|
|
2602
2613
|
];
|
|
2603
2614
|
const rows = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
2604
2615
|
return rows.map(mapRaw);
|
|
2605
2616
|
}
|
|
2606
2617
|
}
|
|
2607
|
-
async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
2618
|
+
async function getVaultEmbeddingsByIdsOp(ctx, ids, options) {
|
|
2608
2619
|
if (ids.length === 0) return [];
|
|
2609
2620
|
const mapRaw = (raw) => ({
|
|
2610
2621
|
uniqueId: raw.id,
|
|
@@ -2612,7 +2623,9 @@ async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
|
2612
2623
|
embeddingModel: raw.embedding_model ?? null
|
|
2613
2624
|
});
|
|
2614
2625
|
try {
|
|
2615
|
-
const base = baseVaultSql(ctx
|
|
2626
|
+
const base = baseVaultSql(ctx, {
|
|
2627
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
2628
|
+
});
|
|
2616
2629
|
const sql = `select "id", "embedding", "embedding_model" from "memory_vault" where ${base.sql} and "id" in (${ids.map(() => "?").join(",")})`;
|
|
2617
2630
|
const rows = await ctx.vaultMemoryCollection.query(Q3.unsafeSqlQuery(sql, [...base.args, ...ids])).unsafeFetchRaw();
|
|
2618
2631
|
return rows.map(mapRaw);
|
|
@@ -2620,13 +2633,25 @@ async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
|
2620
2633
|
getLogger().debug(
|
|
2621
2634
|
"memoryVault: getVaultEmbeddingsByIdsOp projected SQL unavailable, using full-load fallback: " + (err instanceof Error ? err.message : String(err))
|
|
2622
2635
|
);
|
|
2623
|
-
const rows = await ctx.vaultMemoryCollection.query(
|
|
2636
|
+
const rows = await ctx.vaultMemoryCollection.query(
|
|
2637
|
+
...baseVaultConditions(ctx, {
|
|
2638
|
+
...options?.includeArchived !== void 0 && {
|
|
2639
|
+
includeArchived: options.includeArchived
|
|
2640
|
+
}
|
|
2641
|
+
}),
|
|
2642
|
+
Q3.where("id", Q3.oneOf(ids))
|
|
2643
|
+
).unsafeFetchRaw();
|
|
2624
2644
|
return rows.map(mapRaw);
|
|
2625
2645
|
}
|
|
2626
2646
|
}
|
|
2627
|
-
async function getVaultMemoriesByIdsOp(ctx, ids) {
|
|
2647
|
+
async function getVaultMemoriesByIdsOp(ctx, ids, options) {
|
|
2628
2648
|
if (ids.length === 0) return [];
|
|
2629
|
-
const conditions = [
|
|
2649
|
+
const conditions = [
|
|
2650
|
+
...baseVaultConditions(ctx, {
|
|
2651
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
2652
|
+
}),
|
|
2653
|
+
Q3.where("id", Q3.oneOf(ids))
|
|
2654
|
+
];
|
|
2630
2655
|
const results = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
2631
2656
|
return mapInBatches(
|
|
2632
2657
|
results,
|
|
@@ -5459,6 +5484,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
5459
5484
|
vaultCtx,
|
|
5460
5485
|
Object.keys(queryOpts).length > 0 ? queryOpts : void 0
|
|
5461
5486
|
);
|
|
5487
|
+
const hydrateOpts = queryOpts.includeArchived ? { includeArchived: true } : void 0;
|
|
5462
5488
|
const vaultSize = keys.length;
|
|
5463
5489
|
if (keys.length === 0) {
|
|
5464
5490
|
return { memories: [], embeddedItems: [], queryEmbedding: [], vaultSize: 0 };
|
|
@@ -5480,7 +5506,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
5480
5506
|
else noVectorIds.push(k2.uniqueId);
|
|
5481
5507
|
}
|
|
5482
5508
|
if (missIds.length > 0) {
|
|
5483
|
-
const rows = await getVaultEmbeddingsByIdsOp(vaultCtx, missIds);
|
|
5509
|
+
const rows = await getVaultEmbeddingsByIdsOp(vaultCtx, missIds, hydrateOpts);
|
|
5484
5510
|
const gotVector = /* @__PURE__ */ new Set();
|
|
5485
5511
|
for (const r of rows) {
|
|
5486
5512
|
if (!r.embedding) continue;
|
|
@@ -5505,7 +5531,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
5505
5531
|
`memoryVault: projected search un-embedded lane capped at ${laneIds.length}/${noVectorIds.length}`
|
|
5506
5532
|
);
|
|
5507
5533
|
}
|
|
5508
|
-
const laneRows = (await getVaultMemoriesByIdsOp(vaultCtx, laneIds)).filter(
|
|
5534
|
+
const laneRows = (await getVaultMemoriesByIdsOp(vaultCtx, laneIds, hydrateOpts)).filter(
|
|
5509
5535
|
(m) => !isEncrypted(m.content)
|
|
5510
5536
|
);
|
|
5511
5537
|
if (laneRows.length > 0) {
|
|
@@ -5535,7 +5561,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
5535
5561
|
if (keyById.has(id)) admissionSet.add(id);
|
|
5536
5562
|
}
|
|
5537
5563
|
}
|
|
5538
|
-
const admittedRows = await getVaultMemoriesByIdsOp(vaultCtx, [...admissionSet]);
|
|
5564
|
+
const admittedRows = await getVaultMemoriesByIdsOp(vaultCtx, [...admissionSet], hydrateOpts);
|
|
5539
5565
|
const memories = admittedRows.filter((m) => !isEncrypted(m.content));
|
|
5540
5566
|
if (memories.length < admittedRows.length) {
|
|
5541
5567
|
getLogger().warn(
|
|
@@ -5899,7 +5925,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
5899
5925
|
legacy.map((r) => ({ id: r.uniqueId, content: r.content, score: r.similarity }))
|
|
5900
5926
|
);
|
|
5901
5927
|
}
|
|
5902
|
-
const { recall: recall2 } = await import("./recall-
|
|
5928
|
+
const { recall: recall2 } = await import("./recall-UCCIEG37.mjs");
|
|
5903
5929
|
const result = await recall2(
|
|
5904
5930
|
query,
|
|
5905
5931
|
{ vaultCtx, embeddingOptions, vaultCache: cache },
|
package/dist/react/index.cjs
CHANGED
|
@@ -4866,10 +4866,12 @@ async function getVaultRankingProjectionsOp(ctx, options) {
|
|
|
4866
4866
|
const results = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
4867
4867
|
return results.map(vaultMemoryRawToRankable);
|
|
4868
4868
|
}
|
|
4869
|
-
function baseVaultSql(ctx) {
|
|
4869
|
+
function baseVaultSql(ctx, options) {
|
|
4870
4870
|
const clauses = [
|
|
4871
4871
|
'"is_deleted" = 0',
|
|
4872
|
-
'
|
|
4872
|
+
// Mirrors `baseVaultConditions`' `includeArchived` branch. Defaults to
|
|
4873
|
+
// excluding archived rows, so every existing caller is unchanged.
|
|
4874
|
+
...options?.includeArchived ? [] : ['"archived_at" is null'],
|
|
4873
4875
|
`"trust_tier" is not 'quarantined'`,
|
|
4874
4876
|
'"superseded_by" is null'
|
|
4875
4877
|
];
|
|
@@ -4889,7 +4891,9 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
4889
4891
|
updatedAt: new Date(raw.updated_at)
|
|
4890
4892
|
});
|
|
4891
4893
|
try {
|
|
4892
|
-
const base = baseVaultSql(ctx
|
|
4894
|
+
const base = baseVaultSql(ctx, {
|
|
4895
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
4896
|
+
});
|
|
4893
4897
|
const clauses = [base.sql];
|
|
4894
4898
|
const args = [...base.args];
|
|
4895
4899
|
if (options?.scopes?.length) {
|
|
@@ -4900,6 +4904,10 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
4900
4904
|
clauses.push(options.folderId === null ? '"folder_id" is null' : '"folder_id" = ?');
|
|
4901
4905
|
if (options.folderId !== null) args.push(options.folderId);
|
|
4902
4906
|
}
|
|
4907
|
+
if (options?.factTypes?.length) {
|
|
4908
|
+
clauses.push(`"fact_type" in (${options.factTypes.map(() => "?").join(",")})`);
|
|
4909
|
+
args.push(...options.factTypes);
|
|
4910
|
+
}
|
|
4903
4911
|
const sql = `select "id", "scope", "folder_id", "embedding_model", "updated_at" from "memory_vault" where ${clauses.join(" and ")}`;
|
|
4904
4912
|
const rows = await ctx.vaultMemoryCollection.query(import_watermelondb10.Q.unsafeSqlQuery(sql, args)).unsafeFetchRaw();
|
|
4905
4913
|
return rows.map(mapRaw);
|
|
@@ -4908,15 +4916,18 @@ async function getVaultCandidateKeysOp(ctx, options) {
|
|
|
4908
4916
|
"memoryVault: getVaultCandidateKeysOp projected SQL unavailable, using full-load fallback: " + (err instanceof Error ? err.message : String(err))
|
|
4909
4917
|
);
|
|
4910
4918
|
const conditions = [
|
|
4911
|
-
...baseVaultConditions(ctx
|
|
4919
|
+
...baseVaultConditions(ctx, {
|
|
4920
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
4921
|
+
}),
|
|
4912
4922
|
...options?.scopes?.length ? [import_watermelondb10.Q.where("scope", import_watermelondb10.Q.oneOf(options.scopes))] : [],
|
|
4913
|
-
...options?.folderId !== void 0 ? [import_watermelondb10.Q.where("folder_id", options.folderId)] : []
|
|
4923
|
+
...options?.folderId !== void 0 ? [import_watermelondb10.Q.where("folder_id", options.folderId)] : [],
|
|
4924
|
+
...options?.factTypes?.length ? [import_watermelondb10.Q.where("fact_type", import_watermelondb10.Q.oneOf(options.factTypes))] : []
|
|
4914
4925
|
];
|
|
4915
4926
|
const rows = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
4916
4927
|
return rows.map(mapRaw);
|
|
4917
4928
|
}
|
|
4918
4929
|
}
|
|
4919
|
-
async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
4930
|
+
async function getVaultEmbeddingsByIdsOp(ctx, ids, options) {
|
|
4920
4931
|
if (ids.length === 0) return [];
|
|
4921
4932
|
const mapRaw = (raw) => ({
|
|
4922
4933
|
uniqueId: raw.id,
|
|
@@ -4924,7 +4935,9 @@ async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
|
4924
4935
|
embeddingModel: raw.embedding_model ?? null
|
|
4925
4936
|
});
|
|
4926
4937
|
try {
|
|
4927
|
-
const base = baseVaultSql(ctx
|
|
4938
|
+
const base = baseVaultSql(ctx, {
|
|
4939
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
4940
|
+
});
|
|
4928
4941
|
const sql = `select "id", "embedding", "embedding_model" from "memory_vault" where ${base.sql} and "id" in (${ids.map(() => "?").join(",")})`;
|
|
4929
4942
|
const rows = await ctx.vaultMemoryCollection.query(import_watermelondb10.Q.unsafeSqlQuery(sql, [...base.args, ...ids])).unsafeFetchRaw();
|
|
4930
4943
|
return rows.map(mapRaw);
|
|
@@ -4932,13 +4945,25 @@ async function getVaultEmbeddingsByIdsOp(ctx, ids) {
|
|
|
4932
4945
|
getLogger().debug(
|
|
4933
4946
|
"memoryVault: getVaultEmbeddingsByIdsOp projected SQL unavailable, using full-load fallback: " + (err instanceof Error ? err.message : String(err))
|
|
4934
4947
|
);
|
|
4935
|
-
const rows = await ctx.vaultMemoryCollection.query(
|
|
4948
|
+
const rows = await ctx.vaultMemoryCollection.query(
|
|
4949
|
+
...baseVaultConditions(ctx, {
|
|
4950
|
+
...options?.includeArchived !== void 0 && {
|
|
4951
|
+
includeArchived: options.includeArchived
|
|
4952
|
+
}
|
|
4953
|
+
}),
|
|
4954
|
+
import_watermelondb10.Q.where("id", import_watermelondb10.Q.oneOf(ids))
|
|
4955
|
+
).unsafeFetchRaw();
|
|
4936
4956
|
return rows.map(mapRaw);
|
|
4937
4957
|
}
|
|
4938
4958
|
}
|
|
4939
|
-
async function getVaultMemoriesByIdsOp(ctx, ids) {
|
|
4959
|
+
async function getVaultMemoriesByIdsOp(ctx, ids, options) {
|
|
4940
4960
|
if (ids.length === 0) return [];
|
|
4941
|
-
const conditions = [
|
|
4961
|
+
const conditions = [
|
|
4962
|
+
...baseVaultConditions(ctx, {
|
|
4963
|
+
...options?.includeArchived !== void 0 && { includeArchived: options.includeArchived }
|
|
4964
|
+
}),
|
|
4965
|
+
import_watermelondb10.Q.where("id", import_watermelondb10.Q.oneOf(ids))
|
|
4966
|
+
];
|
|
4942
4967
|
const results = await ctx.vaultMemoryCollection.query(...conditions).unsafeFetchRaw();
|
|
4943
4968
|
return mapInBatches(
|
|
4944
4969
|
results,
|
|
@@ -7578,6 +7603,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
7578
7603
|
vaultCtx,
|
|
7579
7604
|
Object.keys(queryOpts).length > 0 ? queryOpts : void 0
|
|
7580
7605
|
);
|
|
7606
|
+
const hydrateOpts = queryOpts.includeArchived ? { includeArchived: true } : void 0;
|
|
7581
7607
|
const vaultSize = keys.length;
|
|
7582
7608
|
if (keys.length === 0) {
|
|
7583
7609
|
return { memories: [], embeddedItems: [], queryEmbedding: [], vaultSize: 0 };
|
|
@@ -7599,7 +7625,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
7599
7625
|
else noVectorIds.push(k2.uniqueId);
|
|
7600
7626
|
}
|
|
7601
7627
|
if (missIds.length > 0) {
|
|
7602
|
-
const rows = await getVaultEmbeddingsByIdsOp(vaultCtx, missIds);
|
|
7628
|
+
const rows = await getVaultEmbeddingsByIdsOp(vaultCtx, missIds, hydrateOpts);
|
|
7603
7629
|
const gotVector = /* @__PURE__ */ new Set();
|
|
7604
7630
|
for (const r of rows) {
|
|
7605
7631
|
if (!r.embedding) continue;
|
|
@@ -7624,7 +7650,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
7624
7650
|
`memoryVault: projected search un-embedded lane capped at ${laneIds.length}/${noVectorIds.length}`
|
|
7625
7651
|
);
|
|
7626
7652
|
}
|
|
7627
|
-
const laneRows = (await getVaultMemoriesByIdsOp(vaultCtx, laneIds)).filter(
|
|
7653
|
+
const laneRows = (await getVaultMemoriesByIdsOp(vaultCtx, laneIds, hydrateOpts)).filter(
|
|
7628
7654
|
(m) => !isEncrypted(m.content)
|
|
7629
7655
|
);
|
|
7630
7656
|
if (laneRows.length > 0) {
|
|
@@ -7654,7 +7680,7 @@ async function buildProjectedCorpus(query, vaultCtx, embeddingOptions, cache, qu
|
|
|
7654
7680
|
if (keyById.has(id)) admissionSet.add(id);
|
|
7655
7681
|
}
|
|
7656
7682
|
}
|
|
7657
|
-
const admittedRows = await getVaultMemoriesByIdsOp(vaultCtx, [...admissionSet]);
|
|
7683
|
+
const admittedRows = await getVaultMemoriesByIdsOp(vaultCtx, [...admissionSet], hydrateOpts);
|
|
7658
7684
|
const memories = admittedRows.filter((m) => !isEncrypted(m.content));
|
|
7659
7685
|
if (memories.length < admittedRows.length) {
|
|
7660
7686
|
getLogger().warn(
|
package/dist/react/index.d.mts
CHANGED
|
@@ -7243,6 +7243,16 @@ interface VaultCandidateKey {
|
|
|
7243
7243
|
declare function getVaultCandidateKeysOp(ctx: VaultMemoryOperationsContext, options?: {
|
|
7244
7244
|
scopes?: string[];
|
|
7245
7245
|
folderId?: string | null;
|
|
7246
|
+
/**
|
|
7247
|
+
* Typed memory (PR1) — restrict to these fact types. Omit for no filter.
|
|
7248
|
+
* MUST stay in step with `getAllVaultMemoriesOp`: this op backs the
|
|
7249
|
+
* decrypt-last search path, and the two paths are meant to return the same
|
|
7250
|
+
* candidate set for the same query. Dropping it here made typed recall
|
|
7251
|
+
* silently path-dependent (#779).
|
|
7252
|
+
*/
|
|
7253
|
+
factTypes?: string[];
|
|
7254
|
+
/** Include archived (decayed) memories. Default `false`, as elsewhere. */
|
|
7255
|
+
includeArchived?: boolean;
|
|
7246
7256
|
}): Promise<VaultCandidateKey[]>;
|
|
7247
7257
|
/**
|
|
7248
7258
|
* Column-projected embedding lookup for a KNOWN set of ids — id + embedding +
|
|
@@ -7252,7 +7262,16 @@ declare function getVaultCandidateKeysOp(ctx: VaultMemoryOperationsContext, opti
|
|
|
7252
7262
|
* OPFS-SQLite, falling back to the standard Q query + unsafeFetchRaw on
|
|
7253
7263
|
* LokiJS (Q.unsafeSqlQuery throws there).
|
|
7254
7264
|
*/
|
|
7255
|
-
declare function getVaultEmbeddingsByIdsOp(ctx: VaultMemoryOperationsContext, ids: string[]
|
|
7265
|
+
declare function getVaultEmbeddingsByIdsOp(ctx: VaultMemoryOperationsContext, ids: string[],
|
|
7266
|
+
/**
|
|
7267
|
+
* Must match whatever admitted these ids. The caller has already filtered the
|
|
7268
|
+
* candidate set; re-applying a DEFAULT-ON exclusion here silently deletes rows
|
|
7269
|
+
* it deliberately admitted — which is how archived rows passed the key scan
|
|
7270
|
+
* and then vanished at hydration (#779).
|
|
7271
|
+
*/
|
|
7272
|
+
options?: {
|
|
7273
|
+
includeArchived?: boolean;
|
|
7274
|
+
}): Promise<Array<{
|
|
7256
7275
|
uniqueId: string;
|
|
7257
7276
|
embedding: string | null;
|
|
7258
7277
|
embeddingModel: string | null;
|
|
@@ -7270,7 +7289,11 @@ declare function getVaultEmbeddingsByIdsOp(ctx: VaultMemoryOperationsContext, id
|
|
|
7270
7289
|
* excluded exactly as they are from recall — a caller can pass any id list and
|
|
7271
7290
|
* only its own live rows come back.
|
|
7272
7291
|
*/
|
|
7273
|
-
declare function getVaultMemoriesByIdsOp(ctx: VaultMemoryOperationsContext, ids: string[]
|
|
7292
|
+
declare function getVaultMemoriesByIdsOp(ctx: VaultMemoryOperationsContext, ids: string[],
|
|
7293
|
+
/** See {@link getVaultEmbeddingsByIdsOp} — must match what admitted these ids. */
|
|
7294
|
+
options?: {
|
|
7295
|
+
includeArchived?: boolean;
|
|
7296
|
+
}): Promise<StoredVaultMemory[]>;
|
|
7274
7297
|
declare function getAllVaultMemoryContentsOp(ctx: VaultMemoryOperationsContext, options?: {
|
|
7275
7298
|
since?: Date;
|
|
7276
7299
|
}): Promise<string[]>;
|