@anuma/sdk 3.1.1 → 3.1.2
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/expo/{chunk-IP2B74KE.mjs → chunk-JVL5PLZS.mjs} +15 -15
- package/dist/expo/index.cjs +17 -15
- package/dist/expo/index.mjs +4 -2
- package/dist/expo/{recall-NSSIYFNY.mjs → recall-WPKWZM5N.mjs} +1 -1
- package/dist/react/{chunk-XVC7DWDN.mjs → chunk-3KGACSSP.mjs} +15 -15
- package/dist/react/index.cjs +17 -15
- package/dist/react/index.mjs +4 -2
- package/dist/react/{recall-VDP3H3QT.mjs → recall-NG2P5ZQ7.mjs} +1 -1
- package/dist/server/{chunk-4GKKHVF7.mjs → chunk-A4V7FRZ6.mjs} +16 -15
- package/dist/server/index.cjs +19 -15
- package/dist/server/index.d.mts +8 -1
- package/dist/server/index.d.ts +8 -1
- package/dist/server/index.mjs +6 -2
- package/dist/server/{recall-KYSR3XZJ.mjs → recall-2K7IOKY3.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1474,6 +1474,18 @@ async function upsertMessageOp(ctx, opts) {
|
|
|
1474
1474
|
const updated = await _updateMessageOp(ctx, opts.uniqueId, updateOpts);
|
|
1475
1475
|
return updated ?? messageToStored(existing, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
1476
1476
|
}
|
|
1477
|
+
async function getMessageOp(ctx, uniqueId) {
|
|
1478
|
+
let message;
|
|
1479
|
+
try {
|
|
1480
|
+
message = await ctx.messagesCollection.find(uniqueId);
|
|
1481
|
+
} catch (error) {
|
|
1482
|
+
if (error instanceof Error && /not found/i.test(error.message)) {
|
|
1483
|
+
return null;
|
|
1484
|
+
}
|
|
1485
|
+
throw error;
|
|
1486
|
+
}
|
|
1487
|
+
return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
1488
|
+
}
|
|
1477
1489
|
async function updateMessageEmbeddingOp(ctx, uniqueId, vector, embeddingModel) {
|
|
1478
1490
|
let message;
|
|
1479
1491
|
try {
|
|
@@ -2904,13 +2916,7 @@ async function generateEmbeddings(texts, options) {
|
|
|
2904
2916
|
// src/lib/memoryEngine/embeddings.ts
|
|
2905
2917
|
var DEFAULT_MIN_CONTENT_LENGTH = 10;
|
|
2906
2918
|
async function embedMessage(ctx, messageId, options) {
|
|
2907
|
-
|
|
2908
|
-
const conversations = await getConversationsOp(ctx);
|
|
2909
|
-
for (const conv of conversations) {
|
|
2910
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
2911
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
2912
|
-
if (message) break;
|
|
2913
|
-
}
|
|
2919
|
+
const message = await getMessageOp(ctx, messageId);
|
|
2914
2920
|
if (!message) {
|
|
2915
2921
|
return null;
|
|
2916
2922
|
}
|
|
@@ -2956,13 +2962,7 @@ async function embedAllMessages(ctx, options, filter) {
|
|
|
2956
2962
|
}
|
|
2957
2963
|
async function chunkAndEmbedMessage(ctx, messageId, options) {
|
|
2958
2964
|
const { chunkSize = DEFAULT_CHUNK_SIZE } = options;
|
|
2959
|
-
|
|
2960
|
-
const conversations = await getConversationsOp(ctx);
|
|
2961
|
-
for (const conv of conversations) {
|
|
2962
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
2963
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
2964
|
-
if (message) break;
|
|
2965
|
-
}
|
|
2965
|
+
const message = await getMessageOp(ctx, messageId);
|
|
2966
2966
|
if (!message) {
|
|
2967
2967
|
return null;
|
|
2968
2968
|
}
|
|
@@ -4322,7 +4322,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
4322
4322
|
legacy.map((r) => ({ id: r.uniqueId, content: r.content, score: r.similarity }))
|
|
4323
4323
|
);
|
|
4324
4324
|
}
|
|
4325
|
-
const { recall: recall2 } = await import("./recall-
|
|
4325
|
+
const { recall: recall2 } = await import("./recall-WPKWZM5N.mjs");
|
|
4326
4326
|
const result = await recall2(
|
|
4327
4327
|
query,
|
|
4328
4328
|
{ vaultCtx, embeddingOptions, vaultCache: cache },
|
package/dist/expo/index.cjs
CHANGED
|
@@ -1585,6 +1585,18 @@ async function upsertMessageOp(ctx, opts) {
|
|
|
1585
1585
|
const updated = await _updateMessageOp(ctx, opts.uniqueId, updateOpts);
|
|
1586
1586
|
return updated ?? messageToStored(existing, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
1587
1587
|
}
|
|
1588
|
+
async function getMessageOp(ctx, uniqueId) {
|
|
1589
|
+
let message;
|
|
1590
|
+
try {
|
|
1591
|
+
message = await ctx.messagesCollection.find(uniqueId);
|
|
1592
|
+
} catch (error) {
|
|
1593
|
+
if (error instanceof Error && /not found/i.test(error.message)) {
|
|
1594
|
+
return null;
|
|
1595
|
+
}
|
|
1596
|
+
throw error;
|
|
1597
|
+
}
|
|
1598
|
+
return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
1599
|
+
}
|
|
1588
1600
|
async function updateMessageEmbeddingOp(ctx, uniqueId, vector, embeddingModel) {
|
|
1589
1601
|
let message;
|
|
1590
1602
|
try {
|
|
@@ -2274,13 +2286,7 @@ var init_generate = __esm({
|
|
|
2274
2286
|
|
|
2275
2287
|
// src/lib/memoryEngine/embeddings.ts
|
|
2276
2288
|
async function embedMessage(ctx, messageId, options) {
|
|
2277
|
-
|
|
2278
|
-
const conversations = await getConversationsOp(ctx);
|
|
2279
|
-
for (const conv of conversations) {
|
|
2280
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
2281
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
2282
|
-
if (message) break;
|
|
2283
|
-
}
|
|
2289
|
+
const message = await getMessageOp(ctx, messageId);
|
|
2284
2290
|
if (!message) {
|
|
2285
2291
|
return null;
|
|
2286
2292
|
}
|
|
@@ -2326,13 +2332,7 @@ async function embedAllMessages(ctx, options, filter) {
|
|
|
2326
2332
|
}
|
|
2327
2333
|
async function chunkAndEmbedMessage(ctx, messageId, options) {
|
|
2328
2334
|
const { chunkSize = DEFAULT_CHUNK_SIZE } = options;
|
|
2329
|
-
|
|
2330
|
-
const conversations = await getConversationsOp(ctx);
|
|
2331
|
-
for (const conv of conversations) {
|
|
2332
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
2333
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
2334
|
-
if (message) break;
|
|
2335
|
-
}
|
|
2335
|
+
const message = await getMessageOp(ctx, messageId);
|
|
2336
2336
|
if (!message) {
|
|
2337
2337
|
return null;
|
|
2338
2338
|
}
|
|
@@ -14001,7 +14001,9 @@ function createRecallTool(ctx, toolOptions, callbacks) {
|
|
|
14001
14001
|
return formatRecallResult(result.memories);
|
|
14002
14002
|
} catch (error) {
|
|
14003
14003
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
14004
|
-
|
|
14004
|
+
const wrapped = new Error(`recall_memory: search failed \u2014 ${message}`);
|
|
14005
|
+
wrapped.cause = error;
|
|
14006
|
+
throw wrapped;
|
|
14005
14007
|
}
|
|
14006
14008
|
}
|
|
14007
14009
|
};
|
package/dist/expo/index.mjs
CHANGED
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
upsertMessageOp,
|
|
88
88
|
useEncryption,
|
|
89
89
|
vaultMemoryToStored
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-JVL5PLZS.mjs";
|
|
91
91
|
import {
|
|
92
92
|
PII_PATTERNS,
|
|
93
93
|
PiiRedactor,
|
|
@@ -7633,7 +7633,9 @@ function createRecallTool(ctx, toolOptions, callbacks) {
|
|
|
7633
7633
|
return formatRecallResult(result.memories);
|
|
7634
7634
|
} catch (error) {
|
|
7635
7635
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
7636
|
-
|
|
7636
|
+
const wrapped = new Error(`recall_memory: search failed \u2014 ${message}`);
|
|
7637
|
+
wrapped.cause = error;
|
|
7638
|
+
throw wrapped;
|
|
7637
7639
|
}
|
|
7638
7640
|
}
|
|
7639
7641
|
};
|
|
@@ -1523,6 +1523,18 @@ async function createMessageOp(ctx, opts) {
|
|
|
1523
1523
|
});
|
|
1524
1524
|
return messageToStored(created, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
1525
1525
|
}
|
|
1526
|
+
async function getMessageOp(ctx, uniqueId) {
|
|
1527
|
+
let message;
|
|
1528
|
+
try {
|
|
1529
|
+
message = await ctx.messagesCollection.find(uniqueId);
|
|
1530
|
+
} catch (error) {
|
|
1531
|
+
if (error instanceof Error && /not found/i.test(error.message)) {
|
|
1532
|
+
return null;
|
|
1533
|
+
}
|
|
1534
|
+
throw error;
|
|
1535
|
+
}
|
|
1536
|
+
return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
1537
|
+
}
|
|
1526
1538
|
async function updateMessageEmbeddingOp(ctx, uniqueId, vector, embeddingModel) {
|
|
1527
1539
|
let message;
|
|
1528
1540
|
try {
|
|
@@ -3111,13 +3123,7 @@ async function generateEmbeddings(texts, options) {
|
|
|
3111
3123
|
// src/lib/memoryEngine/embeddings.ts
|
|
3112
3124
|
var DEFAULT_MIN_CONTENT_LENGTH = 10;
|
|
3113
3125
|
async function embedMessage(ctx, messageId, options) {
|
|
3114
|
-
|
|
3115
|
-
const conversations = await getConversationsOp(ctx);
|
|
3116
|
-
for (const conv of conversations) {
|
|
3117
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
3118
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
3119
|
-
if (message) break;
|
|
3120
|
-
}
|
|
3126
|
+
const message = await getMessageOp(ctx, messageId);
|
|
3121
3127
|
if (!message) {
|
|
3122
3128
|
return null;
|
|
3123
3129
|
}
|
|
@@ -3163,13 +3169,7 @@ async function embedAllMessages(ctx, options, filter) {
|
|
|
3163
3169
|
}
|
|
3164
3170
|
async function chunkAndEmbedMessage(ctx, messageId, options) {
|
|
3165
3171
|
const { chunkSize = DEFAULT_CHUNK_SIZE } = options;
|
|
3166
|
-
|
|
3167
|
-
const conversations = await getConversationsOp(ctx);
|
|
3168
|
-
for (const conv of conversations) {
|
|
3169
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
3170
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
3171
|
-
if (message) break;
|
|
3172
|
-
}
|
|
3172
|
+
const message = await getMessageOp(ctx, messageId);
|
|
3173
3173
|
if (!message) {
|
|
3174
3174
|
return null;
|
|
3175
3175
|
}
|
|
@@ -4529,7 +4529,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
4529
4529
|
legacy.map((r) => ({ id: r.uniqueId, content: r.content, score: r.similarity }))
|
|
4530
4530
|
);
|
|
4531
4531
|
}
|
|
4532
|
-
const { recall: recall2 } = await import("./recall-
|
|
4532
|
+
const { recall: recall2 } = await import("./recall-NG2P5ZQ7.mjs");
|
|
4533
4533
|
const result = await recall2(
|
|
4534
4534
|
query,
|
|
4535
4535
|
{ vaultCtx, embeddingOptions, vaultCache: cache },
|
package/dist/react/index.cjs
CHANGED
|
@@ -1666,6 +1666,18 @@ async function createMessageOp(ctx, opts) {
|
|
|
1666
1666
|
});
|
|
1667
1667
|
return messageToStored(created, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
1668
1668
|
}
|
|
1669
|
+
async function getMessageOp(ctx, uniqueId) {
|
|
1670
|
+
let message;
|
|
1671
|
+
try {
|
|
1672
|
+
message = await ctx.messagesCollection.find(uniqueId);
|
|
1673
|
+
} catch (error) {
|
|
1674
|
+
if (error instanceof Error && /not found/i.test(error.message)) {
|
|
1675
|
+
return null;
|
|
1676
|
+
}
|
|
1677
|
+
throw error;
|
|
1678
|
+
}
|
|
1679
|
+
return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
1680
|
+
}
|
|
1669
1681
|
async function updateMessageEmbeddingOp(ctx, uniqueId, vector, embeddingModel) {
|
|
1670
1682
|
let message;
|
|
1671
1683
|
try {
|
|
@@ -2402,13 +2414,7 @@ var init_generate = __esm({
|
|
|
2402
2414
|
|
|
2403
2415
|
// src/lib/memoryEngine/embeddings.ts
|
|
2404
2416
|
async function embedMessage(ctx, messageId, options) {
|
|
2405
|
-
|
|
2406
|
-
const conversations = await getConversationsOp(ctx);
|
|
2407
|
-
for (const conv of conversations) {
|
|
2408
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
2409
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
2410
|
-
if (message) break;
|
|
2411
|
-
}
|
|
2417
|
+
const message = await getMessageOp(ctx, messageId);
|
|
2412
2418
|
if (!message) {
|
|
2413
2419
|
return null;
|
|
2414
2420
|
}
|
|
@@ -2454,13 +2460,7 @@ async function embedAllMessages(ctx, options, filter) {
|
|
|
2454
2460
|
}
|
|
2455
2461
|
async function chunkAndEmbedMessage(ctx, messageId, options) {
|
|
2456
2462
|
const { chunkSize = DEFAULT_CHUNK_SIZE } = options;
|
|
2457
|
-
|
|
2458
|
-
const conversations = await getConversationsOp(ctx);
|
|
2459
|
-
for (const conv of conversations) {
|
|
2460
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
2461
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
2462
|
-
if (message) break;
|
|
2463
|
-
}
|
|
2463
|
+
const message = await getMessageOp(ctx, messageId);
|
|
2464
2464
|
if (!message) {
|
|
2465
2465
|
return null;
|
|
2466
2466
|
}
|
|
@@ -14524,7 +14524,9 @@ function createRecallTool(ctx, toolOptions, callbacks) {
|
|
|
14524
14524
|
return formatRecallResult(result.memories);
|
|
14525
14525
|
} catch (error) {
|
|
14526
14526
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
14527
|
-
|
|
14527
|
+
const wrapped = new Error(`recall_memory: search failed \u2014 ${message}`);
|
|
14528
|
+
wrapped.cause = error;
|
|
14529
|
+
throw wrapped;
|
|
14528
14530
|
}
|
|
14529
14531
|
}
|
|
14530
14532
|
};
|
package/dist/react/index.mjs
CHANGED
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
updateVaultMemoryOp,
|
|
113
113
|
useEncryption,
|
|
114
114
|
vaultMemoryToStored
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-3KGACSSP.mjs";
|
|
116
116
|
import {
|
|
117
117
|
PiiRedactor,
|
|
118
118
|
createStreamingDeAnonymizer,
|
|
@@ -7734,7 +7734,9 @@ function createRecallTool(ctx, toolOptions, callbacks) {
|
|
|
7734
7734
|
return formatRecallResult(result.memories);
|
|
7735
7735
|
} catch (error) {
|
|
7736
7736
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
7737
|
-
|
|
7737
|
+
const wrapped = new Error(`recall_memory: search failed \u2014 ${message}`);
|
|
7738
|
+
wrapped.cause = error;
|
|
7739
|
+
throw wrapped;
|
|
7738
7740
|
}
|
|
7739
7741
|
}
|
|
7740
7742
|
};
|
|
@@ -15600,6 +15600,18 @@ async function upsertMessageOp(ctx, opts) {
|
|
|
15600
15600
|
const updated = await _updateMessageOp(ctx, opts.uniqueId, updateOpts);
|
|
15601
15601
|
return updated ?? messageToStored(existing, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
15602
15602
|
}
|
|
15603
|
+
async function getMessageOp(ctx, uniqueId) {
|
|
15604
|
+
let message;
|
|
15605
|
+
try {
|
|
15606
|
+
message = await ctx.messagesCollection.find(uniqueId);
|
|
15607
|
+
} catch (error) {
|
|
15608
|
+
if (error instanceof Error && /not found/i.test(error.message)) {
|
|
15609
|
+
return null;
|
|
15610
|
+
}
|
|
15611
|
+
throw error;
|
|
15612
|
+
}
|
|
15613
|
+
return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
15614
|
+
}
|
|
15603
15615
|
async function updateMessageEmbeddingOp(ctx, uniqueId, vector, embeddingModel) {
|
|
15604
15616
|
let message;
|
|
15605
15617
|
try {
|
|
@@ -17106,13 +17118,7 @@ async function generateEmbeddings(texts, options) {
|
|
|
17106
17118
|
// src/lib/memoryEngine/embeddings.ts
|
|
17107
17119
|
var DEFAULT_MIN_CONTENT_LENGTH = 10;
|
|
17108
17120
|
async function embedMessage(ctx, messageId, options) {
|
|
17109
|
-
|
|
17110
|
-
const conversations = await getConversationsOp(ctx);
|
|
17111
|
-
for (const conv of conversations) {
|
|
17112
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
17113
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
17114
|
-
if (message) break;
|
|
17115
|
-
}
|
|
17121
|
+
const message = await getMessageOp(ctx, messageId);
|
|
17116
17122
|
if (!message) {
|
|
17117
17123
|
return null;
|
|
17118
17124
|
}
|
|
@@ -17158,13 +17164,7 @@ async function embedAllMessages(ctx, options, filter) {
|
|
|
17158
17164
|
}
|
|
17159
17165
|
async function chunkAndEmbedMessage(ctx, messageId, options) {
|
|
17160
17166
|
const { chunkSize = DEFAULT_CHUNK_SIZE } = options;
|
|
17161
|
-
|
|
17162
|
-
const conversations = await getConversationsOp(ctx);
|
|
17163
|
-
for (const conv of conversations) {
|
|
17164
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
17165
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
17166
|
-
if (message) break;
|
|
17167
|
-
}
|
|
17167
|
+
const message = await getMessageOp(ctx, messageId);
|
|
17168
17168
|
if (!message) {
|
|
17169
17169
|
return null;
|
|
17170
17170
|
}
|
|
@@ -18524,7 +18524,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
18524
18524
|
legacy.map((r) => ({ id: r.uniqueId, content: r.content, score: r.similarity }))
|
|
18525
18525
|
);
|
|
18526
18526
|
}
|
|
18527
|
-
const { recall: recall2 } = await import("./recall-
|
|
18527
|
+
const { recall: recall2 } = await import("./recall-2K7IOKY3.mjs");
|
|
18528
18528
|
const result = await recall2(
|
|
18529
18529
|
query,
|
|
18530
18530
|
{ vaultCtx, embeddingOptions, vaultCache: cache },
|
|
@@ -19202,6 +19202,7 @@ export {
|
|
|
19202
19202
|
clearMessagesOp,
|
|
19203
19203
|
createMessageOp,
|
|
19204
19204
|
upsertMessageOp,
|
|
19205
|
+
getMessageOp,
|
|
19205
19206
|
updateMessageEmbeddingOp,
|
|
19206
19207
|
updateMessageChunksOp,
|
|
19207
19208
|
updateMessageErrorOp,
|
package/dist/server/index.cjs
CHANGED
|
@@ -16346,6 +16346,18 @@ async function upsertMessageOp(ctx, opts) {
|
|
|
16346
16346
|
const updated = await _updateMessageOp(ctx, opts.uniqueId, updateOpts);
|
|
16347
16347
|
return updated ?? messageToStored(existing, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
16348
16348
|
}
|
|
16349
|
+
async function getMessageOp(ctx, uniqueId) {
|
|
16350
|
+
let message;
|
|
16351
|
+
try {
|
|
16352
|
+
message = await ctx.messagesCollection.find(uniqueId);
|
|
16353
|
+
} catch (error) {
|
|
16354
|
+
if (error instanceof Error && /not found/i.test(error.message)) {
|
|
16355
|
+
return null;
|
|
16356
|
+
}
|
|
16357
|
+
throw error;
|
|
16358
|
+
}
|
|
16359
|
+
return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
16360
|
+
}
|
|
16349
16361
|
async function updateMessageEmbeddingOp(ctx, uniqueId, vector, embeddingModel) {
|
|
16350
16362
|
let message;
|
|
16351
16363
|
try {
|
|
@@ -17942,13 +17954,7 @@ var init_generate = __esm({
|
|
|
17942
17954
|
|
|
17943
17955
|
// src/lib/memoryEngine/embeddings.ts
|
|
17944
17956
|
async function embedMessage(ctx, messageId, options) {
|
|
17945
|
-
|
|
17946
|
-
const conversations = await getConversationsOp(ctx);
|
|
17947
|
-
for (const conv of conversations) {
|
|
17948
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
17949
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
17950
|
-
if (message) break;
|
|
17951
|
-
}
|
|
17957
|
+
const message = await getMessageOp(ctx, messageId);
|
|
17952
17958
|
if (!message) {
|
|
17953
17959
|
return null;
|
|
17954
17960
|
}
|
|
@@ -17994,13 +18000,7 @@ async function embedAllMessages(ctx, options, filter) {
|
|
|
17994
18000
|
}
|
|
17995
18001
|
async function chunkAndEmbedMessage(ctx, messageId, options) {
|
|
17996
18002
|
const { chunkSize = DEFAULT_CHUNK_SIZE } = options;
|
|
17997
|
-
|
|
17998
|
-
const conversations = await getConversationsOp(ctx);
|
|
17999
|
-
for (const conv of conversations) {
|
|
18000
|
-
const messages = await getMessagesOp(ctx, conv.conversationId);
|
|
18001
|
-
message = messages.find((m) => m.uniqueId === messageId);
|
|
18002
|
-
if (message) break;
|
|
18003
|
-
}
|
|
18003
|
+
const message = await getMessageOp(ctx, messageId);
|
|
18004
18004
|
if (!message) {
|
|
18005
18005
|
return null;
|
|
18006
18006
|
}
|
|
@@ -21267,6 +21267,7 @@ __export(index_exports, {
|
|
|
21267
21267
|
getMediaOp: () => getMediaOp,
|
|
21268
21268
|
getMediaTypeFromMime: () => getMediaTypeFromMime,
|
|
21269
21269
|
getMemoriesNeedingTopicExtractionOp: () => getMemoriesNeedingTopicExtractionOp,
|
|
21270
|
+
getMessageOp: () => getMessageOp,
|
|
21270
21271
|
getMessagesOp: () => getMessagesOp,
|
|
21271
21272
|
getModelPreferenceOp: () => getModelPreferenceOp,
|
|
21272
21273
|
getProjectConversationCountOp: () => getProjectConversationCountOp,
|
|
@@ -26240,7 +26241,9 @@ function createRecallTool(ctx, toolOptions, callbacks) {
|
|
|
26240
26241
|
return formatRecallResult(result.memories);
|
|
26241
26242
|
} catch (error) {
|
|
26242
26243
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
26243
|
-
|
|
26244
|
+
const wrapped = new Error(`recall_memory: search failed \u2014 ${message}`);
|
|
26245
|
+
wrapped.cause = error;
|
|
26246
|
+
throw wrapped;
|
|
26244
26247
|
}
|
|
26245
26248
|
}
|
|
26246
26249
|
};
|
|
@@ -32466,6 +32469,7 @@ function buildSystemPrompt(ctx, options) {
|
|
|
32466
32469
|
getMediaOp,
|
|
32467
32470
|
getMediaTypeFromMime,
|
|
32468
32471
|
getMemoriesNeedingTopicExtractionOp,
|
|
32472
|
+
getMessageOp,
|
|
32469
32473
|
getMessagesOp,
|
|
32470
32474
|
getModelPreferenceOp,
|
|
32471
32475
|
getProjectConversationCountOp,
|
package/dist/server/index.d.mts
CHANGED
|
@@ -3968,6 +3968,13 @@ declare function createMessageOp(ctx: StorageOperationsContext, opts: CreateMess
|
|
|
3968
3968
|
declare function upsertMessageOp(ctx: StorageOperationsContext, opts: CreateMessageOptions & {
|
|
3969
3969
|
uniqueId: string;
|
|
3970
3970
|
}): Promise<StoredMessage>;
|
|
3971
|
+
/**
|
|
3972
|
+
* Fetch a single message by its uniqueId (the WatermelonDB record id),
|
|
3973
|
+
* decrypted to a StoredMessage. Returns null if not found. O(1) indexed
|
|
3974
|
+
* lookup — prefer this over scanning `getMessagesOp` across every conversation
|
|
3975
|
+
* when you already hold a message id.
|
|
3976
|
+
*/
|
|
3977
|
+
declare function getMessageOp(ctx: StorageOperationsContext, uniqueId: string): Promise<StoredMessage | null>;
|
|
3971
3978
|
declare function updateMessageEmbeddingOp(ctx: StorageOperationsContext, uniqueId: string, vector: number[], embeddingModel: string): Promise<StoredMessage | null>;
|
|
3972
3979
|
declare function updateMessageChunksOp(ctx: StorageOperationsContext, uniqueId: string, chunks: MessageChunk[], embeddingModel: string): Promise<StoredMessage | null>;
|
|
3973
3980
|
declare function updateMessageErrorOp(ctx: StorageOperationsContext, uniqueId: string, error: string): Promise<StoredMessage | null>;
|
|
@@ -7937,4 +7944,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
7937
7944
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
7938
7945
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
7939
7946
|
|
|
7940
|
-
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
|
7947
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -3968,6 +3968,13 @@ declare function createMessageOp(ctx: StorageOperationsContext, opts: CreateMess
|
|
|
3968
3968
|
declare function upsertMessageOp(ctx: StorageOperationsContext, opts: CreateMessageOptions & {
|
|
3969
3969
|
uniqueId: string;
|
|
3970
3970
|
}): Promise<StoredMessage>;
|
|
3971
|
+
/**
|
|
3972
|
+
* Fetch a single message by its uniqueId (the WatermelonDB record id),
|
|
3973
|
+
* decrypted to a StoredMessage. Returns null if not found. O(1) indexed
|
|
3974
|
+
* lookup — prefer this over scanning `getMessagesOp` across every conversation
|
|
3975
|
+
* when you already hold a message id.
|
|
3976
|
+
*/
|
|
3977
|
+
declare function getMessageOp(ctx: StorageOperationsContext, uniqueId: string): Promise<StoredMessage | null>;
|
|
3971
3978
|
declare function updateMessageEmbeddingOp(ctx: StorageOperationsContext, uniqueId: string, vector: number[], embeddingModel: string): Promise<StoredMessage | null>;
|
|
3972
3979
|
declare function updateMessageChunksOp(ctx: StorageOperationsContext, uniqueId: string, chunks: MessageChunk[], embeddingModel: string): Promise<StoredMessage | null>;
|
|
3973
3980
|
declare function updateMessageErrorOp(ctx: StorageOperationsContext, uniqueId: string, error: string): Promise<StoredMessage | null>;
|
|
@@ -7937,4 +7944,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
7937
7944
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
7938
7945
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
7939
7946
|
|
|
7940
|
-
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
|
7947
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type EmbeddedWalletSignerFn, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, INFERENCE_ID_HEADER, type LazyStoredConversation, type LlmTokenUsage, MAX_MESSAGES_PER_SUMMARIZATION, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, type OperationExecutor, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultFolder, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, type VaultEmbeddingCache, VaultFolder, type VaultFolderOperationsContext, VaultMemory, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultFolderOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, moveMemoriesToFolderOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, recall, reflect, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serverPlatformStorage, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summaryToSystemMessage, supersedeVaultMemoryOp, toolSetSystemPrompts, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp };
|
package/dist/server/index.mjs
CHANGED
|
@@ -60,6 +60,7 @@ import {
|
|
|
60
60
|
getConversationsPageOp,
|
|
61
61
|
getEncryptionKey,
|
|
62
62
|
getMemoriesNeedingTopicExtractionOp,
|
|
63
|
+
getMessageOp,
|
|
63
64
|
getMessagesOp,
|
|
64
65
|
getUnfiledVaultMemoriesOp,
|
|
65
66
|
getVaultMemoryOp,
|
|
@@ -107,7 +108,7 @@ import {
|
|
|
107
108
|
updateVaultMemoryOp,
|
|
108
109
|
upsertMessageOp,
|
|
109
110
|
vaultMemoryToStored
|
|
110
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-A4V7FRZ6.mjs";
|
|
111
112
|
import {
|
|
112
113
|
createStreamingDeAnonymizer,
|
|
113
114
|
resolvePiiRedactor
|
|
@@ -5606,7 +5607,9 @@ function createRecallTool(ctx, toolOptions, callbacks) {
|
|
|
5606
5607
|
return formatRecallResult(result.memories);
|
|
5607
5608
|
} catch (error) {
|
|
5608
5609
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
5609
|
-
|
|
5610
|
+
const wrapped = new Error(`recall_memory: search failed \u2014 ${message}`);
|
|
5611
|
+
wrapped.cause = error;
|
|
5612
|
+
throw wrapped;
|
|
5610
5613
|
}
|
|
5611
5614
|
}
|
|
5612
5615
|
};
|
|
@@ -11777,6 +11780,7 @@ export {
|
|
|
11777
11780
|
getMediaOp,
|
|
11778
11781
|
getMediaTypeFromMime,
|
|
11779
11782
|
getMemoriesNeedingTopicExtractionOp,
|
|
11783
|
+
getMessageOp,
|
|
11780
11784
|
getMessagesOp,
|
|
11781
11785
|
getModelPreferenceOp,
|
|
11782
11786
|
getProjectConversationCountOp,
|