@anuma/sdk 8.0.2 → 8.1.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/index.cjs +228 -5
- package/dist/expo/index.d.mts +113 -2
- package/dist/expo/index.d.ts +113 -2
- package/dist/expo/index.mjs +224 -5
- package/dist/index.cjs +21 -1
- package/dist/index.mjs +21 -1
- package/dist/react/index.cjs +238 -5
- package/dist/react/index.d.mts +117 -2
- package/dist/react/index.d.ts +117 -2
- package/dist/react/index.mjs +234 -5
- package/dist/server/index.cjs +54 -3
- package/dist/server/index.d.mts +6 -1
- package/dist/server/index.d.ts +6 -1
- package/dist/server/index.mjs +54 -3
- package/dist/tools/index.cjs +142 -0
- package/dist/tools/index.d.mts +91 -1
- package/dist/tools/index.d.ts +91 -1
- package/dist/tools/index.mjs +138 -0
- package/dist/tools/selection/index.cjs +25 -3
- package/dist/tools/selection/index.d.mts +1 -1
- package/dist/tools/selection/index.d.ts +1 -1
- package/dist/tools/selection/index.mjs +25 -3
- package/package.json +1 -1
package/dist/expo/index.cjs
CHANGED
|
@@ -1429,6 +1429,7 @@ __export(index_exports, {
|
|
|
1429
1429
|
RemoteMemoryPartialCreateError: () => RemoteMemoryPartialCreateError,
|
|
1430
1430
|
RerankerUnavailableError: () => RerankerUnavailableError,
|
|
1431
1431
|
SDK_SCHEMA_VERSION: () => SDK_SCHEMA_VERSION,
|
|
1432
|
+
SELECT_PAYMENT_WALLET_TOOL_NAME: () => SELECT_PAYMENT_WALLET_TOOL_NAME,
|
|
1432
1433
|
SHORT_TTL_MS: () => SHORT_TTL_MS,
|
|
1433
1434
|
STREAM_RESUMABLE_HEADER: () => STREAM_RESUMABLE_HEADER,
|
|
1434
1435
|
StoredVaultFolderModel: () => VaultFolder,
|
|
@@ -1441,6 +1442,7 @@ __export(index_exports, {
|
|
|
1441
1442
|
TREND_RECENT_WINDOW_DAYS: () => TREND_RECENT_WINDOW_DAYS,
|
|
1442
1443
|
TREND_STALE_WINDOW_DAYS: () => TREND_STALE_WINDOW_DAYS,
|
|
1443
1444
|
VAULT_SIZE_HOP_CAP: () => VAULT_SIZE_HOP_CAP,
|
|
1445
|
+
WALLET_PAYMENT_TOOL_NAME: () => WALLET_PAYMENT_TOOL_NAME,
|
|
1444
1446
|
WalletPoller: () => WalletPoller,
|
|
1445
1447
|
addConversationMemoriesOp: () => addConversationMemoriesOp,
|
|
1446
1448
|
archiveVaultMemoryOp: () => archiveVaultMemoryOp,
|
|
@@ -1495,12 +1497,14 @@ __export(index_exports, {
|
|
|
1495
1497
|
createRemoteMemoryPersistence: () => createRemoteMemoryPersistence,
|
|
1496
1498
|
createRemoteMemoryPipeline: () => createRemoteMemoryPipeline,
|
|
1497
1499
|
createRemoteMemoryStore: () => createRemoteMemoryStore,
|
|
1500
|
+
createSelectPaymentWalletTool: () => createSelectPaymentWalletTool,
|
|
1498
1501
|
createStockPricePreProcessor: () => createStockPricePreProcessor,
|
|
1499
1502
|
createStreamingDeAnonymizer: () => createStreamingDeAnonymizer,
|
|
1500
1503
|
createVaultEmbeddingCache: () => createVaultEmbeddingCache,
|
|
1501
1504
|
createVaultFolderOp: () => createVaultFolderOp,
|
|
1502
1505
|
createVaultMemoriesBatchOp: () => createVaultMemoriesBatchOp,
|
|
1503
1506
|
createVaultMemoryOp: () => createVaultMemoryOp,
|
|
1507
|
+
createWalletPaymentTool: () => createWalletPaymentTool,
|
|
1504
1508
|
createWeatherPreProcessor: () => createWeatherPreProcessor,
|
|
1505
1509
|
createWebSearchPreProcessor: () => createWebSearchPreProcessor,
|
|
1506
1510
|
decodeChunkVector: () => decodeChunkVector,
|
|
@@ -6458,6 +6462,17 @@ function missingConfirmFields(action, parameters) {
|
|
|
6458
6462
|
return requirement.fields.filter((field10) => !shown.has(field10));
|
|
6459
6463
|
}
|
|
6460
6464
|
|
|
6465
|
+
// src/tools/walletPaymentConstants.ts
|
|
6466
|
+
var SELECT_PAYMENT_WALLET_TOOL_NAME = "select_payment_wallet";
|
|
6467
|
+
var WALLET_PAYMENT_TOOL_NAME = "prompt_wallet_payment";
|
|
6468
|
+
var FLIGHT_BOOK_TOOL_SET = "flight-book";
|
|
6469
|
+
var FLIGHT_SERVER_TOOL_NAMES = [
|
|
6470
|
+
"AnumaPaymentsMCP-anuma_search_flights",
|
|
6471
|
+
"AnumaPaymentsMCP-anuma_flight_offer_details",
|
|
6472
|
+
"AnumaPaymentsMCP-anuma_create_flight_intent",
|
|
6473
|
+
"AnumaPaymentsMCP-anuma_get_flight_booking"
|
|
6474
|
+
];
|
|
6475
|
+
|
|
6461
6476
|
// src/lib/chat/toolLoop.ts
|
|
6462
6477
|
init_redactor();
|
|
6463
6478
|
|
|
@@ -7157,7 +7172,8 @@ var BUILT_IN_TOOL_SETS = [
|
|
|
7157
7172
|
"AnumaPaymentsMCP-anuma_cancel_reservation"
|
|
7158
7173
|
],
|
|
7159
7174
|
anchors: []
|
|
7160
|
-
}
|
|
7175
|
+
},
|
|
7176
|
+
{ name: FLIGHT_BOOK_TOOL_SET, members: [...FLIGHT_SERVER_TOOL_NAMES], anchors: [] }
|
|
7161
7177
|
];
|
|
7162
7178
|
var CONFIRMED_ACTION_TOOL_SETS = /* @__PURE__ */ new Map([
|
|
7163
7179
|
["book_restaurant", "restaurant-book"],
|
|
@@ -7289,6 +7305,16 @@ var SERVER_TOOL_DEPENDENCY_SETS = [
|
|
|
7289
7305
|
members: ["AnumaPaymentsMCP-anuma_list_reservations"],
|
|
7290
7306
|
anchors: ["AnumaPaymentsMCP-anuma_cancel_reservation"],
|
|
7291
7307
|
anchorMinSimilarity: 0.5
|
|
7308
|
+
},
|
|
7309
|
+
{
|
|
7310
|
+
name: "flight-book-lookup",
|
|
7311
|
+
members: [
|
|
7312
|
+
"AnumaPaymentsMCP-anuma_flight_offer_details",
|
|
7313
|
+
"AnumaPaymentsMCP-anuma_create_flight_intent",
|
|
7314
|
+
"AnumaPaymentsMCP-anuma_get_flight_booking"
|
|
7315
|
+
],
|
|
7316
|
+
anchors: ["AnumaPaymentsMCP-anuma_search_flights"],
|
|
7317
|
+
anchorMinSimilarity: 0.5
|
|
7292
7318
|
}
|
|
7293
7319
|
];
|
|
7294
7320
|
var defaultServerToolsFilter = createServerToolsFilter({
|
|
@@ -9554,7 +9580,14 @@ function getToolName(tool) {
|
|
|
9554
9580
|
function toolsAfterConfirmation(apiTools, executionResults) {
|
|
9555
9581
|
const members = /* @__PURE__ */ new Set();
|
|
9556
9582
|
let keepConfirm = false;
|
|
9583
|
+
let keepPaymentTools = false;
|
|
9557
9584
|
for (const r of executionResults) {
|
|
9585
|
+
if (r.name === SELECT_PAYMENT_WALLET_TOOL_NAME && r.result?.confirmed === true) {
|
|
9586
|
+
const flightSet = BUILT_IN_TOOL_SETS.find((s) => s.name === FLIGHT_BOOK_TOOL_SET);
|
|
9587
|
+
for (const member of flightSet?.members ?? []) members.add(member);
|
|
9588
|
+
keepPaymentTools = true;
|
|
9589
|
+
continue;
|
|
9590
|
+
}
|
|
9558
9591
|
if (r.name !== CONFIRM_TOOL_NAME) continue;
|
|
9559
9592
|
const answer = r.result;
|
|
9560
9593
|
if (answer?.confirmed !== true || typeof answer.action !== "string") continue;
|
|
@@ -9566,7 +9599,7 @@ function toolsAfterConfirmation(apiTools, executionResults) {
|
|
|
9566
9599
|
if (!apiTools.some((t) => members.has(getToolName(t) ?? ""))) return void 0;
|
|
9567
9600
|
return apiTools.filter((t) => {
|
|
9568
9601
|
const name = getToolName(t) ?? "";
|
|
9569
|
-
return members.has(name) || name === TOOL_SEARCH_TOOL_NAME || keepConfirm && name === CONFIRM_TOOL_NAME;
|
|
9602
|
+
return members.has(name) || name === TOOL_SEARCH_TOOL_NAME || keepConfirm && name === CONFIRM_TOOL_NAME || keepPaymentTools && (name === SELECT_PAYMENT_WALLET_TOOL_NAME || name === WALLET_PAYMENT_TOOL_NAME);
|
|
9570
9603
|
});
|
|
9571
9604
|
}
|
|
9572
9605
|
var STREAM_RESUMABLE_HEADER = "X-Stream-Resumable";
|
|
@@ -11935,6 +11968,9 @@ __decorateClass([
|
|
|
11935
11968
|
__decorateClass([
|
|
11936
11969
|
(0, import_decorators10.text)("personality")
|
|
11937
11970
|
], UserPreference.prototype, "personality", 2);
|
|
11971
|
+
__decorateClass([
|
|
11972
|
+
(0, import_decorators10.text)("external_wallets")
|
|
11973
|
+
], UserPreference.prototype, "externalWallets", 2);
|
|
11938
11974
|
__decorateClass([
|
|
11939
11975
|
(0, import_decorators10.field)("created_at")
|
|
11940
11976
|
], UserPreference.prototype, "createdAt", 2);
|
|
@@ -11972,7 +12008,7 @@ __decorateClass([
|
|
|
11972
12008
|
], VaultFolder.prototype, "context", 2);
|
|
11973
12009
|
|
|
11974
12010
|
// src/lib/db/schema.ts
|
|
11975
|
-
var SDK_SCHEMA_VERSION =
|
|
12011
|
+
var SDK_SCHEMA_VERSION = 49;
|
|
11976
12012
|
var sdkSchema = (0, import_watermelondb18.appSchema)({
|
|
11977
12013
|
version: SDK_SCHEMA_VERSION,
|
|
11978
12014
|
tables: [
|
|
@@ -12058,6 +12094,7 @@ var sdkSchema = (0, import_watermelondb18.appSchema)({
|
|
|
12058
12094
|
{ name: "description", type: "string", isOptional: true },
|
|
12059
12095
|
{ name: "models", type: "string", isOptional: true },
|
|
12060
12096
|
{ name: "personality", type: "string", isOptional: true },
|
|
12097
|
+
{ name: "external_wallets", type: "string", isOptional: true },
|
|
12061
12098
|
{ name: "created_at", type: "number" },
|
|
12062
12099
|
{ name: "updated_at", type: "number" }
|
|
12063
12100
|
]
|
|
@@ -12762,6 +12799,15 @@ var sdkMigrations = (0, import_migrations2.schemaMigrations)({
|
|
|
12762
12799
|
"UPDATE memory_vault SET level = CASE WHEN scope IN ('shared', 'public') THEN 'matching' ELSE 'private' END WHERE level IS NULL;"
|
|
12763
12800
|
)
|
|
12764
12801
|
]
|
|
12802
|
+
},
|
|
12803
|
+
{
|
|
12804
|
+
toVersion: 49,
|
|
12805
|
+
steps: [
|
|
12806
|
+
(0, import_migrations2.addColumns)({
|
|
12807
|
+
table: "userPreferences",
|
|
12808
|
+
columns: [{ name: "external_wallets", type: "string", isOptional: true }]
|
|
12809
|
+
})
|
|
12810
|
+
]
|
|
12765
12811
|
}
|
|
12766
12812
|
]
|
|
12767
12813
|
});
|
|
@@ -25771,7 +25817,7 @@ function computeToolGuidance(selectedServerTools, selectedClientTools, extraTool
|
|
|
25771
25817
|
async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embeddingOptions, extraToolSets = [], activeToolSets = [], noEmbeddingsReason = "short-prompt") {
|
|
25772
25818
|
const isAlwaysIncluded = (t) => {
|
|
25773
25819
|
const name = getToolName2(t);
|
|
25774
|
-
return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME;
|
|
25820
|
+
return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME || name === SELECT_PAYMENT_WALLET_TOOL_NAME || name === WALLET_PAYMENT_TOOL_NAME;
|
|
25775
25821
|
};
|
|
25776
25822
|
const alwaysInclude = clientTools.filter(isAlwaysIncluded);
|
|
25777
25823
|
const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
|
|
@@ -25783,7 +25829,7 @@ async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embed
|
|
|
25783
25829
|
}
|
|
25784
25830
|
if (!promptEmbeddings) {
|
|
25785
25831
|
if (activeToolSets.length === 0) {
|
|
25786
|
-
return { tools:
|
|
25832
|
+
return { tools: alwaysInclude, activatedSetNames: /* @__PURE__ */ new Set(), matchedSetNames: /* @__PURE__ */ new Set() };
|
|
25787
25833
|
}
|
|
25788
25834
|
const allSets = extraToolSets.length > 0 ? [...BUILT_IN_TOOL_SETS, ...extraToolSets] : BUILT_IN_TOOL_SETS;
|
|
25789
25835
|
const activeSets = allSets.filter((s) => activeToolSets.includes(s.name));
|
|
@@ -26932,6 +26978,179 @@ function createNotionProxyTools(callMcp) {
|
|
|
26932
26978
|
return NOTION_TOOLS.map((tool) => tool(run));
|
|
26933
26979
|
}
|
|
26934
26980
|
|
|
26981
|
+
// src/tools/uiInteraction.ts
|
|
26982
|
+
function generateInteractionId(prefix) {
|
|
26983
|
+
return `${prefix}_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
|
|
26984
|
+
}
|
|
26985
|
+
function createInteractiveTool(options, config) {
|
|
26986
|
+
return {
|
|
26987
|
+
type: "function",
|
|
26988
|
+
function: {
|
|
26989
|
+
name: config.name,
|
|
26990
|
+
description: config.description,
|
|
26991
|
+
arguments: config.parameters
|
|
26992
|
+
},
|
|
26993
|
+
executor: async (args, signal) => {
|
|
26994
|
+
if (config.validate && !config.validate(args)) {
|
|
26995
|
+
return { cancelled: true };
|
|
26996
|
+
}
|
|
26997
|
+
const context = options.getContext();
|
|
26998
|
+
if (!context) {
|
|
26999
|
+
return { cancelled: true };
|
|
27000
|
+
}
|
|
27001
|
+
const interactionId = generateInteractionId(config.interactionType);
|
|
27002
|
+
const interactionData = config.mapArgs ? config.mapArgs(args) : args;
|
|
27003
|
+
const onAbort = () => context.cancelInteraction?.(interactionId);
|
|
27004
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
27005
|
+
try {
|
|
27006
|
+
const result = await context.createInteraction(interactionId, config.interactionType, {
|
|
27007
|
+
...interactionData,
|
|
27008
|
+
afterMessageId: options.getLastMessageId?.()
|
|
27009
|
+
});
|
|
27010
|
+
if (config.mapResult) {
|
|
27011
|
+
return config.mapResult(result, args);
|
|
27012
|
+
}
|
|
27013
|
+
return result;
|
|
27014
|
+
} catch {
|
|
27015
|
+
return { cancelled: true };
|
|
27016
|
+
} finally {
|
|
27017
|
+
signal?.removeEventListener("abort", onAbort);
|
|
27018
|
+
}
|
|
27019
|
+
},
|
|
27020
|
+
executorTimeout: Infinity
|
|
27021
|
+
};
|
|
27022
|
+
}
|
|
27023
|
+
|
|
27024
|
+
// src/tools/walletPayment.ts
|
|
27025
|
+
var CANCELLED = { cancelled: true };
|
|
27026
|
+
function isNonEmptyString(value) {
|
|
27027
|
+
return typeof value === "string" && value.length > 0;
|
|
27028
|
+
}
|
|
27029
|
+
function hasPassengers(value) {
|
|
27030
|
+
return Array.isArray(value?.passengers);
|
|
27031
|
+
}
|
|
27032
|
+
function createSelectPaymentWalletTool(options) {
|
|
27033
|
+
const tool = createInteractiveTool(options, {
|
|
27034
|
+
name: SELECT_PAYMENT_WALLET_TOOL_NAME,
|
|
27035
|
+
description: "Show the user a card with the flight offer and their wallets, and let them pick the wallet to pay from. Call it after anuma_flight_offer_details, with the exact offer id, price and currency from that result. Returns the chosen wallet, or that the user declined.",
|
|
27036
|
+
parameters: {
|
|
27037
|
+
type: "object",
|
|
27038
|
+
properties: {
|
|
27039
|
+
offer_id: {
|
|
27040
|
+
type: "string",
|
|
27041
|
+
description: "The offer id from anuma_flight_offer_details"
|
|
27042
|
+
},
|
|
27043
|
+
summary: {
|
|
27044
|
+
type: "string",
|
|
27045
|
+
description: "Route, dates and fare of the offer, as shown to the user"
|
|
27046
|
+
},
|
|
27047
|
+
amount: {
|
|
27048
|
+
type: "string",
|
|
27049
|
+
description: "Total price of the offer, e.g. '412.50'"
|
|
27050
|
+
},
|
|
27051
|
+
currency: {
|
|
27052
|
+
type: "string",
|
|
27053
|
+
description: "Currency of the price, e.g. 'USD'"
|
|
27054
|
+
}
|
|
27055
|
+
},
|
|
27056
|
+
required: ["offer_id", "amount", "currency"]
|
|
27057
|
+
},
|
|
27058
|
+
interactionType: "select_payment_wallet",
|
|
27059
|
+
validate: (args) => isNonEmptyString(args.offer_id),
|
|
27060
|
+
mapArgs: ({ offer_id, summary, amount, currency, wallets }) => ({
|
|
27061
|
+
offer_id,
|
|
27062
|
+
summary,
|
|
27063
|
+
amount,
|
|
27064
|
+
currency,
|
|
27065
|
+
wallets
|
|
27066
|
+
}),
|
|
27067
|
+
mapResult: (result, args) => {
|
|
27068
|
+
if (result?.confirmed === true && isNonEmptyString(result.funding_wallet)) {
|
|
27069
|
+
return {
|
|
27070
|
+
confirmed: true,
|
|
27071
|
+
offer_id: args.offer_id,
|
|
27072
|
+
funding_wallet: result.funding_wallet
|
|
27073
|
+
};
|
|
27074
|
+
}
|
|
27075
|
+
if (result?.confirmed === false) return { confirmed: false };
|
|
27076
|
+
return CANCELLED;
|
|
27077
|
+
}
|
|
27078
|
+
});
|
|
27079
|
+
const showCard = tool.executor;
|
|
27080
|
+
return {
|
|
27081
|
+
...tool,
|
|
27082
|
+
executor: async (args, signal) => {
|
|
27083
|
+
if (!isNonEmptyString(args.offer_id)) return CANCELLED;
|
|
27084
|
+
let wallets;
|
|
27085
|
+
try {
|
|
27086
|
+
wallets = await options.listWallets();
|
|
27087
|
+
} catch {
|
|
27088
|
+
return { error_code: "wallets_unavailable", retryable: true };
|
|
27089
|
+
}
|
|
27090
|
+
if (signal?.aborted) return CANCELLED;
|
|
27091
|
+
return showCard?.({ ...args, wallets }, signal);
|
|
27092
|
+
}
|
|
27093
|
+
};
|
|
27094
|
+
}
|
|
27095
|
+
function createWalletPaymentTool(options) {
|
|
27096
|
+
const tool = createInteractiveTool(options, {
|
|
27097
|
+
name: WALLET_PAYMENT_TOOL_NAME,
|
|
27098
|
+
description: "Show the user a card to enter the passengers, then pay the flight booking from the wallet they chose. Call it after anuma_create_flight_intent, with the provider and reference from that result. Returns whether the payment went through.",
|
|
27099
|
+
parameters: {
|
|
27100
|
+
type: "object",
|
|
27101
|
+
properties: {
|
|
27102
|
+
provider: {
|
|
27103
|
+
type: "string",
|
|
27104
|
+
description: "The payment provider from anuma_create_flight_intent"
|
|
27105
|
+
},
|
|
27106
|
+
reference: {
|
|
27107
|
+
type: "string",
|
|
27108
|
+
description: "The payment reference from anuma_create_flight_intent"
|
|
27109
|
+
},
|
|
27110
|
+
passenger_count: {
|
|
27111
|
+
type: "integer",
|
|
27112
|
+
minimum: 1,
|
|
27113
|
+
description: "How many passengers the booking is for"
|
|
27114
|
+
}
|
|
27115
|
+
},
|
|
27116
|
+
required: ["provider", "reference", "passenger_count"]
|
|
27117
|
+
},
|
|
27118
|
+
interactionType: "prompt_wallet_payment",
|
|
27119
|
+
validate: (args) => isNonEmptyString(args.provider) && isNonEmptyString(args.reference) && Number.isInteger(args.passenger_count) && args.passenger_count >= 1,
|
|
27120
|
+
mapArgs: ({ provider, reference, passenger_count }) => ({
|
|
27121
|
+
provider,
|
|
27122
|
+
reference,
|
|
27123
|
+
passenger_count
|
|
27124
|
+
}),
|
|
27125
|
+
mapResult: (result) => hasPassengers(result) ? { passengers: result.passengers } : CANCELLED
|
|
27126
|
+
});
|
|
27127
|
+
const showCard = tool.executor;
|
|
27128
|
+
return {
|
|
27129
|
+
...tool,
|
|
27130
|
+
executor: async (args, signal) => {
|
|
27131
|
+
const answer = await showCard?.(args, signal);
|
|
27132
|
+
if (!hasPassengers(answer) || signal?.aborted) return CANCELLED;
|
|
27133
|
+
const provider = args.provider;
|
|
27134
|
+
const reference = args.reference;
|
|
27135
|
+
let outcome2;
|
|
27136
|
+
try {
|
|
27137
|
+
outcome2 = await options.pay({ provider, reference, passengers: answer.passengers }, signal);
|
|
27138
|
+
} catch {
|
|
27139
|
+
return { paid: false, error_code: "payment_failed", retryable: false };
|
|
27140
|
+
}
|
|
27141
|
+
if (outcome2.paid) {
|
|
27142
|
+
return {
|
|
27143
|
+
paid: true,
|
|
27144
|
+
provider: outcome2.provider,
|
|
27145
|
+
reference: outcome2.reference,
|
|
27146
|
+
status: outcome2.status
|
|
27147
|
+
};
|
|
27148
|
+
}
|
|
27149
|
+
return { paid: false, error_code: outcome2.error_code, retryable: outcome2.retryable };
|
|
27150
|
+
}
|
|
27151
|
+
};
|
|
27152
|
+
}
|
|
27153
|
+
|
|
26935
27154
|
// src/expo/useChat.ts
|
|
26936
27155
|
var import_react4 = require("react");
|
|
26937
27156
|
init_clientConfig();
|
|
@@ -30112,6 +30331,7 @@ function useChatStorage(options) {
|
|
|
30112
30331
|
RemoteMemoryPartialCreateError,
|
|
30113
30332
|
RerankerUnavailableError,
|
|
30114
30333
|
SDK_SCHEMA_VERSION,
|
|
30334
|
+
SELECT_PAYMENT_WALLET_TOOL_NAME,
|
|
30115
30335
|
SHORT_TTL_MS,
|
|
30116
30336
|
STREAM_RESUMABLE_HEADER,
|
|
30117
30337
|
StoredVaultFolderModel,
|
|
@@ -30124,6 +30344,7 @@ function useChatStorage(options) {
|
|
|
30124
30344
|
TREND_RECENT_WINDOW_DAYS,
|
|
30125
30345
|
TREND_STALE_WINDOW_DAYS,
|
|
30126
30346
|
VAULT_SIZE_HOP_CAP,
|
|
30347
|
+
WALLET_PAYMENT_TOOL_NAME,
|
|
30127
30348
|
WalletPoller,
|
|
30128
30349
|
addConversationMemoriesOp,
|
|
30129
30350
|
archiveVaultMemoryOp,
|
|
@@ -30178,12 +30399,14 @@ function useChatStorage(options) {
|
|
|
30178
30399
|
createRemoteMemoryPersistence,
|
|
30179
30400
|
createRemoteMemoryPipeline,
|
|
30180
30401
|
createRemoteMemoryStore,
|
|
30402
|
+
createSelectPaymentWalletTool,
|
|
30181
30403
|
createStockPricePreProcessor,
|
|
30182
30404
|
createStreamingDeAnonymizer,
|
|
30183
30405
|
createVaultEmbeddingCache,
|
|
30184
30406
|
createVaultFolderOp,
|
|
30185
30407
|
createVaultMemoriesBatchOp,
|
|
30186
30408
|
createVaultMemoryOp,
|
|
30409
|
+
createWalletPaymentTool,
|
|
30187
30410
|
createWeatherPreProcessor,
|
|
30188
30411
|
createWebSearchPreProcessor,
|
|
30189
30412
|
decodeChunkVector,
|
package/dist/expo/index.d.mts
CHANGED
|
@@ -8239,7 +8239,7 @@ declare function clearConversationMemoriesOp(ctx: ConversationMemoryOperationsCo
|
|
|
8239
8239
|
* - v48: Added kind, kind_value (encrypted) and level to memory_vault; level is
|
|
8240
8240
|
* backfilled from scope where SQL steps run
|
|
8241
8241
|
*/
|
|
8242
|
-
declare const SDK_SCHEMA_VERSION =
|
|
8242
|
+
declare const SDK_SCHEMA_VERSION = 49;
|
|
8243
8243
|
/**
|
|
8244
8244
|
* Combined WatermelonDB schema for all SDK storage modules.
|
|
8245
8245
|
*
|
|
@@ -11004,6 +11004,117 @@ declare function createNotionTools(getAccessToken: () => string | null, requestN
|
|
|
11004
11004
|
*/
|
|
11005
11005
|
declare function createNotionProxyTools(callMcp: NotionMcpCaller): ToolConfig[];
|
|
11006
11006
|
|
|
11007
|
+
/**
|
|
11008
|
+
* Minimal context interface required by tool factories.
|
|
11009
|
+
* Matches the methods provided by UIInteractionProvider.
|
|
11010
|
+
*/
|
|
11011
|
+
type UIInteractionContext = {
|
|
11012
|
+
createInteraction: (id: string, type: string, data: unknown) => Promise<unknown>;
|
|
11013
|
+
/** Rejects and removes a pending interaction. Optional for older contexts. */
|
|
11014
|
+
cancelInteraction?: (id: string) => void;
|
|
11015
|
+
createDisplayInteraction: (id: string, displayType: string, data: unknown, result: unknown, toolVersion?: number, replacesInteractionId?: string) => void;
|
|
11016
|
+
};
|
|
11017
|
+
/**
|
|
11018
|
+
* Options for context injection, following the same getter pattern
|
|
11019
|
+
* as createGoogleCalendarTool and createDriveTools.
|
|
11020
|
+
*/
|
|
11021
|
+
type CreateUIToolsOptions = {
|
|
11022
|
+
/** Returns the current UIInteractionContext (or null if unavailable) */
|
|
11023
|
+
getContext: () => UIInteractionContext | null;
|
|
11024
|
+
/** Returns the ID of the last message in the conversation (used for anchoring) */
|
|
11025
|
+
getLastMessageId?: () => string | undefined;
|
|
11026
|
+
};
|
|
11027
|
+
|
|
11028
|
+
/** A wallet the user can pay from, as the wallet picker card shows it. */
|
|
11029
|
+
type PaymentWallet = {
|
|
11030
|
+
address: string;
|
|
11031
|
+
chainType: "solana";
|
|
11032
|
+
label?: string;
|
|
11033
|
+
walletName?: string;
|
|
11034
|
+
usdcBalance?: string;
|
|
11035
|
+
builtIn?: boolean;
|
|
11036
|
+
};
|
|
11037
|
+
/** What the wallet picker returns to the model. */
|
|
11038
|
+
type SelectPaymentWalletResult = {
|
|
11039
|
+
confirmed: true;
|
|
11040
|
+
offer_id: string;
|
|
11041
|
+
funding_wallet: string;
|
|
11042
|
+
} | {
|
|
11043
|
+
confirmed: false;
|
|
11044
|
+
} | {
|
|
11045
|
+
cancelled: true;
|
|
11046
|
+
} | {
|
|
11047
|
+
error_code: "wallets_unavailable";
|
|
11048
|
+
retryable: true;
|
|
11049
|
+
};
|
|
11050
|
+
/** One passenger as the payment card collects it. */
|
|
11051
|
+
type WalletPaymentPassenger = Record<string, unknown>;
|
|
11052
|
+
/** What the caller's `pay` function receives once the user has filled in the payment card. */
|
|
11053
|
+
type WalletPaymentRequest = {
|
|
11054
|
+
provider: string;
|
|
11055
|
+
reference: string;
|
|
11056
|
+
passengers: WalletPaymentPassenger[];
|
|
11057
|
+
};
|
|
11058
|
+
/** What the caller's `pay` function resolves with. */
|
|
11059
|
+
type WalletPaymentOutcome = {
|
|
11060
|
+
paid: true;
|
|
11061
|
+
provider: string;
|
|
11062
|
+
reference: string;
|
|
11063
|
+
status: string;
|
|
11064
|
+
} | {
|
|
11065
|
+
paid: false;
|
|
11066
|
+
error_code: string;
|
|
11067
|
+
retryable: boolean;
|
|
11068
|
+
};
|
|
11069
|
+
/** What the payment tool returns to the model. */
|
|
11070
|
+
type WalletPaymentResult = WalletPaymentOutcome | {
|
|
11071
|
+
cancelled: true;
|
|
11072
|
+
};
|
|
11073
|
+
/** Options for {@link createSelectPaymentWalletTool}. */
|
|
11074
|
+
type CreateSelectPaymentWalletToolOptions = CreateUIToolsOptions & {
|
|
11075
|
+
listWallets: () => Promise<PaymentWallet[]>;
|
|
11076
|
+
};
|
|
11077
|
+
/** Options for {@link createWalletPaymentTool}. */
|
|
11078
|
+
type CreateWalletPaymentToolOptions = CreateUIToolsOptions & {
|
|
11079
|
+
/** Pays the booking: if `signal` fires before submitting, stop there; if it fires after submitting, show the user the real outcome, because the tool result will read cancelled. */
|
|
11080
|
+
pay: (request: WalletPaymentRequest, signal?: AbortSignal) => Promise<WalletPaymentOutcome>;
|
|
11081
|
+
};
|
|
11082
|
+
/**
|
|
11083
|
+
* Create the select_payment_wallet tool, which shows the user's wallets for a flight offer and returns the one they chose.
|
|
11084
|
+
*
|
|
11085
|
+
* @example
|
|
11086
|
+
* ```typescript
|
|
11087
|
+
* import { createSelectPaymentWalletTool } from "@anuma/sdk/tools";
|
|
11088
|
+
*
|
|
11089
|
+
* const selectWalletTool = createSelectPaymentWalletTool({
|
|
11090
|
+
* getContext: () => uiInteraction,
|
|
11091
|
+
* getLastMessageId: () => lastMsgId,
|
|
11092
|
+
* listWallets: async () => wallets,
|
|
11093
|
+
* });
|
|
11094
|
+
* ```
|
|
11095
|
+
*/
|
|
11096
|
+
declare function createSelectPaymentWalletTool(options: CreateSelectPaymentWalletToolOptions): ToolConfig;
|
|
11097
|
+
/**
|
|
11098
|
+
* Create the prompt_wallet_payment tool, which collects the passengers on a card and then pays the booking through the caller's `pay` function.
|
|
11099
|
+
*
|
|
11100
|
+
* @example
|
|
11101
|
+
* ```typescript
|
|
11102
|
+
* import { createWalletPaymentTool } from "@anuma/sdk/tools";
|
|
11103
|
+
*
|
|
11104
|
+
* const paymentTool = createWalletPaymentTool({
|
|
11105
|
+
* getContext: () => uiInteraction,
|
|
11106
|
+
* getLastMessageId: () => lastMsgId,
|
|
11107
|
+
* pay: (request, signal) => payFromWallet(request, signal),
|
|
11108
|
+
* });
|
|
11109
|
+
* ```
|
|
11110
|
+
*/
|
|
11111
|
+
declare function createWalletPaymentTool(options: CreateWalletPaymentToolOptions): ToolConfig;
|
|
11112
|
+
|
|
11113
|
+
/** Name of the client tool that shows the wallet picker card for a flight payment. */
|
|
11114
|
+
declare const SELECT_PAYMENT_WALLET_TOOL_NAME = "select_payment_wallet";
|
|
11115
|
+
/** Name of the client tool that collects passengers and pays a booking from the chosen wallet. */
|
|
11116
|
+
declare const WALLET_PAYMENT_TOOL_NAME = "prompt_wallet_payment";
|
|
11117
|
+
|
|
11007
11118
|
type SendMessageArgs = BaseSendMessageArgs & {
|
|
11008
11119
|
/**
|
|
11009
11120
|
* Per-request callback for thinking/reasoning chunks.
|
|
@@ -11529,4 +11640,4 @@ interface UseChatStorageResult extends BaseUseChatStorageResult {
|
|
|
11529
11640
|
*/
|
|
11530
11641
|
declare function useChatStorage(options: UseChatStorageOptions): UseChatStorageResult;
|
|
11531
11642
|
|
|
11532
|
-
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, 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, type EmbeddingRepairOptions, type EmbeddingRepairResult, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionMessageSource, type ExtractionSourceMessage, type ExtractionSourceStatus, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, 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, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionMcpCaller, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, 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 RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WriteFailureReason, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptMessageEmbeddingFields, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, sealLegacyMessageEmbeddingsOp, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|
|
11643
|
+
export { type AutoExtractMessage, type AutoExtractor, type Budget, CHUNKS_DISCARDED_ORIGIN, type CachedChunkVectors, type CachedServerTools, Conversation as ChatConversation, Message as ChatMessage, type ChatRole, type ChunkSearchStats, type ChunkVectorCache, type ChunkingOptions, type ConsolidationAction, type ConsolidationFallbackReason, type ConversationMemoryInput, ConversationMemory as ConversationMemoryModel, type ConversationMemoryOperationsContext, type CreateAutoExtractorOptions, type CreateConversationOptions, type CreateDecaySweeperOptions, type CreateMessageOptions, type CreateSelectPaymentWalletToolOptions, type CreateVaultFolderOptions, type CreateVaultMemoryOptions, type CreateWalletPaymentToolOptions, type CryptoPriceClassification, type CryptoPricePreProcessorOptions, DEFAULT_CACHE_EXPIRATION_MS, DEFAULT_CHUNK_CACHE_SIZE, DEFAULT_CHUNK_OVERLAP, DEFAULT_CHUNK_SIZE, DEFAULT_DECAY_POLICY, DEFAULT_MAX_CLASSIFIER_CALLS_PER_SWEEP, DEFAULT_MIN_CHUNK_SIZE, DEFAULT_PROFILE_FACETS, DEFAULT_PROFILE_FACT_TYPE_WEIGHTS, DEFAULT_PROFILE_PROOF_ALPHA, DEFAULT_PROFILE_TREND_MULTIPLIERS, 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, type EmbeddingRepairOptions, type EmbeddingRepairResult, EncryptionKeyMissingError, type ExtractFactsOptions, type ExtractOutcome, type ExtractedCandidate, type ExtractedEntity, type ExtractionCursorStore, type ExtractionFunnel, type ExtractionMessageSource, type ExtractionSourceMessage, type ExtractionSourceStatus, type ExtractionTimings, type FactType, type FileMetadata, type FileProcessingReason, type FileProcessingStatus, type FlushResult, type GetConversationsPageOptions, type GetMessagesPageOptions, type GraphTraversalOptions, HARD_DELETE_WINDOW_MS, INFERENCE_ID_HEADER, type InjectionClassifierOptions, type InjectionReason, type LazyStoredConversation, type LlmDecayClassifierOptions, type LlmNeighborRefinerOptions, type LocalMemoryStoreOptions, type Logger, LoggerProvider, type LoggerProviderProps, MAX_HOPS, MEDIUM_TTL_MS, MEMORY_KINDS, MEMORY_LEVELS, type ManualFactType, type MemoriesNeedingTopicExtraction, type MemoryContextItem, type MemoryContextLane, type MemoryContextOptions, type MemoryContextResult, type MemoryCreate, type MemoryDecay, type MemoryDecaySweeperOptions, type EmbeddingOptions as MemoryEngineEmbeddingOptions, type MemoryEngineResult, type MemoryEngineSearchOptions, type MemoryExtractedEvent, MemoryKeyError, type MemoryKeyRing, type MemoryKind, type MemoryLevel, MemoryLevelError, type MemoryListOptions, type MemoryMaintenance, type MemoryMigrationOptions, type MemoryMigrationProgress, type MemoryMigrationResult, type MemoryMigrationSkip, 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, type MessageRedactionResult, type MessageSkeleton, NEVER_TTL_MS, NODE_BUDGET, NOTION_OAUTH_CONFIG, type NeighborRefiner, type NotionAuthUrlParams, type NotionClientRegistration, type NotionExchangeCodeParams, type NotionMcpCaller, type NotionOAuthEndpoints, type NotionPKCEChallenge, type NotionRefreshTokenParams, type NotionTokenResponse, type NowSource, type ObservationTrend, type ObservationTrendInput, PAST_EVENT_GRACE_MS, PII_PATTERNS, PROFILE_DOC_VERSION, type PaymentWallet, type PhotoIngestResult, type PhotoMediaRef, type PiiCategory, type PiiMatch, type PiiPattern, PiiRedactor, type PiiRedactorOptions, type PlatformStorage, type PortalLlmAuth, type PortalLlmFailure, type PortalLlmFailureReason, type ProfileConfigFingerprint, type ProfileDoc, type ProfileFacet, type ProfileFacetKey, type ProfileSalienceInput, type ProfileSection, type PromptPreProcessor, type PromptPreProcessorContext, type PublishedPhotoMemory, type QuantizedEmbedding, type QuarantinedMemoryInfo, QueueManager, type QueueStatus, RECALL_MAX_LIMIT, RECALL_TOOL_NAME, type RankableVaultMemory, 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 RedactionResult, type ReflectOptions, type ReflectResult, type RemoteMemoryCandidateOptions, type RemoteMemoryDecodeFailure, RemoteMemoryError, type RemoteMemoryListOptions, type RemoteMemoryMetadataPage, type RemoteMemoryMetadataRecord, type RemoteMemoryPage, RemoteMemoryPartialCreateError, type RemoteMemoryPersistence, type RemoteMemoryPersistenceOptions, type RemoteMemoryPipeline, type RemoteMemoryPipelineOptions, type RemoteMemoryQueryOptions, type RemoteMemoryQueryPage, type RemoteMemoryReadFilters, type RemoteMemoryRecord, type RemoteMemoryRow, type RemoteMemoryStoreOptions, type RequestEncryptionKeyOptions, RerankerUnavailableError, type ReservationReceipt, type ResumeStreamOptions, type ResumeStreamResult, type ResumeStreamWithStorageResult, type RetainAction, type RetainContext, type RetainOptions, type RetainResult, type RetainSource, SDK_SCHEMA_VERSION, SELECT_PAYMENT_WALLET_TOOL_NAME, SHORT_TTL_MS, STREAM_RESUMABLE_HEADER, type ScoreBreakdown, type ScoreProfileSalienceOptions, type ScreenResult, type ScreenedCandidate, type SearchSource, type SelectPaymentWalletResult, type SendMessageWithStorageArgs, type SendMessageWithStorageDetachedResult, type SendMessageWithStorageResult, type ServerToolsOptions, type ServerToolsResponse, type SignMessageFn, type StockPriceClassification, type StockPricePreProcessorOptions, type ChatCompletionUsage as StoredChatCompletionUsage, type StoredConversation, type StoredConversationMemory, type StoredMessage, type StoredMessageWithSimilarity, type StoredTopic, type StoredVaultFolder, VaultFolder as StoredVaultFolderModel, type StoredVaultMemory, VaultMemory as StoredVaultMemoryModel, StreamExpiredError, type StreamMetaEvent, type StreamResumeHandle, type StreamSmoothingConfig, type SynthesizeProfileOptions, TOOL_RESULT_ORIGIN, TOPICS_EXTRACTION_VERSION, TOPIC_EXTRACTION_BATCH_SIZE, TOPIC_SALIENCE_WEIGHTS, TREND_RECENT_WINDOW_DAYS, TREND_STALE_WINDOW_DAYS, type TextChunk, type TopicExtractOptions, type TopicExtractionBatchDiagnostics, type TopicExtractionInput, type TopicExtractionRunResult, type TopicSalience, type TopicSkipReason, type TurnCompleteEvent, type TurnSkippedEvent, type UncheckedReason, type UnverifiableReason, type UpdateVaultFolderOptions, type UpdateVaultMemoryOptions, type UseChatStorageOptions, type UseChatStorageResult, type UseCreditsOptions, type UseCreditsResult, type UseModelsOptions, type UseModelsResult, VAULT_SIZE_HOP_CAP, type VaultEmbeddingCache, type VaultEmbeddingExpectation, type VaultFolderOperationsContext, type VaultMemoryKind, type VaultMemoryOperationsContext, type VaultMemoryProjection, type VaultMemoryVisibility, type VaultMemoryWriter, type VaultSaveOperation, type VaultSearchResult, type VaultWriteAction, type VaultWriteInput, type VaultWriteOutcome, type VerificationSources, type VerifyMemoriesForPublishOptions, WALLET_PAYMENT_TOOL_NAME, type WalletPaymentOutcome, type WalletPaymentPassenger, type WalletPaymentRequest, type WalletPaymentResult, WalletPoller, type WeatherClassification, type WeatherPreProcessorOptions, type WebSearchClassification, type WebSearchPreProcessorOptions, type WriteFailureReason, addConversationMemoriesOp, archiveVaultMemoryOp, assembleMemoryContext, attachFileContextToLastUserMessage, backfillMemoryTopicsOp, buildAttachedFilesText, buildNotionAuthUrl, capHopsForDensity, chatStorageMigrations, chatStorageSchema, chunkAndEmbedAllMessages, chunkAndEmbedMessage, chunkText, classifyCryptoPrice, classifyCryptoPriceBatch, classifyDecay, classifyInjectionCandidates, classifyObservationTrend, classifyStockPrice, classifyStockPriceBatch, classifyWeather, classifyWeatherBatch, classifyWebSearch, classifyWebSearchBatch, clearAllEncryptionKeys, clearAllEncryptionState, clearConversationMemoriesOp, clearEncryptionKey, clearLazyTitleCache, clearModelsCache, clearServerToolsCache, consoleLogger, conversationMemoryToStored, cosineInt8, createAutoExtractor, createChunkVectorCache, createCryptoPricePreProcessor, createDecaySweeper, createDurableAutoExtractor, createLlmDecayClassifier, createLlmNeighborRefiner, createLocalMemoryStore, createMemoryEngineTool, createMemoryVaultSearchTool, createMemoryVaultTool, createMessageSourceResolver, createNotionProxyTools, createNotionTools, createPlatformCursorStore, createRecallTool, createRemoteMemoryPersistence, createRemoteMemoryPipeline, createRemoteMemoryStore, createSelectPaymentWalletTool, createStockPricePreProcessor, createStreamingDeAnonymizer, createVaultEmbeddingCache, createVaultFolderOp, createVaultMemoriesBatchOp, createVaultMemoryOp, createWalletPaymentTool, createWeatherPreProcessor, createWebSearchPreProcessor, decodeChunkVector, decryptConversationTitle, decryptMessageEmbeddingFields, deleteAllVaultMemoriesForUserOp, deleteMessageOp, deleteVaultFolderOp, deleteVaultMemoryOp, dequantizeEmbedding, deriveKeyFromSignatureBytes, deriveMemoryKeyRing, discoverNotionOAuthEndpoints, eagerEmbedContent, embedAllMessages, embedMessage, encodeChunkVector, encryptToolCallEventsOp, ensureDefaultFoldersOp, exchangeNotionCode, extractAndLinkEntitiesForMemoriesOp, extractAndRetain, extractEntitiesForMemories, extractFacts, extractReservationReceipts, formatFileProcessingNotes, generateConversationId, generateEmbedding, generateEmbeddings, generateNotionPKCE, getAllVaultFoldersOp, getAllVaultMemoriesOp, getAllVaultMemoryContentsOp, getCachedServerTools, getConversationMemoriesOp, getConversationsByProjectLazyOp, getConversationsLazyOp, getConversationsPageOp, getDecayCandidatesRawOp, getLogger, getMemoriesNeedingTopicExtractionOp, getServerTools, getUnfiledVaultMemoriesOp, getVaultFolderMemoryCountOp, getVaultMemoriesByIdsOp, getVaultMemoryOp, getVaultRankingProjectionsOp, hardDeleteDecayedOp, hasEncryptionKey, ingestPublishedPhotoMemoriesOp, injectionSignatureCatalog, isAttachedFilesText, isDegradedTopicSkip, isEncrypted, isPiiRedactor, isRerankerAvailable, maskScopedEmbeddingCache, memoryCipher, migrateMemoriesToRemote, moveMemoriesToFolderOp, noopLogger, onKeyAvailable, parseMedia, preEmbedVaultMemories, primaryTopic, quantizeEmbedding, queueManager, rankProfileCandidates, recall, reencryptMemoryField, reflect, refreshEncryptionKeyIfMatches, refreshNotionAccessToken, registerNotionClient, relinkMemoryTopicsOp, requestEncryptionKey, resolvePiiRedactor, restoreVaultMemoryOp, resumeStream, retain, scoreProfileSalience, screenCandidatesForInjection, sdkMigrations, sdkModelClasses, sdkSchema, sealLegacyMessageEmbeddingsOp, searchVaultMemories, seedEncryptionKeys, setLogger, setMemoryVisibilityOp, shouldChunkMessage, shouldRecallMemory, stampTopicsExtractedAtOp, streamCancelPath, streamReplayPath, stripLegacyChunkTextOp, summarizeObservationTrends, supersedeVaultMemoryOp, synthesizeProfile, topicWeight, traverseGraphLane, ttlForType, updateVaultFolderContextOp, updateVaultFolderOp, updateVaultMemoryEmbeddingOp, updateVaultMemoryOp, upsertMessageOp, useChat, useChatStorage, useCredits, useEncryption, useModels, verifyMemoriesForPublish, xhrTransport };
|