@anuma/sdk 6.44.0 → 7.0.1
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/index.cjs +137 -9
- package/dist/expo/index.d.mts +8 -1
- package/dist/expo/index.d.ts +8 -1
- package/dist/expo/index.mjs +136 -9
- package/dist/index.cjs +188 -212
- package/dist/index.d.mts +1 -149
- package/dist/index.d.ts +1 -149
- package/dist/index.mjs +188 -209
- package/dist/react/index.cjs +4386 -7331
- package/dist/react/index.d.mts +38 -1016
- package/dist/react/index.d.ts +38 -1016
- package/dist/react/index.mjs +2955 -5844
- package/dist/server/index.cjs +126 -5
- package/dist/server/index.d.mts +8 -1
- package/dist/server/index.d.ts +8 -1
- package/dist/server/index.mjs +125 -5
- package/package.json +1 -1
package/dist/server/index.cjs
CHANGED
|
@@ -16424,6 +16424,7 @@ __export(index_exports, {
|
|
|
16424
16424
|
encryptDataBatch: () => encryptDataBatch,
|
|
16425
16425
|
encryptDataBytes: () => encryptDataBytes,
|
|
16426
16426
|
encryptDataWithKey: () => encryptDataWithKey,
|
|
16427
|
+
encryptToolCallEventsOp: () => encryptToolCallEventsOp,
|
|
16427
16428
|
estimateMessagesTokens: () => estimateMessagesTokens,
|
|
16428
16429
|
estimateTokens: () => estimateTokens,
|
|
16429
16430
|
exportPublicKey: () => exportPublicKey,
|
|
@@ -17814,6 +17815,12 @@ async function encryptMessageFields(message, address, signMessage, embeddedWalle
|
|
|
17814
17815
|
const encryptedChunks = msg.chunks ? await encryptJsonField(msg.chunks, address, signMessage, embeddedWalletSigner, true) : void 0;
|
|
17815
17816
|
const encryptedSources = msg.sources ? await encryptJsonField(msg.sources, address, signMessage, embeddedWalletSigner, true) : void 0;
|
|
17816
17817
|
const encryptedThoughtProcess = msg.thoughtProcess ? await encryptJsonField(msg.thoughtProcess, address, signMessage, embeddedWalletSigner, true) : void 0;
|
|
17818
|
+
const encryptedToolCallEvents = Array.isArray(msg.toolCallEvents) ? await encryptToolCallEvents(
|
|
17819
|
+
msg.toolCallEvents,
|
|
17820
|
+
address,
|
|
17821
|
+
signMessage,
|
|
17822
|
+
embeddedWalletSigner
|
|
17823
|
+
) : void 0;
|
|
17817
17824
|
return {
|
|
17818
17825
|
...message,
|
|
17819
17826
|
...encryptedContent !== void 0 && { content: encryptedContent },
|
|
@@ -17821,13 +17828,31 @@ async function encryptMessageFields(message, address, signMessage, embeddedWalle
|
|
|
17821
17828
|
...encryptedVector !== void 0 && { vector: encryptedVector },
|
|
17822
17829
|
...encryptedChunks !== void 0 && { chunks: encryptedChunks },
|
|
17823
17830
|
...encryptedSources !== void 0 && { sources: encryptedSources },
|
|
17824
|
-
...encryptedThoughtProcess !== void 0 && { thoughtProcess: encryptedThoughtProcess }
|
|
17831
|
+
...encryptedThoughtProcess !== void 0 && { thoughtProcess: encryptedThoughtProcess },
|
|
17832
|
+
...encryptedToolCallEvents !== void 0 && { toolCallEvents: encryptedToolCallEvents }
|
|
17825
17833
|
};
|
|
17826
17834
|
} catch (error) {
|
|
17827
17835
|
getLogger().warn("Failed to encrypt message fields:", error);
|
|
17828
17836
|
throw error;
|
|
17829
17837
|
}
|
|
17830
17838
|
}
|
|
17839
|
+
function mapToolCallPayloads(events, transform) {
|
|
17840
|
+
return Promise.all(
|
|
17841
|
+
events.map(async (event) => {
|
|
17842
|
+
if (!event || typeof event !== "object") return event;
|
|
17843
|
+
const mapped = { ...event };
|
|
17844
|
+
if (typeof event.arguments === "string") mapped.arguments = await transform(event.arguments);
|
|
17845
|
+
if (typeof event.output === "string") mapped.output = await transform(event.output);
|
|
17846
|
+
return mapped;
|
|
17847
|
+
})
|
|
17848
|
+
);
|
|
17849
|
+
}
|
|
17850
|
+
function encryptToolCallEvents(events, address, signMessage, embeddedWalletSigner) {
|
|
17851
|
+
return mapToolCallPayloads(
|
|
17852
|
+
events,
|
|
17853
|
+
(value) => encryptField(value, address, signMessage, embeddedWalletSigner, true)
|
|
17854
|
+
);
|
|
17855
|
+
}
|
|
17831
17856
|
async function decryptMaybeJsonFieldDetailed(value, address) {
|
|
17832
17857
|
if (value === void 0) return { value: void 0, status: "plaintext" };
|
|
17833
17858
|
if (value === null) return { value, status: "plaintext" };
|
|
@@ -17913,6 +17938,10 @@ async function assembleDecryptedMessage(message, address) {
|
|
|
17913
17938
|
message.thoughtProcess,
|
|
17914
17939
|
address
|
|
17915
17940
|
);
|
|
17941
|
+
const toolCallEventsResult = await decryptMaybeJsonFieldDetailed(
|
|
17942
|
+
message.toolCallEvents,
|
|
17943
|
+
address
|
|
17944
|
+
);
|
|
17916
17945
|
let decryptionStatus;
|
|
17917
17946
|
let refreshProbe;
|
|
17918
17947
|
const consider = (status, probe) => {
|
|
@@ -17931,6 +17960,14 @@ async function assembleDecryptedMessage(message, address) {
|
|
|
17931
17960
|
if (thoughtProcessResult.probe) {
|
|
17932
17961
|
consider(thoughtProcessResult.status, thoughtProcessResult.probe);
|
|
17933
17962
|
}
|
|
17963
|
+
if (toolCallEventsResult.probe) {
|
|
17964
|
+
consider(toolCallEventsResult.status, toolCallEventsResult.probe);
|
|
17965
|
+
}
|
|
17966
|
+
const toolCallEvents = Array.isArray(toolCallEventsResult.value) ? await mapToolCallPayloads(toolCallEventsResult.value, async (value) => {
|
|
17967
|
+
const detailed = await decryptFieldDetailed(value, address);
|
|
17968
|
+
consider(detailed.status, isEncrypted(value) ? value : void 0);
|
|
17969
|
+
return detailed.value;
|
|
17970
|
+
}) : void 0;
|
|
17934
17971
|
const statusForConsumer = decryptionStatus === "ok" || decryptionStatus === "plaintext" || !decryptionStatus ? void 0 : decryptionStatus;
|
|
17935
17972
|
const result = {
|
|
17936
17973
|
...message,
|
|
@@ -17939,7 +17976,8 @@ async function assembleDecryptedMessage(message, address) {
|
|
|
17939
17976
|
vector: vectorResult.value,
|
|
17940
17977
|
chunks: chunksResult.value,
|
|
17941
17978
|
sources: sourcesResult.value,
|
|
17942
|
-
thoughtProcess: thoughtProcessResult.value
|
|
17979
|
+
thoughtProcess: thoughtProcessResult.value,
|
|
17980
|
+
toolCallEvents
|
|
17943
17981
|
};
|
|
17944
17982
|
if (statusForConsumer) {
|
|
17945
17983
|
result.decryptionStatus = statusForConsumer;
|
|
@@ -18505,7 +18543,7 @@ async function updateMessageChunksOp(ctx, uniqueId, chunks, embeddingModel) {
|
|
|
18505
18543
|
});
|
|
18506
18544
|
return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
18507
18545
|
}
|
|
18508
|
-
var
|
|
18546
|
+
var RAW_REPAIR_PAGE_SIZE = 100;
|
|
18509
18547
|
function chunksWithoutText(raw) {
|
|
18510
18548
|
if (typeof raw !== "string") return null;
|
|
18511
18549
|
let parsed;
|
|
@@ -18528,8 +18566,8 @@ function chunksWithoutText(raw) {
|
|
|
18528
18566
|
async function stripLegacyChunkTextOp(ctx) {
|
|
18529
18567
|
const candidateIds = await ctx.messagesCollection.query(import_watermelondb2.Q.where("chunks", import_watermelondb2.Q.like(`%${import_watermelondb2.Q.sanitizeLikeString('"text":')}%`))).fetchIds();
|
|
18530
18568
|
let stripped = 0;
|
|
18531
|
-
for (let start = 0; start < candidateIds.length; start +=
|
|
18532
|
-
const pageIds = candidateIds.slice(start, start +
|
|
18569
|
+
for (let start = 0; start < candidateIds.length; start += RAW_REPAIR_PAGE_SIZE) {
|
|
18570
|
+
const pageIds = candidateIds.slice(start, start + RAW_REPAIR_PAGE_SIZE);
|
|
18533
18571
|
const rows = await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf(pageIds))).unsafeFetchRaw();
|
|
18534
18572
|
const changedIds = rows.filter((row) => chunksWithoutText(row.chunks) !== null).map((row) => String(row.id));
|
|
18535
18573
|
if (changedIds.length === 0) continue;
|
|
@@ -18553,6 +18591,88 @@ async function stripLegacyChunkTextOp(ctx) {
|
|
|
18553
18591
|
}
|
|
18554
18592
|
return stripped;
|
|
18555
18593
|
}
|
|
18594
|
+
async function encryptedToolCallEventsColumn(raw, address, signMessage, embeddedWalletSigner) {
|
|
18595
|
+
if (typeof raw !== "string") return null;
|
|
18596
|
+
let parsed;
|
|
18597
|
+
try {
|
|
18598
|
+
parsed = JSON.parse(raw);
|
|
18599
|
+
} catch {
|
|
18600
|
+
return null;
|
|
18601
|
+
}
|
|
18602
|
+
if (!Array.isArray(parsed)) return null;
|
|
18603
|
+
const column = JSON.stringify(
|
|
18604
|
+
await encryptToolCallEvents(
|
|
18605
|
+
parsed,
|
|
18606
|
+
address,
|
|
18607
|
+
signMessage,
|
|
18608
|
+
embeddedWalletSigner
|
|
18609
|
+
)
|
|
18610
|
+
);
|
|
18611
|
+
return column === JSON.stringify(parsed) ? null : column;
|
|
18612
|
+
}
|
|
18613
|
+
async function encryptToolCallEventsOp(ctx) {
|
|
18614
|
+
const { walletAddress: address, signMessage, embeddedWalletSigner } = ctx;
|
|
18615
|
+
if (!address || !signMessage) return 0;
|
|
18616
|
+
if (!await requestEncryptionKey(address, signMessage, embeddedWalletSigner)) return 0;
|
|
18617
|
+
if (!hasEncryptionKey(address)) return 0;
|
|
18618
|
+
if (!await savedKeyOpensExistingData(ctx, address, signMessage, embeddedWalletSigner)) {
|
|
18619
|
+
return 0;
|
|
18620
|
+
}
|
|
18621
|
+
const candidateIds = await ctx.messagesCollection.query(
|
|
18622
|
+
import_watermelondb2.Q.where("tool_call_events", import_watermelondb2.Q.notEq(null)),
|
|
18623
|
+
import_watermelondb2.Q.where("tool_call_events", import_watermelondb2.Q.notIn(["", "[]"]))
|
|
18624
|
+
).fetchIds();
|
|
18625
|
+
let encrypted = 0;
|
|
18626
|
+
for (let start = 0; start < candidateIds.length; start += RAW_REPAIR_PAGE_SIZE) {
|
|
18627
|
+
const pageIds = candidateIds.slice(start, start + RAW_REPAIR_PAGE_SIZE);
|
|
18628
|
+
const rows = await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf(pageIds))).unsafeFetchRaw();
|
|
18629
|
+
const repairs = /* @__PURE__ */ new Map();
|
|
18630
|
+
for (const row of rows) {
|
|
18631
|
+
const column = await encryptedToolCallEventsColumn(
|
|
18632
|
+
row.tool_call_events,
|
|
18633
|
+
address,
|
|
18634
|
+
signMessage,
|
|
18635
|
+
embeddedWalletSigner
|
|
18636
|
+
);
|
|
18637
|
+
if (column !== null) repairs.set(String(row.id), { raw: row.tool_call_events, column });
|
|
18638
|
+
}
|
|
18639
|
+
if (repairs.size === 0) continue;
|
|
18640
|
+
await ctx.database.write(async () => {
|
|
18641
|
+
const messages = (await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf([...repairs.keys()]))).fetch()).filter(
|
|
18642
|
+
(message) => message._raw.tool_call_events === repairs.get(message.id)?.raw
|
|
18643
|
+
);
|
|
18644
|
+
if (messages.length === 0) return;
|
|
18645
|
+
const conversationIds = [...new Set(messages.map((message) => message.conversationId))];
|
|
18646
|
+
const conversations = await ctx.conversationsCollection.query(import_watermelondb2.Q.where("conversation_id", import_watermelondb2.Q.oneOf(conversationIds))).fetch();
|
|
18647
|
+
await ctx.database.batch(
|
|
18648
|
+
...messages.map(
|
|
18649
|
+
(message) => message.prepareUpdate((msg) => {
|
|
18650
|
+
msg._setRaw("tool_call_events", repairs.get(message.id).column);
|
|
18651
|
+
})
|
|
18652
|
+
),
|
|
18653
|
+
...conversations.map((conversation) => conversation.prepareUpdate(() => {
|
|
18654
|
+
}))
|
|
18655
|
+
);
|
|
18656
|
+
encrypted += messages.length;
|
|
18657
|
+
});
|
|
18658
|
+
}
|
|
18659
|
+
return encrypted;
|
|
18660
|
+
}
|
|
18661
|
+
async function savedKeyOpensExistingData(ctx, address, signMessage, embeddedWalletSigner) {
|
|
18662
|
+
const v3Probe = await findEncryptedContent(ctx, "enc:v3:%");
|
|
18663
|
+
if (v3Probe) {
|
|
18664
|
+
const { status } = await decryptFieldDetailed(v3Probe, address);
|
|
18665
|
+
if (status !== "auth_mismatch" && status !== "key_missing") return true;
|
|
18666
|
+
return refreshEncryptionKeyIfMatches(address, v3Probe, signMessage, embeddedWalletSigner);
|
|
18667
|
+
}
|
|
18668
|
+
const v2Probe = await findEncryptedContent(ctx, "enc:v2:%");
|
|
18669
|
+
if (!v2Probe) return true;
|
|
18670
|
+
return refreshEncryptionKeyIfMatches(address, v2Probe, signMessage, embeddedWalletSigner);
|
|
18671
|
+
}
|
|
18672
|
+
async function findEncryptedContent(ctx, pattern) {
|
|
18673
|
+
const [row] = await ctx.messagesCollection.query(import_watermelondb2.Q.where("content", import_watermelondb2.Q.like(pattern)), import_watermelondb2.Q.take(1)).unsafeFetchRaw();
|
|
18674
|
+
return row ? String(row.content) : null;
|
|
18675
|
+
}
|
|
18556
18676
|
async function updateMessageErrorOp(ctx, uniqueId, error) {
|
|
18557
18677
|
let message;
|
|
18558
18678
|
try {
|
|
@@ -39427,6 +39547,7 @@ function serverPlatformStorage() {
|
|
|
39427
39547
|
encryptDataBatch,
|
|
39428
39548
|
encryptDataBytes,
|
|
39429
39549
|
encryptDataWithKey,
|
|
39550
|
+
encryptToolCallEventsOp,
|
|
39430
39551
|
estimateMessagesTokens,
|
|
39431
39552
|
estimateTokens,
|
|
39432
39553
|
exportPublicKey,
|
package/dist/server/index.d.mts
CHANGED
|
@@ -3826,6 +3826,13 @@ declare function updateMessageChunksOp(ctx: StorageOperationsContext, uniqueId:
|
|
|
3826
3826
|
* @returns Number of rows stripped.
|
|
3827
3827
|
*/
|
|
3828
3828
|
declare function stripLegacyChunkTextOp(ctx: StorageOperationsContext): Promise<number>;
|
|
3829
|
+
/**
|
|
3830
|
+
* Encrypts tool call arguments and results still stored in plaintext and
|
|
3831
|
+
* returns how many rows changed, giving each touched conversation a new
|
|
3832
|
+
* `updatedAt` so backups re-upload it, which moves it to the top of any list
|
|
3833
|
+
* sorted by `updatedAt`.
|
|
3834
|
+
*/
|
|
3835
|
+
declare function encryptToolCallEventsOp(ctx: StorageOperationsContext): Promise<number>;
|
|
3829
3836
|
declare function updateMessageErrorOp(ctx: StorageOperationsContext, uniqueId: string, error: string): Promise<StoredMessage | null>;
|
|
3830
3837
|
/**
|
|
3831
3838
|
* Update the feedback (like/dislike) for a message.
|
|
@@ -10929,4 +10936,4 @@ declare class PostgreSQLAdapter implements DatabaseAdapter {
|
|
|
10929
10936
|
*/
|
|
10930
10937
|
declare function serverPlatformStorage(): PlatformStorage;
|
|
10931
10938
|
|
|
10932
|
-
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 ConsolidationAction, 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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, type LocalMemoryStoreOptions, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, 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 PublishedPhotoMemory, 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 RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, 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 TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, 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, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryKind, 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, assembleMemoryContext, 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, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, 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, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, 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, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, 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, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, 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 };
|
|
10939
|
+
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 ConsolidationAction, 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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, type LocalMemoryStoreOptions, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, 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 PublishedPhotoMemory, 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 RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, 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 TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, 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, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryKind, 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, assembleMemoryContext, 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, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, 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, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, encryptToolCallEventsOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, 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, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, 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, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, 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 };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -3826,6 +3826,13 @@ declare function updateMessageChunksOp(ctx: StorageOperationsContext, uniqueId:
|
|
|
3826
3826
|
* @returns Number of rows stripped.
|
|
3827
3827
|
*/
|
|
3828
3828
|
declare function stripLegacyChunkTextOp(ctx: StorageOperationsContext): Promise<number>;
|
|
3829
|
+
/**
|
|
3830
|
+
* Encrypts tool call arguments and results still stored in plaintext and
|
|
3831
|
+
* returns how many rows changed, giving each touched conversation a new
|
|
3832
|
+
* `updatedAt` so backups re-upload it, which moves it to the top of any list
|
|
3833
|
+
* sorted by `updatedAt`.
|
|
3834
|
+
*/
|
|
3835
|
+
declare function encryptToolCallEventsOp(ctx: StorageOperationsContext): Promise<number>;
|
|
3829
3836
|
declare function updateMessageErrorOp(ctx: StorageOperationsContext, uniqueId: string, error: string): Promise<StoredMessage | null>;
|
|
3830
3837
|
/**
|
|
3831
3838
|
* Update the feedback (like/dislike) for a message.
|
|
@@ -10929,4 +10936,4 @@ declare class PostgreSQLAdapter implements DatabaseAdapter {
|
|
|
10929
10936
|
*/
|
|
10930
10937
|
declare function serverPlatformStorage(): PlatformStorage;
|
|
10931
10938
|
|
|
10932
|
-
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 ConsolidationAction, 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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, type LocalMemoryStoreOptions, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, 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 PublishedPhotoMemory, 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 RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, 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 TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, 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, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryKind, 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, assembleMemoryContext, 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, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, 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, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, 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, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, 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, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, 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 };
|
|
10939
|
+
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 ConsolidationAction, 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, type DurableAutoExtractorOptions, ENTITY_FANOUT, type EmbeddedWalletSignerFn, EncryptionKeyMissingError, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, 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, type LocalMemoryStoreOptions, MAX_HOPS, MAX_MESSAGES_PER_SUMMARIZATION, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, Media, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryQuarantinedEvent, type MemoryRecallOptions, type MemoryRetainOptions, type MemoryStore, type MemorySubscribeOptions, type MemoryToVerify, type MemoryTopic, type MemoryTopicBacklog, type MemoryTopicMaintenance, type MemoryUpdate, 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 PhotoIngestResult, type PhotoMediaRef, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, 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 PublishedPhotoMemory, 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 RecallEmptyReason, type RecallOptions, type RecallResult, type RecallTelemetryCallbacks, type RecallToolCallbacks, type RecallToolOptions, type RecallTruncation, 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 TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSkipReason, 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, type VaultEmbeddingExpectation, VaultMemory, type VaultMemoryKind, 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, assembleMemoryContext, 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, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, 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, deleteMessageOp, deleteModelPreferenceOp, deleteProjectOp, deleteUserPreferenceOp, deleteVaultMemoryOp, deriveKeyFromSignatureBytes, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, encryptToolCallEventsOp, estimateMessagesTokens, estimateTokens, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, findMatchingTools, formatFileProcessingNotes, 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, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isDegradedTopicSkip, isRerankerAvailable, isSupportedFile, isSupportedMediaType, makeSyntheticStoredConversation, makeSyntheticStoredMessage, maybeSummarizeHistory, mediaToStored, migrateFromModelPreferencesOp, onKeyAvailable, parseMedia, 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, shouldRecallMemory, shouldRefreshTools, splitMessagesAtThreshold, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, 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 };
|
package/dist/server/index.mjs
CHANGED
|
@@ -16162,6 +16162,12 @@ async function encryptMessageFields(message, address, signMessage, embeddedWalle
|
|
|
16162
16162
|
const encryptedChunks = msg.chunks ? await encryptJsonField(msg.chunks, address, signMessage, embeddedWalletSigner, true) : void 0;
|
|
16163
16163
|
const encryptedSources = msg.sources ? await encryptJsonField(msg.sources, address, signMessage, embeddedWalletSigner, true) : void 0;
|
|
16164
16164
|
const encryptedThoughtProcess = msg.thoughtProcess ? await encryptJsonField(msg.thoughtProcess, address, signMessage, embeddedWalletSigner, true) : void 0;
|
|
16165
|
+
const encryptedToolCallEvents = Array.isArray(msg.toolCallEvents) ? await encryptToolCallEvents(
|
|
16166
|
+
msg.toolCallEvents,
|
|
16167
|
+
address,
|
|
16168
|
+
signMessage,
|
|
16169
|
+
embeddedWalletSigner
|
|
16170
|
+
) : void 0;
|
|
16165
16171
|
return {
|
|
16166
16172
|
...message,
|
|
16167
16173
|
...encryptedContent !== void 0 && { content: encryptedContent },
|
|
@@ -16169,13 +16175,31 @@ async function encryptMessageFields(message, address, signMessage, embeddedWalle
|
|
|
16169
16175
|
...encryptedVector !== void 0 && { vector: encryptedVector },
|
|
16170
16176
|
...encryptedChunks !== void 0 && { chunks: encryptedChunks },
|
|
16171
16177
|
...encryptedSources !== void 0 && { sources: encryptedSources },
|
|
16172
|
-
...encryptedThoughtProcess !== void 0 && { thoughtProcess: encryptedThoughtProcess }
|
|
16178
|
+
...encryptedThoughtProcess !== void 0 && { thoughtProcess: encryptedThoughtProcess },
|
|
16179
|
+
...encryptedToolCallEvents !== void 0 && { toolCallEvents: encryptedToolCallEvents }
|
|
16173
16180
|
};
|
|
16174
16181
|
} catch (error) {
|
|
16175
16182
|
getLogger().warn("Failed to encrypt message fields:", error);
|
|
16176
16183
|
throw error;
|
|
16177
16184
|
}
|
|
16178
16185
|
}
|
|
16186
|
+
function mapToolCallPayloads(events, transform) {
|
|
16187
|
+
return Promise.all(
|
|
16188
|
+
events.map(async (event) => {
|
|
16189
|
+
if (!event || typeof event !== "object") return event;
|
|
16190
|
+
const mapped = { ...event };
|
|
16191
|
+
if (typeof event.arguments === "string") mapped.arguments = await transform(event.arguments);
|
|
16192
|
+
if (typeof event.output === "string") mapped.output = await transform(event.output);
|
|
16193
|
+
return mapped;
|
|
16194
|
+
})
|
|
16195
|
+
);
|
|
16196
|
+
}
|
|
16197
|
+
function encryptToolCallEvents(events, address, signMessage, embeddedWalletSigner) {
|
|
16198
|
+
return mapToolCallPayloads(
|
|
16199
|
+
events,
|
|
16200
|
+
(value) => encryptField(value, address, signMessage, embeddedWalletSigner, true)
|
|
16201
|
+
);
|
|
16202
|
+
}
|
|
16179
16203
|
async function decryptMaybeJsonFieldDetailed(value, address) {
|
|
16180
16204
|
if (value === void 0) return { value: void 0, status: "plaintext" };
|
|
16181
16205
|
if (value === null) return { value, status: "plaintext" };
|
|
@@ -16261,6 +16285,10 @@ async function assembleDecryptedMessage(message, address) {
|
|
|
16261
16285
|
message.thoughtProcess,
|
|
16262
16286
|
address
|
|
16263
16287
|
);
|
|
16288
|
+
const toolCallEventsResult = await decryptMaybeJsonFieldDetailed(
|
|
16289
|
+
message.toolCallEvents,
|
|
16290
|
+
address
|
|
16291
|
+
);
|
|
16264
16292
|
let decryptionStatus;
|
|
16265
16293
|
let refreshProbe;
|
|
16266
16294
|
const consider = (status, probe) => {
|
|
@@ -16279,6 +16307,14 @@ async function assembleDecryptedMessage(message, address) {
|
|
|
16279
16307
|
if (thoughtProcessResult.probe) {
|
|
16280
16308
|
consider(thoughtProcessResult.status, thoughtProcessResult.probe);
|
|
16281
16309
|
}
|
|
16310
|
+
if (toolCallEventsResult.probe) {
|
|
16311
|
+
consider(toolCallEventsResult.status, toolCallEventsResult.probe);
|
|
16312
|
+
}
|
|
16313
|
+
const toolCallEvents = Array.isArray(toolCallEventsResult.value) ? await mapToolCallPayloads(toolCallEventsResult.value, async (value) => {
|
|
16314
|
+
const detailed = await decryptFieldDetailed(value, address);
|
|
16315
|
+
consider(detailed.status, isEncrypted(value) ? value : void 0);
|
|
16316
|
+
return detailed.value;
|
|
16317
|
+
}) : void 0;
|
|
16282
16318
|
const statusForConsumer = decryptionStatus === "ok" || decryptionStatus === "plaintext" || !decryptionStatus ? void 0 : decryptionStatus;
|
|
16283
16319
|
const result = {
|
|
16284
16320
|
...message,
|
|
@@ -16287,7 +16323,8 @@ async function assembleDecryptedMessage(message, address) {
|
|
|
16287
16323
|
vector: vectorResult.value,
|
|
16288
16324
|
chunks: chunksResult.value,
|
|
16289
16325
|
sources: sourcesResult.value,
|
|
16290
|
-
thoughtProcess: thoughtProcessResult.value
|
|
16326
|
+
thoughtProcess: thoughtProcessResult.value,
|
|
16327
|
+
toolCallEvents
|
|
16291
16328
|
};
|
|
16292
16329
|
if (statusForConsumer) {
|
|
16293
16330
|
result.decryptionStatus = statusForConsumer;
|
|
@@ -16853,7 +16890,7 @@ async function updateMessageChunksOp(ctx, uniqueId, chunks, embeddingModel) {
|
|
|
16853
16890
|
});
|
|
16854
16891
|
return messageToStored(message, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner);
|
|
16855
16892
|
}
|
|
16856
|
-
var
|
|
16893
|
+
var RAW_REPAIR_PAGE_SIZE = 100;
|
|
16857
16894
|
function chunksWithoutText(raw) {
|
|
16858
16895
|
if (typeof raw !== "string") return null;
|
|
16859
16896
|
let parsed;
|
|
@@ -16876,8 +16913,8 @@ function chunksWithoutText(raw) {
|
|
|
16876
16913
|
async function stripLegacyChunkTextOp(ctx) {
|
|
16877
16914
|
const candidateIds = await ctx.messagesCollection.query(import_watermelondb2.Q.where("chunks", import_watermelondb2.Q.like(`%${import_watermelondb2.Q.sanitizeLikeString('"text":')}%`))).fetchIds();
|
|
16878
16915
|
let stripped = 0;
|
|
16879
|
-
for (let start = 0; start < candidateIds.length; start +=
|
|
16880
|
-
const pageIds = candidateIds.slice(start, start +
|
|
16916
|
+
for (let start = 0; start < candidateIds.length; start += RAW_REPAIR_PAGE_SIZE) {
|
|
16917
|
+
const pageIds = candidateIds.slice(start, start + RAW_REPAIR_PAGE_SIZE);
|
|
16881
16918
|
const rows = await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf(pageIds))).unsafeFetchRaw();
|
|
16882
16919
|
const changedIds = rows.filter((row) => chunksWithoutText(row.chunks) !== null).map((row) => String(row.id));
|
|
16883
16920
|
if (changedIds.length === 0) continue;
|
|
@@ -16901,6 +16938,88 @@ async function stripLegacyChunkTextOp(ctx) {
|
|
|
16901
16938
|
}
|
|
16902
16939
|
return stripped;
|
|
16903
16940
|
}
|
|
16941
|
+
async function encryptedToolCallEventsColumn(raw, address, signMessage, embeddedWalletSigner) {
|
|
16942
|
+
if (typeof raw !== "string") return null;
|
|
16943
|
+
let parsed;
|
|
16944
|
+
try {
|
|
16945
|
+
parsed = JSON.parse(raw);
|
|
16946
|
+
} catch {
|
|
16947
|
+
return null;
|
|
16948
|
+
}
|
|
16949
|
+
if (!Array.isArray(parsed)) return null;
|
|
16950
|
+
const column = JSON.stringify(
|
|
16951
|
+
await encryptToolCallEvents(
|
|
16952
|
+
parsed,
|
|
16953
|
+
address,
|
|
16954
|
+
signMessage,
|
|
16955
|
+
embeddedWalletSigner
|
|
16956
|
+
)
|
|
16957
|
+
);
|
|
16958
|
+
return column === JSON.stringify(parsed) ? null : column;
|
|
16959
|
+
}
|
|
16960
|
+
async function encryptToolCallEventsOp(ctx) {
|
|
16961
|
+
const { walletAddress: address, signMessage, embeddedWalletSigner } = ctx;
|
|
16962
|
+
if (!address || !signMessage) return 0;
|
|
16963
|
+
if (!await requestEncryptionKey(address, signMessage, embeddedWalletSigner)) return 0;
|
|
16964
|
+
if (!hasEncryptionKey(address)) return 0;
|
|
16965
|
+
if (!await savedKeyOpensExistingData(ctx, address, signMessage, embeddedWalletSigner)) {
|
|
16966
|
+
return 0;
|
|
16967
|
+
}
|
|
16968
|
+
const candidateIds = await ctx.messagesCollection.query(
|
|
16969
|
+
import_watermelondb2.Q.where("tool_call_events", import_watermelondb2.Q.notEq(null)),
|
|
16970
|
+
import_watermelondb2.Q.where("tool_call_events", import_watermelondb2.Q.notIn(["", "[]"]))
|
|
16971
|
+
).fetchIds();
|
|
16972
|
+
let encrypted = 0;
|
|
16973
|
+
for (let start = 0; start < candidateIds.length; start += RAW_REPAIR_PAGE_SIZE) {
|
|
16974
|
+
const pageIds = candidateIds.slice(start, start + RAW_REPAIR_PAGE_SIZE);
|
|
16975
|
+
const rows = await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf(pageIds))).unsafeFetchRaw();
|
|
16976
|
+
const repairs = /* @__PURE__ */ new Map();
|
|
16977
|
+
for (const row of rows) {
|
|
16978
|
+
const column = await encryptedToolCallEventsColumn(
|
|
16979
|
+
row.tool_call_events,
|
|
16980
|
+
address,
|
|
16981
|
+
signMessage,
|
|
16982
|
+
embeddedWalletSigner
|
|
16983
|
+
);
|
|
16984
|
+
if (column !== null) repairs.set(String(row.id), { raw: row.tool_call_events, column });
|
|
16985
|
+
}
|
|
16986
|
+
if (repairs.size === 0) continue;
|
|
16987
|
+
await ctx.database.write(async () => {
|
|
16988
|
+
const messages = (await ctx.messagesCollection.query(import_watermelondb2.Q.where("id", import_watermelondb2.Q.oneOf([...repairs.keys()]))).fetch()).filter(
|
|
16989
|
+
(message) => message._raw.tool_call_events === repairs.get(message.id)?.raw
|
|
16990
|
+
);
|
|
16991
|
+
if (messages.length === 0) return;
|
|
16992
|
+
const conversationIds = [...new Set(messages.map((message) => message.conversationId))];
|
|
16993
|
+
const conversations = await ctx.conversationsCollection.query(import_watermelondb2.Q.where("conversation_id", import_watermelondb2.Q.oneOf(conversationIds))).fetch();
|
|
16994
|
+
await ctx.database.batch(
|
|
16995
|
+
...messages.map(
|
|
16996
|
+
(message) => message.prepareUpdate((msg) => {
|
|
16997
|
+
msg._setRaw("tool_call_events", repairs.get(message.id).column);
|
|
16998
|
+
})
|
|
16999
|
+
),
|
|
17000
|
+
...conversations.map((conversation) => conversation.prepareUpdate(() => {
|
|
17001
|
+
}))
|
|
17002
|
+
);
|
|
17003
|
+
encrypted += messages.length;
|
|
17004
|
+
});
|
|
17005
|
+
}
|
|
17006
|
+
return encrypted;
|
|
17007
|
+
}
|
|
17008
|
+
async function savedKeyOpensExistingData(ctx, address, signMessage, embeddedWalletSigner) {
|
|
17009
|
+
const v3Probe = await findEncryptedContent(ctx, "enc:v3:%");
|
|
17010
|
+
if (v3Probe) {
|
|
17011
|
+
const { status } = await decryptFieldDetailed(v3Probe, address);
|
|
17012
|
+
if (status !== "auth_mismatch" && status !== "key_missing") return true;
|
|
17013
|
+
return refreshEncryptionKeyIfMatches(address, v3Probe, signMessage, embeddedWalletSigner);
|
|
17014
|
+
}
|
|
17015
|
+
const v2Probe = await findEncryptedContent(ctx, "enc:v2:%");
|
|
17016
|
+
if (!v2Probe) return true;
|
|
17017
|
+
return refreshEncryptionKeyIfMatches(address, v2Probe, signMessage, embeddedWalletSigner);
|
|
17018
|
+
}
|
|
17019
|
+
async function findEncryptedContent(ctx, pattern) {
|
|
17020
|
+
const [row] = await ctx.messagesCollection.query(import_watermelondb2.Q.where("content", import_watermelondb2.Q.like(pattern)), import_watermelondb2.Q.take(1)).unsafeFetchRaw();
|
|
17021
|
+
return row ? String(row.content) : null;
|
|
17022
|
+
}
|
|
16904
17023
|
async function updateMessageErrorOp(ctx, uniqueId, error) {
|
|
16905
17024
|
let message;
|
|
16906
17025
|
try {
|
|
@@ -37687,6 +37806,7 @@ export {
|
|
|
37687
37806
|
encryptDataBatch,
|
|
37688
37807
|
encryptDataBytes,
|
|
37689
37808
|
encryptDataWithKey,
|
|
37809
|
+
encryptToolCallEventsOp,
|
|
37690
37810
|
estimateMessagesTokens,
|
|
37691
37811
|
estimateTokens,
|
|
37692
37812
|
exportPublicKey,
|