@anuma/sdk 6.1.1 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/expo/{chunk-VBPZDIFV.mjs → chunk-NH5VY3G7.mjs} +22 -4
- package/dist/expo/index.cjs +42 -6
- package/dist/expo/index.d.mts +37 -2
- package/dist/expo/index.d.ts +37 -2
- package/dist/expo/index.mjs +21 -3
- package/dist/expo/{recall-2IOGTAFJ.mjs → recall-ZIKIYARO.mjs} +1 -1
- package/dist/react/{chunk-GIBV5GBW.mjs → chunk-EMVLDEPB.mjs} +22 -4
- package/dist/react/index.cjs +87 -16
- package/dist/react/index.d.mts +38 -3
- package/dist/react/index.d.ts +38 -3
- package/dist/react/index.mjs +66 -13
- package/dist/react/{recall-KOKU2PPN.mjs → recall-B7POS7NA.mjs} +1 -1
- package/dist/server/{chunk-FYT5MBVO.mjs → chunk-6JS7SY6A.mjs} +22 -4
- package/dist/server/index.cjs +42 -6
- package/dist/server/index.d.mts +38 -3
- package/dist/server/index.d.ts +38 -3
- package/dist/server/index.mjs +21 -3
- package/dist/server/{recall-P2HA3MUA.mjs → recall-IM6RLRI6.mjs} +1 -1
- package/dist/tools/index.cjs +1 -1
- package/dist/tools/index.mjs +1 -1
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -166,7 +166,7 @@ import {
|
|
|
166
166
|
updateVaultMemoryOp,
|
|
167
167
|
useEncryption,
|
|
168
168
|
vaultMemoryToStored
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-EMVLDEPB.mjs";
|
|
170
170
|
import {
|
|
171
171
|
PiiRedactor,
|
|
172
172
|
createStreamingDeAnonymizer,
|
|
@@ -5344,6 +5344,43 @@ async function cleanupConversationSummary(database, conversationId) {
|
|
|
5344
5344
|
}
|
|
5345
5345
|
}
|
|
5346
5346
|
|
|
5347
|
+
// src/lib/chat/toolResultMessage.ts
|
|
5348
|
+
var HEADER = "[Tool Execution Results]\n\n";
|
|
5349
|
+
var FOOTER = "\n\nBased on these results, continue with the task.";
|
|
5350
|
+
var ENTRY_SEPARATOR = "\n\n";
|
|
5351
|
+
var MAX_PERSISTED_TOOL_RESULT_CHARS = 1e5;
|
|
5352
|
+
function buildToolResultContent(results) {
|
|
5353
|
+
const entries = results.map((r) => `Tool "${r.name}" returned: ${JSON.stringify(r.result)}`);
|
|
5354
|
+
const framing = HEADER.length + FOOTER.length + ENTRY_SEPARATOR.length * Math.max(0, entries.length - 1);
|
|
5355
|
+
const summary = capEntries(entries, MAX_PERSISTED_TOOL_RESULT_CHARS - framing).join(
|
|
5356
|
+
ENTRY_SEPARATOR
|
|
5357
|
+
);
|
|
5358
|
+
return `${HEADER}${summary}${FOOTER}`;
|
|
5359
|
+
}
|
|
5360
|
+
function capEntries(entries, budget) {
|
|
5361
|
+
const smallestFirst = entries.map((_, index) => index).sort((a, b) => entries[a].length - entries[b].length);
|
|
5362
|
+
const capped = [...entries];
|
|
5363
|
+
let remaining = budget;
|
|
5364
|
+
let unassigned = entries.length;
|
|
5365
|
+
for (const index of smallestFirst) {
|
|
5366
|
+
capped[index] = truncateEntry(entries[index], Math.floor(remaining / unassigned));
|
|
5367
|
+
remaining -= capped[index].length;
|
|
5368
|
+
unassigned--;
|
|
5369
|
+
}
|
|
5370
|
+
return capped;
|
|
5371
|
+
}
|
|
5372
|
+
function truncateEntry(entry, allowance) {
|
|
5373
|
+
if (entry.length <= allowance) return entry;
|
|
5374
|
+
const keep = allowance - truncationMarker(entry.length).length;
|
|
5375
|
+
if (keep <= 0) return entry.slice(0, Math.max(0, allowance));
|
|
5376
|
+
return `${entry.slice(0, keep)}${truncationMarker(entry.length - keep)}`;
|
|
5377
|
+
}
|
|
5378
|
+
function truncationMarker(omitted) {
|
|
5379
|
+
return `
|
|
5380
|
+
|
|
5381
|
+
... (tool output truncated, ${omitted} characters omitted)`;
|
|
5382
|
+
}
|
|
5383
|
+
|
|
5347
5384
|
// src/lib/db/chat/lazyDecrypt.ts
|
|
5348
5385
|
var LRU_CAPACITY = 256;
|
|
5349
5386
|
var titleCache = /* @__PURE__ */ new Map();
|
|
@@ -5487,6 +5524,9 @@ __decorateClass([
|
|
|
5487
5524
|
__decorateClass([
|
|
5488
5525
|
json("tool_call_events", (raw) => raw)
|
|
5489
5526
|
], Message.prototype, "toolCallEvents", 2);
|
|
5527
|
+
__decorateClass([
|
|
5528
|
+
text("origin")
|
|
5529
|
+
], Message.prototype, "origin", 2);
|
|
5490
5530
|
var Conversation = class extends Model {
|
|
5491
5531
|
};
|
|
5492
5532
|
Conversation.table = "conversations";
|
|
@@ -13998,12 +14038,7 @@ function useChatStorage(options) {
|
|
|
13998
14038
|
}
|
|
13999
14039
|
const autoToolResults = result.autoExecutedToolResults;
|
|
14000
14040
|
if (autoToolResults && autoToolResults.length > 0) {
|
|
14001
|
-
const
|
|
14002
|
-
const toolResultContent = `[Tool Execution Results]
|
|
14003
|
-
|
|
14004
|
-
${toolSummary}
|
|
14005
|
-
|
|
14006
|
-
Based on these results, continue with the task.`;
|
|
14041
|
+
const toolResultContent = buildToolResultContent(autoToolResults);
|
|
14007
14042
|
try {
|
|
14008
14043
|
await writeOrQueue(
|
|
14009
14044
|
"createMessage",
|
|
@@ -14012,21 +14047,24 @@ Based on these results, continue with the task.`;
|
|
|
14012
14047
|
role: "user",
|
|
14013
14048
|
content: toolResultContent,
|
|
14014
14049
|
model: "",
|
|
14015
|
-
parentMessageId: storedAssistantMessage.uniqueId
|
|
14050
|
+
parentMessageId: storedAssistantMessage.uniqueId,
|
|
14051
|
+
origin: "tool_result"
|
|
14016
14052
|
},
|
|
14017
14053
|
() => createMessageOp(storageCtx, {
|
|
14018
14054
|
conversationId: convId,
|
|
14019
14055
|
role: "user",
|
|
14020
14056
|
content: toolResultContent,
|
|
14021
14057
|
model: "",
|
|
14022
|
-
parentMessageId: storedAssistantMessage.uniqueId
|
|
14058
|
+
parentMessageId: storedAssistantMessage.uniqueId,
|
|
14059
|
+
origin: "tool_result"
|
|
14023
14060
|
}),
|
|
14024
14061
|
() => makeSyntheticStoredMessage({
|
|
14025
14062
|
conversationId: convId,
|
|
14026
14063
|
role: "user",
|
|
14027
14064
|
content: toolResultContent,
|
|
14028
14065
|
model: "",
|
|
14029
|
-
parentMessageId: storedAssistantMessage.uniqueId
|
|
14066
|
+
parentMessageId: storedAssistantMessage.uniqueId,
|
|
14067
|
+
origin: "tool_result"
|
|
14030
14068
|
}),
|
|
14031
14069
|
assistantMsgQueueId ? [assistantMsgQueueId] : []
|
|
14032
14070
|
);
|
|
@@ -14339,7 +14377,7 @@ __decorateClass([
|
|
|
14339
14377
|
], VaultFolder.prototype, "context", 2);
|
|
14340
14378
|
|
|
14341
14379
|
// src/lib/db/schema.ts
|
|
14342
|
-
var SDK_SCHEMA_VERSION =
|
|
14380
|
+
var SDK_SCHEMA_VERSION = 44;
|
|
14343
14381
|
var sdkSchema = appSchema2({
|
|
14344
14382
|
version: SDK_SCHEMA_VERSION,
|
|
14345
14383
|
tables: [
|
|
@@ -14377,8 +14415,10 @@ var sdkSchema = appSchema2({
|
|
|
14377
14415
|
// Parent message for branching
|
|
14378
14416
|
{ name: "feedback", type: "string", isOptional: true },
|
|
14379
14417
|
// 'like' | 'dislike' | null
|
|
14380
|
-
{ name: "tool_call_events", type: "string", isOptional: true }
|
|
14418
|
+
{ name: "tool_call_events", type: "string", isOptional: true },
|
|
14381
14419
|
// JSON stringified LlmapiToolCallEvent[]
|
|
14420
|
+
{ name: "origin", type: "string", isOptional: true }
|
|
14421
|
+
// MessageOrigin — provenance, NOT encrypted (see v44)
|
|
14382
14422
|
]
|
|
14383
14423
|
}),
|
|
14384
14424
|
tableSchema2({
|
|
@@ -15306,6 +15346,19 @@ var sdkMigrations = schemaMigrations2({
|
|
|
15306
15346
|
"CREATE INDEX IF NOT EXISTS conversations_is_deleted_created_at ON conversations (is_deleted, created_at);"
|
|
15307
15347
|
)
|
|
15308
15348
|
]
|
|
15349
|
+
},
|
|
15350
|
+
// v43 -> v44: Added origin column to history — the provenance tag the embedding
|
|
15351
|
+
// sweep reads to skip never-rendered tool-result rows. No backfill: NULL means
|
|
15352
|
+
// "legacy, provenance unknown" and keeps the pre-v44 behaviour of embedding the
|
|
15353
|
+
// row, so the only rows that stop being embedded are ones a v44+ producer tagged.
|
|
15354
|
+
{
|
|
15355
|
+
toVersion: 44,
|
|
15356
|
+
steps: [
|
|
15357
|
+
addColumns2({
|
|
15358
|
+
table: "history",
|
|
15359
|
+
columns: [{ name: "origin", type: "string", isOptional: true }]
|
|
15360
|
+
})
|
|
15361
|
+
]
|
|
15309
15362
|
}
|
|
15310
15363
|
]
|
|
15311
15364
|
});
|
|
@@ -23435,7 +23488,7 @@ IMPORTANT: For write operations (POST, PUT, PATCH, DELETE), always confirm with
|
|
|
23435
23488
|
}
|
|
23436
23489
|
try {
|
|
23437
23490
|
const data = JSON.parse(text12);
|
|
23438
|
-
const json4 = JSON.stringify(data
|
|
23491
|
+
const json4 = JSON.stringify(data);
|
|
23439
23492
|
return truncate(json4, MAX_RESPONSE_SIZE);
|
|
23440
23493
|
} catch {
|
|
23441
23494
|
return truncate(text12, MAX_RESPONSE_SIZE);
|
|
@@ -15469,7 +15469,8 @@ function messageToStoredRaw(message, projection) {
|
|
|
15469
15469
|
thinking: message.thinking,
|
|
15470
15470
|
parentMessageId: message.parentMessageId,
|
|
15471
15471
|
feedback: message.feedback || null,
|
|
15472
|
-
toolCallEvents: parseJsonField(toolCallEventsRaw)
|
|
15472
|
+
toolCallEvents: parseJsonField(toolCallEventsRaw),
|
|
15473
|
+
origin: message.origin
|
|
15473
15474
|
};
|
|
15474
15475
|
}
|
|
15475
15476
|
async function messageToStored(message, walletAddress, signMessage, embeddedWalletSigner, projection) {
|
|
@@ -15530,7 +15531,11 @@ function messageRawToStoredRaw(raw, projection) {
|
|
|
15530
15531
|
thinking: raw.thinking,
|
|
15531
15532
|
parentMessageId: raw.parent_message_id,
|
|
15532
15533
|
feedback: raw.feedback || null,
|
|
15533
|
-
toolCallEvents: parseJsonField(raw.tool_call_events)
|
|
15534
|
+
toolCallEvents: parseJsonField(raw.tool_call_events),
|
|
15535
|
+
// Load-bearing on this path specifically: getMessagesOp reads raws, and it is
|
|
15536
|
+
// what the deferred embedding sweep iterates, so the provenance gate depends
|
|
15537
|
+
// on `origin` surviving the raw mapper as well as the Model one.
|
|
15538
|
+
origin: raw.origin
|
|
15534
15539
|
};
|
|
15535
15540
|
}
|
|
15536
15541
|
async function messageRawToStored(raw, walletAddress, signMessage, embeddedWalletSigner, projection) {
|
|
@@ -15793,6 +15798,7 @@ function applyMessageFields(msg, encryptedOpts) {
|
|
|
15793
15798
|
const tceValue = typeof encryptedOpts.toolCallEvents === "string" ? encryptedOpts.toolCallEvents : JSON.stringify(encryptedOpts.toolCallEvents);
|
|
15794
15799
|
msg._setRaw("tool_call_events", tceValue);
|
|
15795
15800
|
}
|
|
15801
|
+
if (encryptedOpts.origin) msg._setRaw("origin", encryptedOpts.origin);
|
|
15796
15802
|
}
|
|
15797
15803
|
async function createMessageOp(ctx, opts) {
|
|
15798
15804
|
if (opts.uniqueId) {
|
|
@@ -16211,7 +16217,8 @@ function makeSyntheticStoredMessage(opts) {
|
|
|
16211
16217
|
thoughtProcess: opts.thoughtProcess,
|
|
16212
16218
|
thinking: opts.thinking,
|
|
16213
16219
|
parentMessageId: opts.parentMessageId,
|
|
16214
|
-
toolCallEvents: opts.toolCallEvents
|
|
16220
|
+
toolCallEvents: opts.toolCallEvents,
|
|
16221
|
+
origin: opts.origin
|
|
16215
16222
|
};
|
|
16216
16223
|
}
|
|
16217
16224
|
function makeSyntheticStoredConversation(opts, defaultTitle) {
|
|
@@ -18795,6 +18802,7 @@ async function generateEmbeddings(texts, options) {
|
|
|
18795
18802
|
|
|
18796
18803
|
// src/lib/memoryEngine/embeddings.ts
|
|
18797
18804
|
var DEFAULT_MIN_CONTENT_LENGTH = 10;
|
|
18805
|
+
var NON_EMBEDDABLE_ORIGIN = "tool_result";
|
|
18798
18806
|
async function embedMessage(ctx, messageId, options) {
|
|
18799
18807
|
const message = await getMessageOp(ctx, messageId);
|
|
18800
18808
|
if (!message) {
|
|
@@ -18803,6 +18811,9 @@ async function embedMessage(ctx, messageId, options) {
|
|
|
18803
18811
|
if (message.vector && message.vector.length > 0) {
|
|
18804
18812
|
return message;
|
|
18805
18813
|
}
|
|
18814
|
+
if (message.origin === NON_EMBEDDABLE_ORIGIN) {
|
|
18815
|
+
return message;
|
|
18816
|
+
}
|
|
18806
18817
|
const embedding = await generateEmbedding(message.content, options);
|
|
18807
18818
|
const embeddingModel = options.model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
18808
18819
|
return updateMessageEmbeddingOp(ctx, messageId, embedding, embeddingModel);
|
|
@@ -18824,6 +18835,9 @@ async function embedAllMessages(ctx, options, filter) {
|
|
|
18824
18835
|
if (message.role === "system") {
|
|
18825
18836
|
continue;
|
|
18826
18837
|
}
|
|
18838
|
+
if (message.origin === NON_EMBEDDABLE_ORIGIN) {
|
|
18839
|
+
continue;
|
|
18840
|
+
}
|
|
18827
18841
|
const minLength = filter?.minContentLength ?? DEFAULT_MIN_CONTENT_LENGTH;
|
|
18828
18842
|
if (message.content.length < minLength) {
|
|
18829
18843
|
continue;
|
|
@@ -18849,6 +18863,9 @@ async function chunkAndEmbedMessage(ctx, messageId, options) {
|
|
|
18849
18863
|
if (message.chunks && message.chunks.length > 0) {
|
|
18850
18864
|
return message;
|
|
18851
18865
|
}
|
|
18866
|
+
if (message.origin === NON_EMBEDDABLE_ORIGIN) {
|
|
18867
|
+
return message;
|
|
18868
|
+
}
|
|
18852
18869
|
const embeddingModel = options.model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
18853
18870
|
if (!shouldChunkMessage(message.content, chunkSize)) {
|
|
18854
18871
|
const embedding = await generateEmbedding(message.content, options);
|
|
@@ -18882,6 +18899,7 @@ async function chunkAndEmbedAllMessages(ctx, options, filter) {
|
|
|
18882
18899
|
if (hasVector && !filter?.rechunkExisting && !isStale) continue;
|
|
18883
18900
|
if (filter?.roles && !filter.roles.includes(message.role)) continue;
|
|
18884
18901
|
if (message.role === "system") continue;
|
|
18902
|
+
if (message.origin === NON_EMBEDDABLE_ORIGIN) continue;
|
|
18885
18903
|
if (message.content.length < minLength) continue;
|
|
18886
18904
|
if (shouldChunkMessage(message.content, chunkSize)) {
|
|
18887
18905
|
longMessages.push({
|
|
@@ -20673,7 +20691,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
20673
20691
|
subQueries = decomp.subQueries;
|
|
20674
20692
|
}
|
|
20675
20693
|
}
|
|
20676
|
-
const { recall: recall2 } = await import("./recall-
|
|
20694
|
+
const { recall: recall2 } = await import("./recall-IM6RLRI6.mjs");
|
|
20677
20695
|
let recallDegraded = [];
|
|
20678
20696
|
const result = await recall2(
|
|
20679
20697
|
query,
|
package/dist/server/index.cjs
CHANGED
|
@@ -16214,7 +16214,8 @@ function messageToStoredRaw(message, projection) {
|
|
|
16214
16214
|
thinking: message.thinking,
|
|
16215
16215
|
parentMessageId: message.parentMessageId,
|
|
16216
16216
|
feedback: message.feedback || null,
|
|
16217
|
-
toolCallEvents: parseJsonField(toolCallEventsRaw)
|
|
16217
|
+
toolCallEvents: parseJsonField(toolCallEventsRaw),
|
|
16218
|
+
origin: message.origin
|
|
16218
16219
|
};
|
|
16219
16220
|
}
|
|
16220
16221
|
async function messageToStored(message, walletAddress, signMessage, embeddedWalletSigner, projection) {
|
|
@@ -16275,7 +16276,11 @@ function messageRawToStoredRaw(raw, projection) {
|
|
|
16275
16276
|
thinking: raw.thinking,
|
|
16276
16277
|
parentMessageId: raw.parent_message_id,
|
|
16277
16278
|
feedback: raw.feedback || null,
|
|
16278
|
-
toolCallEvents: parseJsonField(raw.tool_call_events)
|
|
16279
|
+
toolCallEvents: parseJsonField(raw.tool_call_events),
|
|
16280
|
+
// Load-bearing on this path specifically: getMessagesOp reads raws, and it is
|
|
16281
|
+
// what the deferred embedding sweep iterates, so the provenance gate depends
|
|
16282
|
+
// on `origin` surviving the raw mapper as well as the Model one.
|
|
16283
|
+
origin: raw.origin
|
|
16279
16284
|
};
|
|
16280
16285
|
}
|
|
16281
16286
|
async function messageRawToStored(raw, walletAddress, signMessage, embeddedWalletSigner, projection) {
|
|
@@ -16538,6 +16543,7 @@ function applyMessageFields(msg, encryptedOpts) {
|
|
|
16538
16543
|
const tceValue = typeof encryptedOpts.toolCallEvents === "string" ? encryptedOpts.toolCallEvents : JSON.stringify(encryptedOpts.toolCallEvents);
|
|
16539
16544
|
msg._setRaw("tool_call_events", tceValue);
|
|
16540
16545
|
}
|
|
16546
|
+
if (encryptedOpts.origin) msg._setRaw("origin", encryptedOpts.origin);
|
|
16541
16547
|
}
|
|
16542
16548
|
async function createMessageOp(ctx, opts) {
|
|
16543
16549
|
if (opts.uniqueId) {
|
|
@@ -16956,7 +16962,8 @@ function makeSyntheticStoredMessage(opts) {
|
|
|
16956
16962
|
thoughtProcess: opts.thoughtProcess,
|
|
16957
16963
|
thinking: opts.thinking,
|
|
16958
16964
|
parentMessageId: opts.parentMessageId,
|
|
16959
|
-
toolCallEvents: opts.toolCallEvents
|
|
16965
|
+
toolCallEvents: opts.toolCallEvents,
|
|
16966
|
+
origin: opts.origin
|
|
16960
16967
|
};
|
|
16961
16968
|
}
|
|
16962
16969
|
function makeSyntheticStoredConversation(opts, defaultTitle) {
|
|
@@ -19719,6 +19726,9 @@ async function embedMessage(ctx, messageId, options) {
|
|
|
19719
19726
|
if (message.vector && message.vector.length > 0) {
|
|
19720
19727
|
return message;
|
|
19721
19728
|
}
|
|
19729
|
+
if (message.origin === NON_EMBEDDABLE_ORIGIN) {
|
|
19730
|
+
return message;
|
|
19731
|
+
}
|
|
19722
19732
|
const embedding = await generateEmbedding(message.content, options);
|
|
19723
19733
|
const embeddingModel = options.model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
19724
19734
|
return updateMessageEmbeddingOp(ctx, messageId, embedding, embeddingModel);
|
|
@@ -19740,6 +19750,9 @@ async function embedAllMessages(ctx, options, filter) {
|
|
|
19740
19750
|
if (message.role === "system") {
|
|
19741
19751
|
continue;
|
|
19742
19752
|
}
|
|
19753
|
+
if (message.origin === NON_EMBEDDABLE_ORIGIN) {
|
|
19754
|
+
continue;
|
|
19755
|
+
}
|
|
19743
19756
|
const minLength = filter?.minContentLength ?? DEFAULT_MIN_CONTENT_LENGTH;
|
|
19744
19757
|
if (message.content.length < minLength) {
|
|
19745
19758
|
continue;
|
|
@@ -19765,6 +19778,9 @@ async function chunkAndEmbedMessage(ctx, messageId, options) {
|
|
|
19765
19778
|
if (message.chunks && message.chunks.length > 0) {
|
|
19766
19779
|
return message;
|
|
19767
19780
|
}
|
|
19781
|
+
if (message.origin === NON_EMBEDDABLE_ORIGIN) {
|
|
19782
|
+
return message;
|
|
19783
|
+
}
|
|
19768
19784
|
const embeddingModel = options.model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
19769
19785
|
if (!shouldChunkMessage(message.content, chunkSize)) {
|
|
19770
19786
|
const embedding = await generateEmbedding(message.content, options);
|
|
@@ -19798,6 +19814,7 @@ async function chunkAndEmbedAllMessages(ctx, options, filter) {
|
|
|
19798
19814
|
if (hasVector && !filter?.rechunkExisting && !isStale) continue;
|
|
19799
19815
|
if (filter?.roles && !filter.roles.includes(message.role)) continue;
|
|
19800
19816
|
if (message.role === "system") continue;
|
|
19817
|
+
if (message.origin === NON_EMBEDDABLE_ORIGIN) continue;
|
|
19801
19818
|
if (message.content.length < minLength) continue;
|
|
19802
19819
|
if (shouldChunkMessage(message.content, chunkSize)) {
|
|
19803
19820
|
longMessages.push({
|
|
@@ -19854,7 +19871,7 @@ async function chunkAndEmbedAllMessages(ctx, options, filter) {
|
|
|
19854
19871
|
}
|
|
19855
19872
|
return embeddedCount;
|
|
19856
19873
|
}
|
|
19857
|
-
var DEFAULT_MIN_CONTENT_LENGTH;
|
|
19874
|
+
var DEFAULT_MIN_CONTENT_LENGTH, NON_EMBEDDABLE_ORIGIN;
|
|
19858
19875
|
var init_embeddings = __esm({
|
|
19859
19876
|
"src/lib/memoryEngine/embeddings.ts"() {
|
|
19860
19877
|
"use strict";
|
|
@@ -19865,6 +19882,7 @@ var init_embeddings = __esm({
|
|
|
19865
19882
|
init_generate();
|
|
19866
19883
|
init_generate();
|
|
19867
19884
|
DEFAULT_MIN_CONTENT_LENGTH = 10;
|
|
19885
|
+
NON_EMBEDDABLE_ORIGIN = "tool_result";
|
|
19868
19886
|
}
|
|
19869
19887
|
});
|
|
19870
19888
|
|
|
@@ -24211,6 +24229,9 @@ __decorateClass([
|
|
|
24211
24229
|
__decorateClass([
|
|
24212
24230
|
(0, import_decorators2.json)("tool_call_events", (raw) => raw)
|
|
24213
24231
|
], Message.prototype, "toolCallEvents", 2);
|
|
24232
|
+
__decorateClass([
|
|
24233
|
+
(0, import_decorators2.text)("origin")
|
|
24234
|
+
], Message.prototype, "origin", 2);
|
|
24214
24235
|
var Conversation = class extends import_watermelondb2.Model {
|
|
24215
24236
|
};
|
|
24216
24237
|
Conversation.table = "conversations";
|
|
@@ -24618,7 +24639,7 @@ __decorateClass([
|
|
|
24618
24639
|
], VaultFolder.prototype, "context", 2);
|
|
24619
24640
|
|
|
24620
24641
|
// src/lib/db/schema.ts
|
|
24621
|
-
var SDK_SCHEMA_VERSION =
|
|
24642
|
+
var SDK_SCHEMA_VERSION = 44;
|
|
24622
24643
|
var sdkSchema = (0, import_watermelondb12.appSchema)({
|
|
24623
24644
|
version: SDK_SCHEMA_VERSION,
|
|
24624
24645
|
tables: [
|
|
@@ -24656,8 +24677,10 @@ var sdkSchema = (0, import_watermelondb12.appSchema)({
|
|
|
24656
24677
|
// Parent message for branching
|
|
24657
24678
|
{ name: "feedback", type: "string", isOptional: true },
|
|
24658
24679
|
// 'like' | 'dislike' | null
|
|
24659
|
-
{ name: "tool_call_events", type: "string", isOptional: true }
|
|
24680
|
+
{ name: "tool_call_events", type: "string", isOptional: true },
|
|
24660
24681
|
// JSON stringified LlmapiToolCallEvent[]
|
|
24682
|
+
{ name: "origin", type: "string", isOptional: true }
|
|
24683
|
+
// MessageOrigin — provenance, NOT encrypted (see v44)
|
|
24661
24684
|
]
|
|
24662
24685
|
}),
|
|
24663
24686
|
(0, import_watermelondb12.tableSchema)({
|
|
@@ -25585,6 +25608,19 @@ var sdkMigrations = (0, import_migrations.schemaMigrations)({
|
|
|
25585
25608
|
"CREATE INDEX IF NOT EXISTS conversations_is_deleted_created_at ON conversations (is_deleted, created_at);"
|
|
25586
25609
|
)
|
|
25587
25610
|
]
|
|
25611
|
+
},
|
|
25612
|
+
// v43 -> v44: Added origin column to history — the provenance tag the embedding
|
|
25613
|
+
// sweep reads to skip never-rendered tool-result rows. No backfill: NULL means
|
|
25614
|
+
// "legacy, provenance unknown" and keeps the pre-v44 behaviour of embedding the
|
|
25615
|
+
// row, so the only rows that stop being embedded are ones a v44+ producer tagged.
|
|
25616
|
+
{
|
|
25617
|
+
toVersion: 44,
|
|
25618
|
+
steps: [
|
|
25619
|
+
(0, import_migrations.addColumns)({
|
|
25620
|
+
table: "history",
|
|
25621
|
+
columns: [{ name: "origin", type: "string", isOptional: true }]
|
|
25622
|
+
})
|
|
25623
|
+
]
|
|
25588
25624
|
}
|
|
25589
25625
|
]
|
|
25590
25626
|
});
|
package/dist/server/index.d.mts
CHANGED
|
@@ -91,8 +91,20 @@ import { ResultCallback } from '@nozbe/watermelondb/utils/fp/Result';
|
|
|
91
91
|
* conversation list read filters is_deleted and orders by created_at DESC,
|
|
92
92
|
* which previously meant a temp B-tree sort of the whole live set on every
|
|
93
93
|
* read. Structural only — no column added, no data rewritten
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
* - v44: Added origin column to history — provenance of a row, set by the
|
|
95
|
+
* producer that synthesised it (`tool_result` = the hidden
|
|
96
|
+
* `[Tool Execution Results]` message written from autoExecutedToolResults).
|
|
97
|
+
* The embedding sweep skips those rows: they are machine-readable API dumps
|
|
98
|
+
* that are never rendered, and chunking one cost 52 MB of vectors (620
|
|
99
|
+
* chunks) against 0.2 MB of content. A content-prefix test cannot do this
|
|
100
|
+
* job — `content` is `enc:v3:` ciphertext by the time the sweep reads it, so
|
|
101
|
+
* provenance has to be recorded at write time. Deliberately NOT encrypted:
|
|
102
|
+
* the sweep that must honour it runs with no wallet context, and an
|
|
103
|
+
* unreadable flag would fail open. Existing rows stay NULL (= legacy,
|
|
104
|
+
* unknown provenance, embedded as before) with no backfill, matching the v37
|
|
105
|
+
* read-time-fallback precedent
|
|
106
|
+
*/
|
|
107
|
+
declare const SDK_SCHEMA_VERSION = 44;
|
|
96
108
|
/**
|
|
97
109
|
* Combined WatermelonDB schema for all SDK storage modules.
|
|
98
110
|
*
|
|
@@ -180,6 +192,7 @@ declare const sdkSchema: Readonly<{
|
|
|
180
192
|
* - v40 → v41: Added `visibility`, `twin_opt_in`, `published_at`, `geohash` columns to memory_vault for the People Nearby cross-user visibility axis (two-tier `private | public`; null/unknown grandfathered as 'private')
|
|
181
193
|
* - v41 → v42: Added `topics` + `topics_updated_at` columns to memory_vault, making a memory's topics the durable synced record and `entity`/`memory_entity` a device-local index over it (null `topics` = pre-v42, backfilled from the row's current links by the sweep)
|
|
182
194
|
* - v42 → v43: Added a composite `(is_deleted, created_at)` index to conversations so the list reads stop temp-sorting (structural only, no data rewritten)
|
|
195
|
+
* - v43 → v44: Added `origin` column to history recording which producer synthesised a row, so the embedding sweep can skip never-rendered tool-result dumps (plaintext by design — the sweep has no wallet context; null = legacy, embedded as before)
|
|
183
196
|
*/
|
|
184
197
|
declare const sdkMigrations: Readonly<{
|
|
185
198
|
validated: true;
|
|
@@ -3406,6 +3419,22 @@ type ChatRole = "user" | "assistant" | "system";
|
|
|
3406
3419
|
* - null/undefined: No feedback given
|
|
3407
3420
|
*/
|
|
3408
3421
|
type MessageFeedback = "like" | "dislike" | null;
|
|
3422
|
+
/**
|
|
3423
|
+
* Which producer synthesised a message, for rows the user did not type and the
|
|
3424
|
+
* UI does not render. Set at write time by that producer; a union so further
|
|
3425
|
+
* synthetic kinds can be added without another column.
|
|
3426
|
+
*
|
|
3427
|
+
* - `tool_result`: the hidden `[Tool Execution Results]` row built from a
|
|
3428
|
+
* turn's auto-executed tool results. Skipped by the embedding sweep (see
|
|
3429
|
+
* `memoryEngine/embeddings`).
|
|
3430
|
+
* - undefined/null: a normal message, or any row written before v44.
|
|
3431
|
+
*
|
|
3432
|
+
* Stored in the plaintext `origin` column — never encrypted. The deferred
|
|
3433
|
+
* embedding sweep that has to honour it runs without wallet context, so an
|
|
3434
|
+
* encrypted flag would be unreadable exactly where it matters and the skip
|
|
3435
|
+
* would fail open.
|
|
3436
|
+
*/
|
|
3437
|
+
type MessageOrigin = "tool_result";
|
|
3409
3438
|
/**
|
|
3410
3439
|
* Metadata for files attached to messages.
|
|
3411
3440
|
*
|
|
@@ -3516,6 +3545,8 @@ interface StoredMessage {
|
|
|
3516
3545
|
feedback?: MessageFeedback;
|
|
3517
3546
|
/** Tool call events from the backend response (for reconstructing tool call history) */
|
|
3518
3547
|
toolCallEvents?: LlmapiToolCallEvent[];
|
|
3548
|
+
/** Provenance for synthetic rows; undefined for typed messages and pre-v44 rows */
|
|
3549
|
+
origin?: MessageOrigin;
|
|
3519
3550
|
/**
|
|
3520
3551
|
* Set when `content` could not be decrypted on read (#561).
|
|
3521
3552
|
* The `content` field still holds the original ciphertext — never a
|
|
@@ -3655,6 +3686,8 @@ interface CreateMessageOptions {
|
|
|
3655
3686
|
parentMessageId?: string;
|
|
3656
3687
|
/** Tool call events from the backend response (for reconstructing tool call history) */
|
|
3657
3688
|
toolCallEvents?: LlmapiToolCallEvent[];
|
|
3689
|
+
/** Provenance for synthetic rows; set by the producer, never by user input */
|
|
3690
|
+
origin?: MessageOrigin;
|
|
3658
3691
|
/**
|
|
3659
3692
|
* Optional pre-generated unique ID for this message.
|
|
3660
3693
|
* When provided, used as the WatermelonDB record ID instead of auto-generating one.
|
|
@@ -3700,6 +3733,8 @@ declare class Message extends Model$1 {
|
|
|
3700
3733
|
parentMessageId?: string;
|
|
3701
3734
|
feedback?: MessageFeedback;
|
|
3702
3735
|
toolCallEvents?: LlmapiToolCallEvent[];
|
|
3736
|
+
/** Plaintext by design — see MessageOrigin */
|
|
3737
|
+
origin?: MessageOrigin;
|
|
3703
3738
|
}
|
|
3704
3739
|
declare class Conversation extends Model$1 {
|
|
3705
3740
|
static table: string;
|
|
@@ -10034,4 +10069,4 @@ declare function sanitizeQuotes(s: string): string;
|
|
|
10034
10069
|
declare function renderTemplate(value: string | null | undefined, template: string): string | null;
|
|
10035
10070
|
declare function buildSystemPrompt(ctx: PromptContext, options?: BuildPromptOptions): BuildPromptResult;
|
|
10036
10071
|
|
|
10037
|
-
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|
|
10072
|
+
export { type AnalyzeStyleOptions, type AnalyzeStyleResult, type ApiResponse, type ApiType, type AutoExecutedToolResult, type AutoExtractMessage, type AutoExtractor, type Budget, type BuildPromptOptions, type BuildPromptResult, type CachedChunkVectors, type CachedServerTools, type ChatCompletionUsage, type ChatRole, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type ConnectorGuidance, type ConnectorGuidanceInput, type ConsolidationFallbackReason, Conversation, ConversationSummary, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateUserPreferenceOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_ANALYSIS_PROMPT, DEFAULT_ANALYZE_AFTER_MESSAGES, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_DOCUMENT_PATTERN, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MAX_INPUT_MESSAGES, DEFAULT_MAX_PROFILE_LENGTH, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_MIN_MESSAGES, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, DEFAULT_PROMPT_TEMPLATES, DEFAULT_REFRESH_EVERY_MESSAGES, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_SUMMARY_MIN_WINDOW_MESSAGES, DEFAULT_SUMMARY_MODEL, DEFAULT_SUMMARY_TOKEN_THRESHOLD, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DecayCandidateRaw, type DecayClassifier, type DecayInput, type DecayPolicy, type DecaySweepResult, type DecaySweeper, type DecayVerdict, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LlmTokenUsage, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryQuarantinedEvent, type MemoryToVerify, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MemoryVerification, Message, type MessageChunk, type MessageFeedback, type MessageOrigin, type ModelCallEndEvent, type ModelCallStartEvent, ModelPreference, NEVER_TTL_MS, NODE_BUDGET, type NeighborRefiner, type NowSource, type ObservationTrend, type ObservationTrendInput, type OperationExecutor, PAST_EVENT_GRACE_MS, PROFILE_DOC_VERSION, type ParsedServerToolsResponse, PdfProcessor, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PgClientLike, type PgPoolLike, type PlatformStorage, type PortalLlmAuth, PostgreSQLAdapter, type PostgreSQLAdapterOptions, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type ProfileUpdate, Project, type ProjectOperationsContext, type PromptContext, type PromptPreProcessor, type PromptPreProcessorContext, type PromptSection, type PromptTemplates, type QuarantinedMemoryInfo, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RankedProfileCandidate, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type ReflectOptions, type ReflectResult, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, type RunEndEvent, type RunErrorEvent, type RunHooks, type RunStartEvent, type RunTerminalState, type RunToolLoopOptions, type RunToolLoopResult, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SHORT_TTL_MS, SLIDER_CONFIG, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectServerToolsForPromptOptions, type ServerTool, type ServerToolCallEvent, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SettingsStorageOperationsContext, type SignMessageFn, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredConversation, type StoredConversationSummary, type StoredFileWithContext, type StoredMedia, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, type StoredProject, type StoredUserPreference, type StoredVaultMemory, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type StreamingTransport, type StreamingTransportOptions, type StreamingTransportResult, type StyleAnalysisSchedule, type SynthesizeProfileOptions, TOOL_CATALOG, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, TextProcessor, type ToolConfig, type ToolExecutor, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type ToolUseEndEvent, type ToolUseStartEvent, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateUserPreferenceOptions, type UpdateVaultMemoryOptions, UserPreference, type UserPreferencesStorageOperationsContext, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, VaultMemory, type VaultMemoryOperationsContext, type VaultMemoryVisibility, type VaultSaveOperation, type VaultSearchResult, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, WordProcessor, ZipProcessor, type ZipProcessorOptions, activatedToolSetNames, analyzeStyle, archiveVaultMemoryOp, backfillMemoryTopicsOp, buildConnectorGuidance, buildDeniedToolsRider, buildSystemPrompt, capHopsForDensity, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, cleanupConversationSummary, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearEncryptionKey, clearKeyPair, clearLazyTitleCache, clearMessagesOp, clearServerToolsCache, composeHooks, createAutoExtractor, createChunkVectorCache, createConversationOp, createCryptoPricePreProcessor, createDecaySweeper, createLlmDecayClassifier, createLlmNeighborRefiner, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageOp, createMessageSourceResolver, createPlatformCursorStore, createProjectOp, createRecallTool, createServerToolsFilter, createStockPricePreProcessor, createSummaryContext, createVaultEmbeddingCache, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllVaultMemoriesForUserOp, deleteConversationOp, deleteConversationSummaryOp, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllFilesOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAudioOp, getCachedServerTools, getConversationOp, getConversationSummaryOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsOp, getConversationsPageOp, getDecayCandidatesRawOp, getDocumentsOp, getEncryptionKey, getImagesOp, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesNeedingTopicExtractionOp, getMessageOp, getMessagesOp, getModelPreferenceOp, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getServerTools, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserPreferenceOp, getUserUploadedMediaOp, getVaultMemoryOp, getVideosOp, hardDeleteDecayedOp, hardDeleteMediaOp, hasEncryptionKey, hasKeyPair, injectionSignatureCatalog, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, preEmbedVaultMemories, preprocessFiles, progressiveSummarize, projectToStored, queueManager, rankProfileCandidates, recall, reflect, refreshEncryptionKeyIfMatches, relinkMemoryTopicsOp, relinkMisclassifiedVideosOp, renderTemplate, requestEncryptionKey, requestKeyPair, restoreVaultMemoryOp, resumeStream, retain, runToolLoop, sanitizeQuotes, schemaToCreateSQL, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, seedEncryptionKeys, selectServerToolsForPrompt, serverPlatformStorage, setMemoryVisibilityOp, setModelPreferenceOp, setUserPreferenceOp, shouldAnalyzeStyle, shouldChunkMessage, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, summarizeObservationTrends, summaryToSystemMessage, supersedeVaultMemoryOp, synthesizeProfile, toolSetSystemPrompts, traverseGraphLane, ttlForType, updateConversationProjectOp, updateConversationTitleOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageChunksOp, updateMessageEmbeddingOp, updateMessageErrorOp, updateMessageFeedbackOp, updateModelsOp, updatePersonalityOp, updateProfileOp, updateProjectNameOp, updateProjectOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertConversationSummaryOp, upsertMessageOp, verifyMemoriesForPublish };
|