@anuma/sdk 2.6.1 → 3.0.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-TCRDSUC6.mjs → chunk-IY7NNIYM.mjs} +149 -42
- package/dist/expo/index.cjs +184 -43
- package/dist/expo/index.d.mts +53 -2
- package/dist/expo/index.d.ts +53 -2
- package/dist/expo/index.mjs +38 -3
- package/dist/expo/{recall-FQU3NUTL.mjs → recall-DJ5LD5WJ.mjs} +1 -1
- package/dist/index.cjs +8 -6
- package/dist/index.mjs +8 -6
- package/dist/react/{chunk-ZXS3KOY4.mjs → chunk-OSDVRDLI.mjs} +151 -44
- package/dist/react/index.cjs +210 -55
- package/dist/react/index.d.mts +53 -2
- package/dist/react/index.d.ts +53 -2
- package/dist/react/index.mjs +62 -13
- package/dist/react/{recall-PV7L3SN3.mjs → recall-3BDCIEQF.mjs} +1 -1
- package/dist/server/{chunk-Z6II54I7.mjs → chunk-QQOIC37O.mjs} +157 -26
- package/dist/server/index.cjs +202 -31
- package/dist/server/index.d.mts +92 -29
- package/dist/server/index.d.ts +92 -29
- package/dist/server/index.mjs +50 -7
- package/dist/server/{recall-CQT24XLH.mjs → recall-6QLUEYB7.mjs} +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -2280,6 +2280,67 @@ async function messageToStored(message, walletAddress, signMessage, embeddedWall
|
|
|
2280
2280
|
}
|
|
2281
2281
|
return baseMessage;
|
|
2282
2282
|
}
|
|
2283
|
+
function rawDate(value) {
|
|
2284
|
+
return new Date(typeof value === "number" ? value : 0);
|
|
2285
|
+
}
|
|
2286
|
+
function messageRawToStoredRaw(raw, projection) {
|
|
2287
|
+
const parseJsonField = (rawValue) => {
|
|
2288
|
+
if (!rawValue) return void 0;
|
|
2289
|
+
if (typeof rawValue === "string") {
|
|
2290
|
+
if (rawValue.startsWith("enc:")) return rawValue;
|
|
2291
|
+
try {
|
|
2292
|
+
return JSON.parse(rawValue);
|
|
2293
|
+
} catch {
|
|
2294
|
+
return void 0;
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
return rawValue;
|
|
2298
|
+
};
|
|
2299
|
+
const skipEmbeddings = projection?.skipEmbeddings === true;
|
|
2300
|
+
const vectorRaw = skipEmbeddings ? null : raw.vector;
|
|
2301
|
+
const chunksRaw = skipEmbeddings ? null : raw.chunks;
|
|
2302
|
+
return {
|
|
2303
|
+
uniqueId: raw.id,
|
|
2304
|
+
messageId: raw.message_id,
|
|
2305
|
+
conversationId: raw.conversation_id ?? "",
|
|
2306
|
+
role: raw.role ?? "",
|
|
2307
|
+
content: raw.content ?? "",
|
|
2308
|
+
model: raw.model,
|
|
2309
|
+
imageModel: raw.image_model,
|
|
2310
|
+
files: parseJsonField(raw.files),
|
|
2311
|
+
fileIds: parseJsonField(raw.file_ids),
|
|
2312
|
+
createdAt: rawDate(raw.created_at),
|
|
2313
|
+
updatedAt: rawDate(raw.updated_at),
|
|
2314
|
+
vector: skipEmbeddings ? void 0 : parseJsonField(vectorRaw),
|
|
2315
|
+
embeddingModel: raw.embedding_model,
|
|
2316
|
+
chunks: skipEmbeddings ? void 0 : parseJsonField(chunksRaw),
|
|
2317
|
+
usage: parseJsonField(raw.usage),
|
|
2318
|
+
sources: parseJsonField(raw.sources),
|
|
2319
|
+
responseDuration: raw.response_duration,
|
|
2320
|
+
// `was_stopped` is an OPTIONAL boolean: an unset row sanitizes to null, and the Model path
|
|
2321
|
+
// (message.wasStopped) returns that null verbatim. Preserve it (don't collapse to false) so the
|
|
2322
|
+
// raw path is byte-identical. When set, coerce SQLite 0/1 and LokiJS true/false alike.
|
|
2323
|
+
wasStopped: raw.was_stopped === null || raw.was_stopped === void 0 ? raw.was_stopped : raw.was_stopped === true || raw.was_stopped === 1,
|
|
2324
|
+
error: raw.error,
|
|
2325
|
+
thoughtProcess: parseJsonField(raw.thought_process),
|
|
2326
|
+
thinking: raw.thinking,
|
|
2327
|
+
parentMessageId: raw.parent_message_id,
|
|
2328
|
+
feedback: raw.feedback || null,
|
|
2329
|
+
toolCallEvents: parseJsonField(raw.tool_call_events)
|
|
2330
|
+
};
|
|
2331
|
+
}
|
|
2332
|
+
async function messageRawToStored(raw, walletAddress, signMessage, embeddedWalletSigner, projection) {
|
|
2333
|
+
const baseMessage = messageRawToStoredRaw(raw, projection);
|
|
2334
|
+
if (walletAddress) {
|
|
2335
|
+
return await decryptMessageFields(
|
|
2336
|
+
baseMessage,
|
|
2337
|
+
walletAddress,
|
|
2338
|
+
signMessage,
|
|
2339
|
+
embeddedWalletSigner
|
|
2340
|
+
);
|
|
2341
|
+
}
|
|
2342
|
+
return baseMessage;
|
|
2343
|
+
}
|
|
2283
2344
|
function conversationToStoredRaw(conversation) {
|
|
2284
2345
|
return {
|
|
2285
2346
|
uniqueId: conversation.id,
|
|
@@ -2304,6 +2365,33 @@ async function conversationToStored(conversation, walletAddress, signMessage, em
|
|
|
2304
2365
|
}
|
|
2305
2366
|
return baseConversation;
|
|
2306
2367
|
}
|
|
2368
|
+
function conversationRawToStoredRaw(raw) {
|
|
2369
|
+
const pinnedAt = raw.pinned_at;
|
|
2370
|
+
return {
|
|
2371
|
+
uniqueId: raw.id,
|
|
2372
|
+
conversationId: raw.conversation_id ?? "",
|
|
2373
|
+
title: raw.title ?? "",
|
|
2374
|
+
projectId: raw.project_id,
|
|
2375
|
+
createdAt: rawDate(raw.created_at),
|
|
2376
|
+
updatedAt: rawDate(raw.updated_at),
|
|
2377
|
+
// SQLite stores booleans as 0/1, LokiJS as true/false — coerce both.
|
|
2378
|
+
isDeleted: raw.is_deleted === true || raw.is_deleted === 1,
|
|
2379
|
+
// @date maps a non-number raw column (incl. an explicit unpin null) to null; a number → Date.
|
|
2380
|
+
pinnedAt: typeof pinnedAt === "number" ? new Date(pinnedAt) : null
|
|
2381
|
+
};
|
|
2382
|
+
}
|
|
2383
|
+
async function conversationRawToStored(raw, walletAddress, signMessage, embeddedWalletSigner) {
|
|
2384
|
+
const baseConversation = conversationRawToStoredRaw(raw);
|
|
2385
|
+
if (walletAddress) {
|
|
2386
|
+
return await decryptConversationFields(
|
|
2387
|
+
baseConversation,
|
|
2388
|
+
walletAddress,
|
|
2389
|
+
signMessage,
|
|
2390
|
+
embeddedWalletSigner
|
|
2391
|
+
);
|
|
2392
|
+
}
|
|
2393
|
+
return baseConversation;
|
|
2394
|
+
}
|
|
2307
2395
|
async function createConversationOp(ctx, opts, defaultTitle = "New Conversation") {
|
|
2308
2396
|
const convId = opts?.conversationId || generateConversationId();
|
|
2309
2397
|
const title = opts?.title || defaultTitle;
|
|
@@ -2343,36 +2431,51 @@ async function getConversationOp(ctx, id) {
|
|
|
2343
2431
|
) : null;
|
|
2344
2432
|
}
|
|
2345
2433
|
async function getConversationsOp(ctx) {
|
|
2346
|
-
const results = await ctx.conversationsCollection.query(import_watermelondb.Q.where("is_deleted", false), import_watermelondb.Q.sortBy("created_at", import_watermelondb.Q.desc)).
|
|
2434
|
+
const results = await ctx.conversationsCollection.query(import_watermelondb.Q.where("is_deleted", false), import_watermelondb.Q.sortBy("created_at", import_watermelondb.Q.desc)).unsafeFetchRaw();
|
|
2347
2435
|
return Promise.all(
|
|
2348
2436
|
results.map(
|
|
2349
|
-
(
|
|
2437
|
+
(raw) => conversationRawToStored(raw, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner)
|
|
2350
2438
|
)
|
|
2351
2439
|
);
|
|
2352
2440
|
}
|
|
2353
|
-
function
|
|
2441
|
+
function conversationRawToLazyStored(raw) {
|
|
2442
|
+
const pinnedAt = raw.pinned_at;
|
|
2354
2443
|
return {
|
|
2355
|
-
uniqueId:
|
|
2356
|
-
conversationId:
|
|
2357
|
-
encryptedTitle:
|
|
2358
|
-
projectId:
|
|
2359
|
-
createdAt:
|
|
2360
|
-
updatedAt:
|
|
2361
|
-
isDeleted:
|
|
2362
|
-
pinnedAt:
|
|
2444
|
+
uniqueId: raw.id,
|
|
2445
|
+
conversationId: raw.conversation_id ?? "",
|
|
2446
|
+
encryptedTitle: raw.title ?? "",
|
|
2447
|
+
projectId: raw.project_id,
|
|
2448
|
+
createdAt: rawDate(raw.created_at),
|
|
2449
|
+
updatedAt: rawDate(raw.updated_at),
|
|
2450
|
+
isDeleted: raw.is_deleted === true || raw.is_deleted === 1,
|
|
2451
|
+
pinnedAt: typeof pinnedAt === "number" ? new Date(pinnedAt) : null
|
|
2363
2452
|
};
|
|
2364
2453
|
}
|
|
2365
2454
|
async function getConversationsLazyOp(ctx) {
|
|
2366
|
-
const results = await ctx.conversationsCollection.query(import_watermelondb.Q.where("is_deleted", false), import_watermelondb.Q.sortBy("created_at", import_watermelondb.Q.desc)).
|
|
2367
|
-
return results.map(
|
|
2455
|
+
const results = await ctx.conversationsCollection.query(import_watermelondb.Q.where("is_deleted", false), import_watermelondb.Q.sortBy("created_at", import_watermelondb.Q.desc)).unsafeFetchRaw();
|
|
2456
|
+
return results.map(conversationRawToLazyStored);
|
|
2457
|
+
}
|
|
2458
|
+
async function getConversationsPageOp(ctx, options) {
|
|
2459
|
+
const limit = Math.floor(options?.limit ?? 200);
|
|
2460
|
+
if (!Number.isFinite(limit) || limit < 1) return [];
|
|
2461
|
+
const exclude = new Set(options?.boundaryExcludeUniqueIds ?? []);
|
|
2462
|
+
const clauses = [import_watermelondb.Q.where("is_deleted", false)];
|
|
2463
|
+
if (options?.before !== void 0) {
|
|
2464
|
+
clauses.push(
|
|
2465
|
+
exclude.size > 0 ? import_watermelondb.Q.where("created_at", import_watermelondb.Q.lte(options.before)) : import_watermelondb.Q.where("created_at", import_watermelondb.Q.lt(options.before))
|
|
2466
|
+
);
|
|
2467
|
+
}
|
|
2468
|
+
const fetched = await ctx.conversationsCollection.query(...clauses, import_watermelondb.Q.sortBy("created_at", import_watermelondb.Q.desc), import_watermelondb.Q.take(limit + exclude.size)).unsafeFetchRaw();
|
|
2469
|
+
const results = exclude.size > 0 ? fetched.filter((raw) => !exclude.has(raw.id)) : fetched;
|
|
2470
|
+
return results.slice(0, limit).map(conversationRawToLazyStored);
|
|
2368
2471
|
}
|
|
2369
2472
|
async function getConversationsByProjectLazyOp(ctx, projectId) {
|
|
2370
2473
|
const results = await ctx.conversationsCollection.query(
|
|
2371
2474
|
import_watermelondb.Q.where("project_id", projectId === null ? "" : projectId),
|
|
2372
2475
|
import_watermelondb.Q.where("is_deleted", false),
|
|
2373
2476
|
import_watermelondb.Q.sortBy("created_at", import_watermelondb.Q.desc)
|
|
2374
|
-
).
|
|
2375
|
-
return results.map(
|
|
2477
|
+
).unsafeFetchRaw();
|
|
2478
|
+
return results.map(conversationRawToLazyStored);
|
|
2376
2479
|
}
|
|
2377
2480
|
async function updateConversationTitleOp(ctx, id, title) {
|
|
2378
2481
|
const results = await ctx.conversationsCollection.query(import_watermelondb.Q.where("conversation_id", id), import_watermelondb.Q.where("is_deleted", false)).fetch();
|
|
@@ -2434,18 +2537,18 @@ async function getConversationsByProjectOp(ctx, projectId) {
|
|
|
2434
2537
|
import_watermelondb.Q.where("project_id", projectId === null ? "" : projectId),
|
|
2435
2538
|
import_watermelondb.Q.where("is_deleted", false),
|
|
2436
2539
|
import_watermelondb.Q.sortBy("created_at", import_watermelondb.Q.desc)
|
|
2437
|
-
).
|
|
2540
|
+
).unsafeFetchRaw();
|
|
2438
2541
|
return Promise.all(
|
|
2439
2542
|
results.map(
|
|
2440
|
-
(
|
|
2543
|
+
(raw) => conversationRawToStored(raw, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner)
|
|
2441
2544
|
)
|
|
2442
2545
|
);
|
|
2443
2546
|
}
|
|
2444
2547
|
async function getMessagesOp(ctx, convId) {
|
|
2445
|
-
const results = await ctx.messagesCollection.query(import_watermelondb.Q.where("conversation_id", convId), import_watermelondb.Q.sortBy("message_id", import_watermelondb.Q.asc)).
|
|
2548
|
+
const results = await ctx.messagesCollection.query(import_watermelondb.Q.where("conversation_id", convId), import_watermelondb.Q.sortBy("message_id", import_watermelondb.Q.asc)).unsafeFetchRaw();
|
|
2446
2549
|
return Promise.all(
|
|
2447
2550
|
results.map(
|
|
2448
|
-
(
|
|
2551
|
+
(raw) => messageRawToStored(raw, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner)
|
|
2449
2552
|
)
|
|
2450
2553
|
);
|
|
2451
2554
|
}
|
|
@@ -2462,39 +2565,40 @@ async function getMessagesPageOp(ctx, convId, opts) {
|
|
|
2462
2565
|
exclude.size > 0 ? import_watermelondb.Q.where("message_id", import_watermelondb.Q.lte(opts.beforeMessageId)) : import_watermelondb.Q.where("message_id", import_watermelondb.Q.lt(opts.beforeMessageId))
|
|
2463
2566
|
);
|
|
2464
2567
|
}
|
|
2465
|
-
const fetched = await ctx.messagesCollection.query(...clauses, import_watermelondb.Q.sortBy("message_id", import_watermelondb.Q.desc), import_watermelondb.Q.take(limit + exclude.size)).
|
|
2466
|
-
const results = (exclude.size > 0 ? fetched.filter((
|
|
2568
|
+
const fetched = await ctx.messagesCollection.query(...clauses, import_watermelondb.Q.sortBy("message_id", import_watermelondb.Q.desc), import_watermelondb.Q.take(limit + exclude.size)).unsafeFetchRaw();
|
|
2569
|
+
const results = (exclude.size > 0 ? fetched.filter((raw) => !exclude.has(raw.id)) : fetched).slice(0, limit);
|
|
2467
2570
|
results.reverse();
|
|
2468
2571
|
return Promise.all(
|
|
2469
2572
|
results.map(
|
|
2470
|
-
(
|
|
2573
|
+
(raw) => messageRawToStored(raw, ctx.walletAddress, ctx.signMessage, ctx.embeddedWalletSigner, {
|
|
2471
2574
|
skipEmbeddings: true
|
|
2472
2575
|
})
|
|
2473
2576
|
)
|
|
2474
2577
|
);
|
|
2475
2578
|
}
|
|
2476
2579
|
async function getMessageSkeletonsOp(ctx, convId) {
|
|
2477
|
-
const results = await ctx.messagesCollection.query(import_watermelondb.Q.where("conversation_id", convId), import_watermelondb.Q.sortBy("message_id", import_watermelondb.Q.asc)).
|
|
2580
|
+
const results = await ctx.messagesCollection.query(import_watermelondb.Q.where("conversation_id", convId), import_watermelondb.Q.sortBy("message_id", import_watermelondb.Q.asc)).unsafeFetchRaw();
|
|
2478
2581
|
const roleById = /* @__PURE__ */ new Map();
|
|
2479
|
-
for (const
|
|
2480
|
-
roleById.set(
|
|
2481
|
-
}
|
|
2482
|
-
const skeletons = results.map((
|
|
2483
|
-
uniqueId:
|
|
2484
|
-
messageId:
|
|
2485
|
-
conversationId:
|
|
2486
|
-
role:
|
|
2487
|
-
createdAt:
|
|
2582
|
+
for (const raw of results) {
|
|
2583
|
+
roleById.set(raw.id, raw.role);
|
|
2584
|
+
}
|
|
2585
|
+
const skeletons = results.map((raw) => ({
|
|
2586
|
+
uniqueId: raw.id,
|
|
2587
|
+
messageId: raw.message_id,
|
|
2588
|
+
conversationId: raw.conversation_id ?? "",
|
|
2589
|
+
role: raw.role ?? "",
|
|
2590
|
+
createdAt: rawDate(raw.created_at),
|
|
2488
2591
|
// WatermelonDB surfaces unset text columns as null at runtime — normalize
|
|
2489
2592
|
// to undefined so `parentMessageId ?? undefined` keying works everywhere.
|
|
2490
|
-
parentMessageId:
|
|
2491
|
-
model:
|
|
2593
|
+
parentMessageId: raw.parent_message_id ?? void 0,
|
|
2594
|
+
model: raw.model ?? void 0
|
|
2492
2595
|
}));
|
|
2493
2596
|
const artifactIndices = [];
|
|
2494
2597
|
for (let i = 0; i < results.length; i++) {
|
|
2495
|
-
const
|
|
2496
|
-
|
|
2497
|
-
if (
|
|
2598
|
+
const raw = results[i];
|
|
2599
|
+
const parentMessageId = raw.parent_message_id;
|
|
2600
|
+
if (raw.role !== "user" || !parentMessageId) continue;
|
|
2601
|
+
if (roleById.get(parentMessageId) === "user") {
|
|
2498
2602
|
artifactIndices.push(i);
|
|
2499
2603
|
}
|
|
2500
2604
|
}
|
|
@@ -3168,7 +3272,7 @@ async function generateEmbedding(text12, options) {
|
|
|
3168
3272
|
const { baseUrl = BASE_URL, getToken, apiKey, model, cache } = options;
|
|
3169
3273
|
if (cache) {
|
|
3170
3274
|
const cached = cache.get(text12);
|
|
3171
|
-
if (cached) return cached;
|
|
3275
|
+
if (cached) return Array.from(cached);
|
|
3172
3276
|
}
|
|
3173
3277
|
let headers;
|
|
3174
3278
|
if (apiKey) {
|
|
@@ -3207,10 +3311,11 @@ async function generateEmbedding(text12, options) {
|
|
|
3207
3311
|
totalTokens: response.data.usage.total_tokens ?? 0
|
|
3208
3312
|
});
|
|
3209
3313
|
}
|
|
3314
|
+
const f32Embedding = Float32Array.from(embedding);
|
|
3210
3315
|
if (cache) {
|
|
3211
|
-
cache.set(text12,
|
|
3316
|
+
cache.set(text12, f32Embedding);
|
|
3212
3317
|
}
|
|
3213
|
-
return
|
|
3318
|
+
return Array.from(f32Embedding);
|
|
3214
3319
|
}
|
|
3215
3320
|
async function generateEmbeddingsBatch(texts, headers, baseUrl, model, onUsage, maskInput) {
|
|
3216
3321
|
const response = await withEmbeddingRetry(
|
|
@@ -3246,7 +3351,7 @@ async function generateEmbeddings(texts, options) {
|
|
|
3246
3351
|
if (cache) {
|
|
3247
3352
|
const cached = cache.get(texts[i]);
|
|
3248
3353
|
if (cached) {
|
|
3249
|
-
results[i] = cached;
|
|
3354
|
+
results[i] = Array.from(cached);
|
|
3250
3355
|
continue;
|
|
3251
3356
|
}
|
|
3252
3357
|
}
|
|
@@ -3307,9 +3412,10 @@ async function generateEmbeddings(texts, options) {
|
|
|
3307
3412
|
newEmbeddings = allEmbeddings.flat();
|
|
3308
3413
|
}
|
|
3309
3414
|
for (let i = 0; i < uncachedIndices.length; i++) {
|
|
3310
|
-
|
|
3415
|
+
const f32Embedding = Float32Array.from(newEmbeddings[i]);
|
|
3416
|
+
results[uncachedIndices[i]] = Array.from(f32Embedding);
|
|
3311
3417
|
if (cache) {
|
|
3312
|
-
cache.set(uncachedTexts[i],
|
|
3418
|
+
cache.set(uncachedTexts[i], f32Embedding);
|
|
3313
3419
|
}
|
|
3314
3420
|
}
|
|
3315
3421
|
return results;
|
|
@@ -7597,6 +7703,7 @@ __export(index_exports, {
|
|
|
7597
7703
|
getConversationsByProjectLazyOp: () => getConversationsByProjectLazyOp,
|
|
7598
7704
|
getConversationsByProjectOp: () => getConversationsByProjectOp,
|
|
7599
7705
|
getConversationsLazyOp: () => getConversationsLazyOp,
|
|
7706
|
+
getConversationsPageOp: () => getConversationsPageOp,
|
|
7600
7707
|
getDocumentsOp: () => getDocumentsOp,
|
|
7601
7708
|
getDriveAccessToken: () => getDriveAccessToken,
|
|
7602
7709
|
getEncryptionKey: () => getEncryptionKey,
|
|
@@ -9976,6 +10083,22 @@ function linkAbortSignals(a, b) {
|
|
|
9976
10083
|
}
|
|
9977
10084
|
};
|
|
9978
10085
|
}
|
|
10086
|
+
function validateEndpointOverride(override) {
|
|
10087
|
+
const trimmed = override.trim();
|
|
10088
|
+
if (trimmed === "") {
|
|
10089
|
+
return {
|
|
10090
|
+
valid: false,
|
|
10091
|
+
message: 'endpointOverride must be a non-empty, root-relative path (e.g. "/api/v1/utility/responses"); received an empty or whitespace-only string'
|
|
10092
|
+
};
|
|
10093
|
+
}
|
|
10094
|
+
if (trimmed.startsWith("//") || trimmed.includes("://")) {
|
|
10095
|
+
return {
|
|
10096
|
+
valid: false,
|
|
10097
|
+
message: `endpointOverride must be a root-relative path (e.g. "/api/v1/utility/responses"), not a protocol-relative or absolute URL; received "${trimmed}"`
|
|
10098
|
+
};
|
|
10099
|
+
}
|
|
10100
|
+
return { valid: true, endpoint: trimmed.startsWith("/") ? trimmed : `/${trimmed}` };
|
|
10101
|
+
}
|
|
9979
10102
|
async function runToolLoop(options) {
|
|
9980
10103
|
const {
|
|
9981
10104
|
model,
|
|
@@ -9983,6 +10106,7 @@ async function runToolLoop(options) {
|
|
|
9983
10106
|
baseUrl = BASE_URL,
|
|
9984
10107
|
headers,
|
|
9985
10108
|
apiType = "auto",
|
|
10109
|
+
endpointOverride,
|
|
9986
10110
|
temperature,
|
|
9987
10111
|
maxOutputTokens,
|
|
9988
10112
|
tools,
|
|
@@ -10065,6 +10189,20 @@ async function runToolLoop(options) {
|
|
|
10065
10189
|
await fireRunError({ error: msg, stage: "model", errorObject: new Error(msg) });
|
|
10066
10190
|
return { data: null, error: msg };
|
|
10067
10191
|
}
|
|
10192
|
+
let effectiveEndpoint = strategy.endpoint;
|
|
10193
|
+
if (endpointOverride !== void 0) {
|
|
10194
|
+
const overrideValidation = validateEndpointOverride(endpointOverride);
|
|
10195
|
+
if (!overrideValidation.valid) {
|
|
10196
|
+
if (onError) onError(new Error(overrideValidation.message));
|
|
10197
|
+
await fireRunError({
|
|
10198
|
+
error: overrideValidation.message,
|
|
10199
|
+
stage: "model",
|
|
10200
|
+
errorObject: new Error(overrideValidation.message)
|
|
10201
|
+
});
|
|
10202
|
+
return { data: null, error: overrideValidation.message };
|
|
10203
|
+
}
|
|
10204
|
+
effectiveEndpoint = overrideValidation.endpoint;
|
|
10205
|
+
}
|
|
10068
10206
|
const { signal: combinedSignal, cleanup: cleanupSignalLink } = linkAbortSignals(
|
|
10069
10207
|
signal,
|
|
10070
10208
|
detachSignal
|
|
@@ -10248,7 +10386,7 @@ async function runToolLoop(options) {
|
|
|
10248
10386
|
if (onRequest) onRequest(measureRequest(0, attempt, requestBody, messages, apiTools));
|
|
10249
10387
|
const sseResult = makeStreamingRequest({
|
|
10250
10388
|
baseUrl,
|
|
10251
|
-
endpoint:
|
|
10389
|
+
endpoint: effectiveEndpoint,
|
|
10252
10390
|
body: requestBody,
|
|
10253
10391
|
token,
|
|
10254
10392
|
headers: effectiveHeaders,
|
|
@@ -10720,7 +10858,7 @@ Executing tool: ${toolInfo}
|
|
|
10720
10858
|
const continuationRound = toolIteration;
|
|
10721
10859
|
const continuationResult = makeStreamingRequest({
|
|
10722
10860
|
baseUrl,
|
|
10723
|
-
endpoint:
|
|
10861
|
+
endpoint: effectiveEndpoint,
|
|
10724
10862
|
body: continuationRequestBody,
|
|
10725
10863
|
token,
|
|
10726
10864
|
headers: effectiveHeaders,
|
|
@@ -11137,6 +11275,7 @@ function useChat(options) {
|
|
|
11137
11275
|
imageModel,
|
|
11138
11276
|
apiType: requestApiType,
|
|
11139
11277
|
conversationId,
|
|
11278
|
+
endpointOverride,
|
|
11140
11279
|
piiRedaction: requestPiiRedaction
|
|
11141
11280
|
}) => {
|
|
11142
11281
|
if (abortControllerRef.current) {
|
|
@@ -11206,6 +11345,7 @@ function useChat(options) {
|
|
|
11206
11345
|
baseUrl,
|
|
11207
11346
|
headers,
|
|
11208
11347
|
apiType: requestApiType ?? defaultApiType,
|
|
11348
|
+
endpointOverride,
|
|
11209
11349
|
temperature,
|
|
11210
11350
|
maxOutputTokens,
|
|
11211
11351
|
tools,
|
|
@@ -15969,6 +16109,7 @@ init_redactor();
|
|
|
15969
16109
|
init_logger();
|
|
15970
16110
|
|
|
15971
16111
|
// src/lib/processors/encoding.ts
|
|
16112
|
+
var B64_ENCODE_CHUNK = 32768 * 3;
|
|
15972
16113
|
async function dataUrlToArrayBuffer(dataUrl) {
|
|
15973
16114
|
if (dataUrl.startsWith("blob:") || dataUrl.startsWith("http://") || dataUrl.startsWith("https://")) {
|
|
15974
16115
|
const response = await fetch(dataUrl);
|
|
@@ -15991,11 +16132,28 @@ function uint8ArrayToBase64(data) {
|
|
|
15991
16132
|
if (typeof Buffer !== "undefined") {
|
|
15992
16133
|
return Buffer.from(data).toString("base64");
|
|
15993
16134
|
}
|
|
15994
|
-
let
|
|
15995
|
-
for (let i = 0; i < data.length; i
|
|
15996
|
-
|
|
16135
|
+
let base64 = "";
|
|
16136
|
+
for (let i = 0; i < data.length; i += B64_ENCODE_CHUNK) {
|
|
16137
|
+
const slice = data.subarray(i, i + B64_ENCODE_CHUNK);
|
|
16138
|
+
let binary = "";
|
|
16139
|
+
for (let j = 0; j < slice.length; j++) {
|
|
16140
|
+
binary += String.fromCharCode(slice[j]);
|
|
16141
|
+
}
|
|
16142
|
+
base64 += btoa(binary);
|
|
16143
|
+
}
|
|
16144
|
+
return base64;
|
|
16145
|
+
}
|
|
16146
|
+
function base64ToUint8Array(base64) {
|
|
16147
|
+
if (typeof Buffer !== "undefined") {
|
|
16148
|
+
const buf = Buffer.from(base64, "base64");
|
|
16149
|
+
return new Uint8Array(buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength));
|
|
15997
16150
|
}
|
|
15998
|
-
|
|
16151
|
+
const binary = atob(base64);
|
|
16152
|
+
const bytes = new Uint8Array(binary.length);
|
|
16153
|
+
for (let i = 0; i < binary.length; i++) {
|
|
16154
|
+
bytes[i] = binary.charCodeAt(i);
|
|
16155
|
+
}
|
|
16156
|
+
return bytes;
|
|
15999
16157
|
}
|
|
16000
16158
|
|
|
16001
16159
|
// src/lib/processors/ExcelProcessor.ts
|
|
@@ -26311,7 +26469,7 @@ async function uploadFileToICloud(filename, content) {
|
|
|
26311
26469
|
const database = container.privateCloudDatabase;
|
|
26312
26470
|
const recordName = `backup_${filename.replace(/[^a-zA-Z0-9]/g, "_")}`;
|
|
26313
26471
|
const arrayBuffer = await content.arrayBuffer();
|
|
26314
|
-
const base64Data =
|
|
26472
|
+
const base64Data = uint8ArrayToBase64(new Uint8Array(arrayBuffer));
|
|
26315
26473
|
const record = {
|
|
26316
26474
|
recordType: RECORD_TYPE,
|
|
26317
26475
|
recordName,
|
|
@@ -26373,11 +26531,7 @@ async function downloadICloudFile(recordName) {
|
|
|
26373
26531
|
throw new Error("No data in record");
|
|
26374
26532
|
}
|
|
26375
26533
|
if (typeof dataField === "string") {
|
|
26376
|
-
const
|
|
26377
|
-
const bytes = new Uint8Array(binaryString.length);
|
|
26378
|
-
for (let i = 0; i < binaryString.length; i++) {
|
|
26379
|
-
bytes[i] = binaryString.charCodeAt(i);
|
|
26380
|
-
}
|
|
26534
|
+
const bytes = base64ToUint8Array(dataField);
|
|
26381
26535
|
return new Blob([bytes], { type: "application/json" });
|
|
26382
26536
|
}
|
|
26383
26537
|
if (typeof dataField === "object" && "downloadURL" in dataField) {
|
|
@@ -30560,6 +30714,7 @@ function renderAnumaJsx(jsx3) {
|
|
|
30560
30714
|
getConversationsByProjectLazyOp,
|
|
30561
30715
|
getConversationsByProjectOp,
|
|
30562
30716
|
getConversationsLazyOp,
|
|
30717
|
+
getConversationsPageOp,
|
|
30563
30718
|
getDocumentsOp,
|
|
30564
30719
|
getDriveAccessToken,
|
|
30565
30720
|
getEncryptionKey,
|
package/dist/react/index.d.mts
CHANGED
|
@@ -2192,6 +2192,12 @@ type BaseSendMessageArgs = ResponsesApiOptions & {
|
|
|
2192
2192
|
onData?: (chunk: string) => void;
|
|
2193
2193
|
/** Groups requests belonging to the same conversation for observability. Pass-through only — not forwarded to the LLM provider. */
|
|
2194
2194
|
conversationId?: string;
|
|
2195
|
+
/**
|
|
2196
|
+
* Per-request override for the API path. When set, this request is sent to the
|
|
2197
|
+
* given path instead of the model-resolved endpoint. The request/response
|
|
2198
|
+
* contract is unchanged — only the path differs. Omit to use the default path.
|
|
2199
|
+
*/
|
|
2200
|
+
endpointOverride?: string;
|
|
2195
2201
|
/**
|
|
2196
2202
|
* Per-request override for PII redaction. When set, takes precedence over the
|
|
2197
2203
|
* hook-level `piiRedaction` for this call only — e.g. pass `false` to disable
|
|
@@ -2785,8 +2791,13 @@ interface EmbeddingOptions {
|
|
|
2785
2791
|
* are looked up in this map before calling the API, and new embeddings
|
|
2786
2792
|
* are stored after generation. Useful when the same texts are embedded
|
|
2787
2793
|
* repeatedly (e.g., across eval iterations or re-indexing runs).
|
|
2794
|
+
*
|
|
2795
|
+
* Values are stored as `Float32Array` (the embedding model's native
|
|
2796
|
+
* precision) rather than a float64 `number[]`, halving the resident RAM of
|
|
2797
|
+
* the cache with no precision loss. `generateEmbedding(s)` still return
|
|
2798
|
+
* `number[]` at the API boundary, so callers are unaffected.
|
|
2788
2799
|
*/
|
|
2789
|
-
cache?: Map<string,
|
|
2800
|
+
cache?: Map<string, Float32Array>;
|
|
2790
2801
|
/** Called after each embedding API call with the token usage from the response. */
|
|
2791
2802
|
onUsage?: (usage: {
|
|
2792
2803
|
promptTokens: number;
|
|
@@ -4707,6 +4718,32 @@ interface GetMessagesPageOptions {
|
|
|
4707
4718
|
*/
|
|
4708
4719
|
limit: number;
|
|
4709
4720
|
}
|
|
4721
|
+
/** Options for keyset-paginated conversation-list reads ({@link getConversationsPageOp}). */
|
|
4722
|
+
interface GetConversationsPageOptions {
|
|
4723
|
+
/**
|
|
4724
|
+
* Upper-bound `created_at` cursor (epoch ms). Without
|
|
4725
|
+
* `boundaryExcludeUniqueIds` it is EXCLUSIVE: only conversations with
|
|
4726
|
+
* `createdAt < before` are returned. Omit to fetch the newest page.
|
|
4727
|
+
*/
|
|
4728
|
+
before?: number;
|
|
4729
|
+
/**
|
|
4730
|
+
* uniqueIds of the rows the caller already holds AT the `before` boundary.
|
|
4731
|
+
* `created_at` is NOT unique (a bulk restore/import writes many rows with the
|
|
4732
|
+
* same timestamp) — with an exclusive cursor, an unseen row sharing the
|
|
4733
|
+
* boundary timestamp would be silently skipped by every page. When provided,
|
|
4734
|
+
* the boundary timestamp is fetched INCLUSIVELY and these known rows are
|
|
4735
|
+
* filtered out, so a boundary-timestamp row is returned exactly once. Mirrors
|
|
4736
|
+
* {@link GetMessagesPageOptions.boundaryExcludeUniqueIds}.
|
|
4737
|
+
*/
|
|
4738
|
+
boundaryExcludeUniqueIds?: string[];
|
|
4739
|
+
/**
|
|
4740
|
+
* Maximum rows to return — the NEWEST `limit` rows of the matching range.
|
|
4741
|
+
* Defaults to 200. A non-positive or non-finite value yields an EMPTY page
|
|
4742
|
+
* (never an unbounded read — SQLite treats `LIMIT -1` as "no limit");
|
|
4743
|
+
* fractional values are floored.
|
|
4744
|
+
*/
|
|
4745
|
+
limit?: number;
|
|
4746
|
+
}
|
|
4710
4747
|
/**
|
|
4711
4748
|
* Lightweight, mostly-undecrypted projection of a message row. Contains just
|
|
4712
4749
|
* enough for consumers to build the conversation's branch tree (parent/child
|
|
@@ -5420,6 +5457,20 @@ interface StorageOperationsContext {
|
|
|
5420
5457
|
* for `decryptField` is exactly zero.
|
|
5421
5458
|
*/
|
|
5422
5459
|
declare function getConversationsLazyOp(ctx: StorageOperationsContext): Promise<LazyStoredConversation[]>;
|
|
5460
|
+
/**
|
|
5461
|
+
* Keyset-paginated, lazy (no-decrypt) variant of {@link getConversationsLazyOp}.
|
|
5462
|
+
*
|
|
5463
|
+
* Returns at most `limit` conversations (newest first by `created_at`), each
|
|
5464
|
+
* with its raw stored title under `encryptedTitle` — pair with
|
|
5465
|
+
* {@link decryptConversationTitle} to decrypt on render. Page through older
|
|
5466
|
+
* threads by passing the oldest loaded `createdAt` as `before` plus the
|
|
5467
|
+
* uniqueIds held at that boundary as `boundaryExcludeUniqueIds`.
|
|
5468
|
+
*
|
|
5469
|
+
* Decrypts nothing and builds no WatermelonDB Model (the never-evicted
|
|
5470
|
+
* RecordCache stays empty — web Pile-2). Sort order, soft-delete filtering,
|
|
5471
|
+
* and the encrypted-title projection all match `getConversationsLazyOp`.
|
|
5472
|
+
*/
|
|
5473
|
+
declare function getConversationsPageOp(ctx: StorageOperationsContext, options?: GetConversationsPageOptions): Promise<LazyStoredConversation[]>;
|
|
5423
5474
|
/**
|
|
5424
5475
|
* Lazy variant of {@link getConversationsByProjectOp}.
|
|
5425
5476
|
*
|
|
@@ -12592,4 +12643,4 @@ declare function renderAnumaTree(node: AnumaNode): React.ReactElement | null;
|
|
|
12592
12643
|
*/
|
|
12593
12644
|
declare function renderAnumaJsx(jsx: string): React.ReactElement | null;
|
|
12594
12645
|
|
|
12595
|
-
export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DeckProps, type DisplayToolMigrations, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, ENTITY_KINDS, type EmbeddedWalletSignerFn, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GroupProps, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, type IconProps, type ImageProps, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type Logger, LoggerProvider, type LoggerProviderProps, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageChunk, type MessageFeedback, type MessageSkeleton, type ModelLoadProgress, type OCRFile, type OperationExecutor, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PlatformStorage, type PortalLlmAuth, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type QuantizedEmbedding, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScreenProps, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, THEME_ATTRS, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, backfillMemoryEntityUserIdsOp, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createGitHubTools, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createPlatformCursorStore, createProjectOp, createRecallTool, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, fileExists, findById, findMatchingTools, findParentOfId, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getGithubAccessToken, getGoogleDriveStoredToken, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, preEmbedVaultMemories, preprocessFiles, previewToolSelection, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, readEncryptedFile, recall, reflect, refreshCalendarToken, refreshDriveToken, refreshGithubToken, refreshNotionToken, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, settingsStorageSchema, shouldChunkMessage, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, supersedeVaultMemoryOp, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, walk, webPlatformStorage, writeEncryptedFile };
|
|
12646
|
+
export { Anuma, type AnumaChild, AnumaJsxError, type AnumaNode, AnumaShadowIsolationProvider, type AnumaShadowIsolationProviderProps, type AnumaTheme, AnumaThemeProvider, type AnumaThemeProviderProps, AppFile as AppFileModel, type AppFileOperationsContext, type AttrValue, type AutoExtractMessage, type AutoExtractor, DEFAULT_CONVERSATIONS_FOLDER as BACKUP_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as BACKUP_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER as BACKUP_ICLOUD_FOLDER, BUILT_IN_TOOL_SETS, type BackupAuthContextValue, BackupAuthProvider, type BackupAuthProviderProps, type BackupOperationOptions, BlobUrlManager, type Budget, type CachedChunkVectors, type CachedServerTools, ChartCard, type ChartCardProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChatStorageAdapter, type ChatStorageObservable, type ChunkSearchResult, type ChunkVectorCache, type ChunkingOptions, type CircleProps, type ClientToolsFilterFn, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type ConversationQueryOptions, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateEntityOptions, type CreateMediaOptions, type CreateMessageOptions, type CreateModelPreferenceOptions, type CreateProjectOptions, type CreateSavedToolOptions, type CreateServerToolsFilterOptions, type CreateUserPreferenceOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_BACKUP_FOLDER, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_CONVERSATIONS_FOLDER as DEFAULT_DRIVE_CONVERSATIONS_FOLDER, DEFAULT_ROOT_FOLDER as DEFAULT_DRIVE_ROOT_FOLDER, DEFAULT_BACKUP_FOLDER$1 as DEFAULT_DROPBOX_FOLDER, DEFAULT_EXCLUDED_SERVER_TOOLS, DEFAULT_BACKUP_FOLDER as DEFAULT_ICLOUD_BACKUP_FOLDER, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PERSONALITY_SETTINGS, DEFAULT_SERVER_TOOLS_MATCH_OPTIONS, DEFAULT_VAULT_CACHE_SIZE, DatabaseManager, type DatabaseManagerLogger, type DatabaseManagerOptions, type DeckProps, type DisplayToolMigrations, type DropboxAuthContextValue, DropboxAuthProvider, type DropboxAuthProviderProps, type DropboxExportResult, type DropboxImportResult, ENTITY_KINDS, type EmbeddedWalletSignerFn, type EntityInput, type EntityKind, Entity as EntityModel, type EntityOperationsContext, ExcelProcessor, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, FILE_PLACEHOLDER_PREFIX, FILE_PLACEHOLDER_REGEX, type FactType, type FileMetadata, type FileProcessor, type FileTypeQuery, type FileWithData, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GoogleDriveAuthContextValue, GoogleDriveAuthProvider, type GoogleDriveAuthProviderProps, type GoogleDriveExportResult, type GoogleDriveImportResult, type GroupProps, type ICloudAuthContextValue, ICloudAuthProvider, type ICloudAuthProviderProps, type ICloudExportResult, type ICloudImportResult, INFERENCE_ID_HEADER, type IconProps, type ImageProps, type InteractionType, type KnownTag, type LazyStoredConversation, type LineProps, type Logger, LoggerProvider, type LoggerProviderProps, type MediaDimensions, type MediaFilterOptions, type MediaMetadata, type MediaOperationsContext, type MediaRole, type MediaType, type MemoriesNeedingTopicExtraction, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, MemoryEntity as MemoryEntityModel, type MemoryExtractedEvent, type MemoryKind, type MemoryVaultSearchOptions, type MemoryVaultToolOptions, type MessageChunk, type MessageFeedback, type MessageSkeleton, type ModelLoadProgress, type OCRFile, type OperationExecutor, type ParsedServerToolsResponse, type PdfExportOptions, type PdfExportProgress, type PdfExportStage, type PdfFile, PdfProcessor, type PendingInteraction, type PersonalitySettings, type PersonalitySliders, type PersonalityStyle, type PhoneCallPollingOptions, type PlatformStorage, type PortalLlmAuth, type PreprocessingOptions, type PreprocessingResult, type ProcessedFileResult, ProcessorRegistry, type ProfileUpdate, type ProgressCallback, Project, type ProjectOperationsContext, type PromptPreProcessor, type PromptPreProcessorContext, type ProviderAuthState, type ProviderBackupState, ProviderStreamError, type QuantizedEmbedding, type QueueEncryptionContext, QueueManager, type QueueStatus, type QueuedOperation, type QueuedOperationType, R2_DEFAULT_TTL_MS, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankedMemory, type RecallContext, type RecallDegradation, type RecallDiagnostics, type RecallOptions, type RecallResult, type RecallToolCallbacks, type RecallToolOptions, type RecencyOptions, type RectProps, type ReflectOptions, type ReflectResult, RerankerUnavailableError, type ResumeStreamOptions, type ResumeStreamResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SERVER_TOOL_DEPENDENCY_SETS, SLIDER_CONFIG, SLIDES_FILE_PATH, SLIDE_CANVAS_HEIGHT, SLIDE_CANVAS_WIDTH, STREAM_RESUMABLE_HEADER, SavedTool as SavedToolModel, type SavedToolOperationsContext, type SavedToolParameter, type ScoreBreakdown, type ScreenProps, type SearchMessagesOptions, type SearchSource, type SelectServerToolsForPromptOptions, type SendMessageWithStorageArgs, type SendMessageWithStorageResult, type ServerTool, type ServerToolsFilter, type ServerToolsFilterFn, type ServerToolsFilterFunction, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type SignMessageOptions, type SlideProps, type StepFinishEvent, type StockPriceClassification, type StockPricePreProcessorOptions, type StorageOperationsContext, type StoredAppFile, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredEntity, type StoredFileWithContext, type StoredMedia, Media as StoredMediaModel, type StoredMessage, type StoredMessageWithSimilarity, type StoredModelPreference, ModelPreference as StoredModelPreferenceModel, type StoredProject, type StoredSavedTool, type StoredUserPreference, UserPreference as StoredUserPreferenceModel, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, THEME_ATTRS, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, type TextChunk, TextProcessor, type TextProps, type ThemeAttr, type ToolCallArgumentsDeltaEvent, type ToolMatchOptions, type ToolMatchResult, type ToolSet, type TopicExtractOptions, type TopicExtractionInput, type TopicExtractionRunResult, type TranscriptionResult, type TurnCompleteEvent, type TurnSkippedEvent, type UIInteractionContextValue, UIInteractionProvider, type UIInteractionProviderProps, type UpdateMediaOptions, type UpdateModelPreferenceOptions, type UpdateProjectOptions, type UpdateSavedToolOptions, type UpdateUserPreferenceOptions, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseBackupOptions, type UseBackupResult, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseDropboxBackupOptions, type UseDropboxBackupResult, type UseEncryptionResult, type UseExportPdfResult, type UseFilesOptions, type UseFilesResult, type UseGoogleDriveBackupOptions, type UseGoogleDriveBackupResult, type UseICloudBackupOptions, type UseICloudBackupResult, type UseModelsResult, type UseOCRResult, type UsePdfResult, type UsePhoneCallsOptions, type UsePhoneCallsResult, type UseProjectsOptions, type UseProjectsResult, type UseSettingsOptions, type UseSettingsResult, type UseSubscriptionOptions, type UseSubscriptionResult, type UseToolsOptions, type UseToolsResult, type UseVoiceOptions, type UseVoiceResult, type UseWalletBindingOptions, type UseWalletBindingResult, type VaultEmbeddingCache, type VaultFolderOperationsContext, type VaultMemoryOperationsContext, type VaultSaveOperation, type VaultSearchResult, type VoiceRecording, WalletPoller, WatermelonChatStorageAdapter, type WatermelonChatStorageAdapterOptions, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WhisperModel, WordProcessor, ZipProcessor, type ZipProcessorOptions, addConversationMemoriesOp, appFileToStored, backfillMemoryEntityUserIdsOp, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearAllKeyPairs, clearCalendarToken, clearConversationMemoriesOp, clearDriveToken, clearToken as clearDropboxToken, clearEncryptionKey, clearGithubToken, clearGoogleDriveToken, clearICloudAuth, clearKeyPair, clearLazyTitleCache, clearMemoryTopicsOverrideOp, clearNotionToken, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createGitHubTools, createMediaBatchOp, createMediaOp, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createPlatformCursorStore, createProjectOp, createRecallTool, createSavedToolOp, createServerToolsFilter, createStockPricePreProcessor, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decryptConversationTitle, decryptData, decryptDataBatch, decryptDataBytes, decryptDataBytesFromBytes, decryptDataWithKey, defaultServerToolsFilter, deleteAllAppFilesOp, deleteAllVaultMemoriesForUserOp, deleteAppFileOp, deleteEncryptedFile, deleteMediaByConversationOp, deleteMediaByMessageOp, deleteMediaOp, deleteProjectOp, deleteSavedToolOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, eagerEmbedContent, embedAllMessages, embedMessage, encryptData, encryptDataBatch, encryptDataBytes, encryptDataWithKey, ensureDefaultFoldersOp, expandToolSetsAdditive, exportElementToPdf, exportMarkdownToPdf, exportPublicKey, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractFileIds, fileExists, findById, findMatchingTools, findParentOfId, generateConversationId, generateEmbedding, generateEmbeddings, generateMediaId, generateProjectId, getAIGeneratedMediaOp, getAllSavedToolsOp, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getAndClearCalendarPendingMessage, getAndClearCalendarReturnUrl, getAndClearDrivePendingMessage, getAndClearDriveReturnUrl, getAndClearGithubPendingMessage, getAndClearGithubReturnUrl, getAndClearNotionPendingMessage, getAndClearNotionReturnUrl, getAppFileMapOp, getAppFileOp, getAppFilesOp, getAudioOp, getCachedServerTools, getCalendarAccessToken, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsByProjectOp, getConversationsLazyOp, getConversationsPageOp, getDocumentsOp, getDriveAccessToken, getEncryptionKey, getGithubAccessToken, getGoogleDriveStoredToken, getId, getImagesOp, getLogger, getMediaByConversationOp, getMediaByIdOp, getMediaByIdsOp, getMediaByMessageOp, getMediaByModelOp, getMediaByRoleOp, getMediaBySourceUrlOp, getMediaByTypeOp, getMediaCountOp, getMediaCountsByTypeOp, getMediaOp, getMediaTypeFromMime, getMemoriesByEntityNamesOp, getMemoriesNeedingTopicExtractionOp, getNotionAccessToken, getNotionMCPUrl, getNumberAttr, getProjectConversationCountOp, getProjectConversationsOp, getProjectOp, getProjectsOp, getRecentMediaOp, getSavedToolByIdOp, getServerTools, getStringAttr, getSupportedFileTypes, getToolsChecksum, getUnfiledVaultMemoriesOp, getUserUploadedMediaOp, getValidCalendarToken, getValidDriveToken, getValidGithubToken, getValidNotionToken, getVaultFolderMemoryCountOp, getVaultMemoryOp, getVideosOp, handleCalendarCallback, handleDriveCallback, handleGithubCallback, handleNotionCallback, hardDeleteMediaOp, hasCalendarCredentials, hasDriveCredentials, hasDropboxCredentials, hasEncryptionKey, hasGithubCredentials, hasGoogleDriveCredentials, hasICloudCredentials, hasKeyPair, hasNotionCredentials, insertAfterId, insertChild, isAnumaTag, isCalendarCallback, isDriveCallback, isGithubCallback, isHtmlTag, isNotionCallback, isOPFSSupported, isR2UrlExpired, isRerankerAvailable, isSupportedFile, isSupportedMediaType, linkMemoryEntitiesOp, mediaToStored, migrateCalendarToken, migrateDisplayResult, migrateDriveToken, migrateGithubToken, migrateNotionClientRegistration, migrateNotionToken, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseJsx, preEmbedVaultMemories, preprocessFiles, previewToolSelection, projectToStored, putAppFileOp, quantizeEmbedding, queueManager, readEncryptedFile, recall, reflect, refreshCalendarToken, refreshDriveToken, refreshGithubToken, refreshNotionToken, relinkMisclassifiedVideosOp, removeById, renderAnumaJsx, renderAnumaTree, renderElementToCanvas, replaceById, replaceMemoryEntitiesGuardedOp, requestEncryptionKey, requestKeyPair, resolveFilePlaceholders, resolveThemeColor, resumeStream, retain, revokeCalendarToken, revokeDriveToken, revokeGithubToken, revokeNotionAccess, savedToolToStored, sdkMigrations, sdkModelClasses, sdkSchema, searchChunksOp, searchMediaOp, searchMessagesOp, searchVaultMemories, selectServerToolsForPrompt, serializeJsx, setLogger, setMemoryEntitiesOp, settingsStorageSchema, shouldChunkMessage, shouldRefreshTools, stampTopicsExtractedAtOp, startGithubAuth, startNotionAuth, storeCalendarPendingMessage, storeCalendarReturnUrl, storeCalendarToken, storeDrivePendingMessage, storeDriveReturnUrl, storeDriveToken, storeGithubPendingMessage, storeGithubReturnUrl, storeGithubToken, storeNotionPendingMessage, storeNotionReturnUrl, streamCancelPath, streamReplayPath, supersedeVaultMemoryOp, updateAttrs, updateConversationProjectOp, updateMediaMessageIdBatchOp, updateMediaOp, updateMessageFeedbackOp, updateProjectNameOp, updateProjectOp, updateSavedToolOp, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, useAnumaTheme, useBackup, useBackupAuth, useChat, useChatStorage, useCredits, useDatabaseManager, useDropboxAuth, useDropboxBackup, useEncryption, useExportPdf, useFiles, useGoogleDriveAuth, useGoogleDriveBackup, useICloudAuth, useICloudBackup, useModels, useOCR, usePdf, usePhoneCalls, useProjects, useSettings, useSubscription, useTools, useUIInteraction, useVoice, useWalletBinding, userPreferencesStorageSchema, walk, webPlatformStorage, writeEncryptedFile };
|