@mastra/memory 1.41.0 → 1.41.1-alpha.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/docs/SKILL.md +3 -2
- package/dist/docs/assets/SOURCE_MAP.json +225 -191
- package/dist/docs/references/docs-harness-goals.md +1 -1
- package/dist/docs/references/docs-knowledge-overview.md +106 -0
- package/dist/docs/references/docs-memory-observational-memory.md +23 -23
- package/dist/docs/references/docs-memory-overview.md +19 -7
- package/dist/docs/references/reference-core-getMemory.md +2 -2
- package/dist/docs/references/reference-core-listMemory.md +3 -3
- package/dist/docs/references/reference-memory-observational-memory.md +9 -7
- package/dist/docs/references/reference-processors-token-limiter-processor.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/processors/index.cjs +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/{src-BncFunCW.js → src-BIae5T_v.js} +191 -122
- package/dist/src-BIae5T_v.js.map +1 -0
- package/dist/{src-gNoNdZv8.cjs → src-BbbBzTaj.cjs} +191 -122
- package/dist/src-BbbBzTaj.cjs.map +1 -0
- package/package.json +2 -2
- package/dist/src-BncFunCW.js.map +0 -1
- package/dist/src-gNoNdZv8.cjs.map +0 -1
|
@@ -3689,7 +3689,7 @@ function trimStartOfStream() {
|
|
|
3689
3689
|
return text2;
|
|
3690
3690
|
};
|
|
3691
3691
|
}
|
|
3692
|
-
// ../_vendored/ai_v5/dist/dist-
|
|
3692
|
+
// ../_vendored/ai_v5/dist/dist-BYnbJEqC.js
|
|
3693
3693
|
var marker$1$16 = "vercel.ai.error";
|
|
3694
3694
|
var symbol$1$17 = Symbol.for(marker$1$16);
|
|
3695
3695
|
var _a$1$2;
|
|
@@ -4250,7 +4250,7 @@ function withUserAgentSuffix$2(headers, ...userAgentSuffixParts) {
|
|
|
4250
4250
|
normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
|
|
4251
4251
|
return Object.fromEntries(normalizedHeaders.entries());
|
|
4252
4252
|
}
|
|
4253
|
-
var VERSION$8 = "3.0.
|
|
4253
|
+
var VERSION$8 = "3.0.44";
|
|
4254
4254
|
var getOriginalFetch$3 = () => globalThis.fetch;
|
|
4255
4255
|
var getFromApi$2 = async ({ url, headers = {}, successfulResponseHandler, failedResponseHandler, abortSignal, fetch = getOriginalFetch$3() }) => {
|
|
4256
4256
|
try {
|
|
@@ -5674,10 +5674,24 @@ function asSchema$2(schema) {
|
|
|
5674
5674
|
}) : isSchema$2(schema) ? schema : typeof schema === "function" ? schema() : zodSchema$2(schema);
|
|
5675
5675
|
}
|
|
5676
5676
|
var { btoa: btoa$3, atob: atob$6 } = globalThis;
|
|
5677
|
+
var typedArrayTag$2 = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get;
|
|
5678
|
+
var arrayBufferByteLength$2 = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get;
|
|
5679
|
+
function isUint8Array$2(value) {
|
|
5680
|
+
return ArrayBuffer.isView(value) && typedArrayTag$2.call(value) === "Uint8Array";
|
|
5681
|
+
}
|
|
5682
|
+
function isArrayBuffer$2(value) {
|
|
5683
|
+
if (typeof value !== "object" || value === null || !("byteLength" in value)) return false;
|
|
5684
|
+
try {
|
|
5685
|
+
arrayBufferByteLength$2.call(value);
|
|
5686
|
+
return true;
|
|
5687
|
+
} catch (e) {
|
|
5688
|
+
return false;
|
|
5689
|
+
}
|
|
5690
|
+
}
|
|
5677
5691
|
function withoutTrailingSlash$2(url) {
|
|
5678
5692
|
return url == null ? void 0 : url.replace(/\/$/, "");
|
|
5679
5693
|
}
|
|
5680
|
-
// ../_vendored/ai_v5/dist/dist-
|
|
5694
|
+
// ../_vendored/ai_v5/dist/dist-oTd7Lp_i.js
|
|
5681
5695
|
function getContext$2() {
|
|
5682
5696
|
return { headers: {} };
|
|
5683
5697
|
}
|
|
@@ -6013,6 +6027,7 @@ function isTimeoutError$2(error) {
|
|
|
6013
6027
|
}
|
|
6014
6028
|
async function asGatewayError$2(error, authMethod) {
|
|
6015
6029
|
var _a10;
|
|
6030
|
+
if ((error instanceof Error || typeof DOMException === "function" && error instanceof DOMException) && (error.name === "AbortError" || error.name === "TimeoutError")) throw error;
|
|
6016
6031
|
if (GatewayError$2.isInstance(error)) return error;
|
|
6017
6032
|
if (isTimeoutError$2(error)) return GatewayTimeoutError$2.createTimeoutError({
|
|
6018
6033
|
originalMessage: error instanceof Error ? error.message : "Unknown error",
|
|
@@ -6656,7 +6671,7 @@ async function getVercelRequestId$2() {
|
|
|
6656
6671
|
var _a10;
|
|
6657
6672
|
return (_a10 = getContext$2().headers) == null ? void 0 : _a10["x-vercel-id"];
|
|
6658
6673
|
}
|
|
6659
|
-
var VERSION$7 = "2.0.
|
|
6674
|
+
var VERSION$7 = "2.0.176";
|
|
6660
6675
|
var AI_GATEWAY_PROTOCOL_VERSION$2 = "0.0.1";
|
|
6661
6676
|
function createGatewayProvider$1(options = {}) {
|
|
6662
6677
|
var _a10, _b10;
|
|
@@ -7691,11 +7706,11 @@ function getGlobalProvider$2() {
|
|
|
7691
7706
|
var _a17;
|
|
7692
7707
|
return (_a17 = globalThis.AI_SDK_DEFAULT_PROVIDER) != null ? _a17 : gateway$2;
|
|
7693
7708
|
}
|
|
7694
|
-
var VERSION$6 = "5.0.
|
|
7709
|
+
var VERSION$6 = "5.0.285";
|
|
7695
7710
|
var dataContentSchema$1 = z$1.union([
|
|
7696
7711
|
z$1.string(),
|
|
7697
|
-
z$1.
|
|
7698
|
-
z$1.
|
|
7712
|
+
z$1.custom(isUint8Array$2, { message: "Must be a Uint8Array" }),
|
|
7713
|
+
z$1.custom(isArrayBuffer$2, { message: "Must be an ArrayBuffer" }),
|
|
7699
7714
|
z$1.custom((value) => {
|
|
7700
7715
|
var _a17, _b;
|
|
7701
7716
|
return (_b = (_a17 = globalThis.Buffer) == null ? void 0 : _a17.isBuffer(value)) != null ? _b : false;
|
|
@@ -8597,7 +8612,7 @@ var object$2 = ({ schema: inputSchema }) => {
|
|
|
8597
8612
|
}
|
|
8598
8613
|
};
|
|
8599
8614
|
};
|
|
8600
|
-
// ../_vendored/ai_v6/dist/dist-
|
|
8615
|
+
// ../_vendored/ai_v6/dist/dist-DwNW4Hp7.js
|
|
8601
8616
|
var marker$1$14 = "vercel.ai.error";
|
|
8602
8617
|
var symbol$1$15 = Symbol.for(marker$1$14);
|
|
8603
8618
|
var _a$1$1;
|
|
@@ -9001,6 +9016,20 @@ function convertUint8ArrayToBase64$1(array) {
|
|
|
9001
9016
|
for (let i = 0; i < array.length; i += chunkSize) chunks.push(String.fromCodePoint(...array.subarray(i, i + chunkSize)));
|
|
9002
9017
|
return btoa$2(chunks.join(""));
|
|
9003
9018
|
}
|
|
9019
|
+
var typedArrayTag$1 = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get;
|
|
9020
|
+
var arrayBufferByteLength$1 = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get;
|
|
9021
|
+
function isUint8Array$1(value) {
|
|
9022
|
+
return ArrayBuffer.isView(value) && typedArrayTag$1.call(value) === "Uint8Array";
|
|
9023
|
+
}
|
|
9024
|
+
function isArrayBuffer$1(value) {
|
|
9025
|
+
if (typeof value !== "object" || value === null || !("byteLength" in value)) return false;
|
|
9026
|
+
try {
|
|
9027
|
+
arrayBufferByteLength$1.call(value);
|
|
9028
|
+
return true;
|
|
9029
|
+
} catch (e) {
|
|
9030
|
+
return false;
|
|
9031
|
+
}
|
|
9032
|
+
}
|
|
9004
9033
|
async function cancelResponseBody$1(response) {
|
|
9005
9034
|
var _a2;
|
|
9006
9035
|
try {
|
|
@@ -9455,7 +9484,7 @@ function withUserAgentSuffix$1(headers, ...userAgentSuffixParts) {
|
|
|
9455
9484
|
normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
|
|
9456
9485
|
return Object.fromEntries(normalizedHeaders.entries());
|
|
9457
9486
|
}
|
|
9458
|
-
var VERSION$5 = "4.0.
|
|
9487
|
+
var VERSION$5 = "4.0.64";
|
|
9459
9488
|
var getOriginalFetch$1 = () => globalThis.fetch;
|
|
9460
9489
|
var getFromApi$1 = async ({ url, headers = {}, successfulResponseHandler, failedResponseHandler, abortSignal, fetch, validateUrl, credentialedOrigin, trustedOrigin }) => {
|
|
9461
9490
|
try {
|
|
@@ -10931,7 +10960,7 @@ var createJsonResponseHandler$1 = (responseSchema) => async ({ response, url, re
|
|
|
10931
10960
|
function withoutTrailingSlash$1(url) {
|
|
10932
10961
|
return url == null ? void 0 : url.replace(/\/$/, "");
|
|
10933
10962
|
}
|
|
10934
|
-
// ../_vendored/ai_v6/dist/dist-
|
|
10963
|
+
// ../_vendored/ai_v6/dist/dist-B9RoRXxy.js
|
|
10935
10964
|
function getContext$1() {
|
|
10936
10965
|
return { headers: {} };
|
|
10937
10966
|
}
|
|
@@ -11321,6 +11350,7 @@ function isTimeoutError$1(error) {
|
|
|
11321
11350
|
}
|
|
11322
11351
|
async function asGatewayError$1(error, authMethod) {
|
|
11323
11352
|
var _a11;
|
|
11353
|
+
if ((error instanceof Error || typeof DOMException === "function" && error instanceof DOMException) && (error.name === "AbortError" || error.name === "TimeoutError")) throw error;
|
|
11324
11354
|
if (GatewayError$1.isInstance(error)) return error;
|
|
11325
11355
|
if (isTimeoutError$1(error)) return GatewayTimeoutError$1.createTimeoutError({
|
|
11326
11356
|
originalMessage: error instanceof Error ? error.message : "Unknown error",
|
|
@@ -12381,6 +12411,54 @@ var browserbaseSearchToolFactory$1 = createProviderToolFactoryWithOutputSchema({
|
|
|
12381
12411
|
})])))
|
|
12382
12412
|
});
|
|
12383
12413
|
var browserbaseSearch$1 = (config = {}) => browserbaseSearchToolFactory$1(config);
|
|
12414
|
+
var gatewayToolErrorSchema$1 = () => z.object({
|
|
12415
|
+
error: z.enum([
|
|
12416
|
+
"api_error",
|
|
12417
|
+
"configuration_error",
|
|
12418
|
+
"execution_error",
|
|
12419
|
+
"gateway_rate_limit",
|
|
12420
|
+
"invalid_input",
|
|
12421
|
+
"rate_limit",
|
|
12422
|
+
"timeout",
|
|
12423
|
+
"unknown",
|
|
12424
|
+
"unknown_tool"
|
|
12425
|
+
]),
|
|
12426
|
+
message: z.string(),
|
|
12427
|
+
statusCode: z.number().optional(),
|
|
12428
|
+
retryAfter: z.string().optional(),
|
|
12429
|
+
statusText: z.string().optional()
|
|
12430
|
+
}).passthrough();
|
|
12431
|
+
var deepseekFetchToolFactory$1 = createProviderToolFactoryWithOutputSchema({
|
|
12432
|
+
id: "gateway.deepseek_fetch",
|
|
12433
|
+
inputSchema: lazySchema$1(() => zodSchema$1(z.object({ url: z.string().describe("URL to fetch, at most 8192 characters; HTTP(S) only, without a username or password.") }))),
|
|
12434
|
+
outputSchema: lazySchema$1(() => zodSchema$1(z.union([z.object({
|
|
12435
|
+
title: z.string().nullish(),
|
|
12436
|
+
content: z.string()
|
|
12437
|
+
}).passthrough(), gatewayToolErrorSchema$1()])))
|
|
12438
|
+
});
|
|
12439
|
+
var deepseekFetch$1 = (config = {}) => deepseekFetchToolFactory$1(config);
|
|
12440
|
+
var deepseekSearchToolFactory$1 = createProviderToolFactoryWithOutputSchema({
|
|
12441
|
+
id: "gateway.deepseek_search",
|
|
12442
|
+
inputSchema: lazySchema$1(() => zodSchema$1(z.object({
|
|
12443
|
+
query: z.string().describe("Web search query, 1 to 128 Unicode characters. Supports site:, -site:, lang:, after:, before:, and quoted phrases."),
|
|
12444
|
+
count: z.number().int().optional().describe("Number of results, 1 to 50 (default: 10)."),
|
|
12445
|
+
need_content: z.boolean().optional().describe("Include available page content (default: false)."),
|
|
12446
|
+
ori_question: z.string().nullable().optional().describe("Original user question, 1 to 128 Unicode characters.")
|
|
12447
|
+
}))),
|
|
12448
|
+
outputSchema: lazySchema$1(() => zodSchema$1(z.union([z.object({ results: z.array(z.object({
|
|
12449
|
+
authority: z.number().nullish(),
|
|
12450
|
+
content: z.string().nullish(),
|
|
12451
|
+
date: z.string().nullish(),
|
|
12452
|
+
rerank_score: z.number().nullish(),
|
|
12453
|
+
site_icon: z.string().nullish(),
|
|
12454
|
+
site_name: z.string().nullish(),
|
|
12455
|
+
snippet: z.string().nullish(),
|
|
12456
|
+
summary: z.string().nullish(),
|
|
12457
|
+
title: z.string().nullish(),
|
|
12458
|
+
url: z.string().nullish()
|
|
12459
|
+
}).passthrough()) }).passthrough(), gatewayToolErrorSchema$1()])))
|
|
12460
|
+
});
|
|
12461
|
+
var deepseekSearch$1 = (config = {}) => deepseekSearchToolFactory$1(config);
|
|
12384
12462
|
var exaSearchToolFactory$1 = createProviderToolFactoryWithOutputSchema({
|
|
12385
12463
|
id: "gateway.exa_search",
|
|
12386
12464
|
inputSchema: lazySchema$1(() => zodSchema$1(z.object({
|
|
@@ -12537,21 +12615,7 @@ var parallelSearchToolFactory$1 = createProviderToolFactoryWithOutputSchema({
|
|
|
12537
12615
|
count: z.number().optional()
|
|
12538
12616
|
})).nullable().optional(),
|
|
12539
12617
|
session_id: z.string().optional()
|
|
12540
|
-
}),
|
|
12541
|
-
error: z.enum([
|
|
12542
|
-
"api_error",
|
|
12543
|
-
"configuration_error",
|
|
12544
|
-
"execution_error",
|
|
12545
|
-
"gateway_rate_limit",
|
|
12546
|
-
"invalid_input",
|
|
12547
|
-
"rate_limit",
|
|
12548
|
-
"timeout",
|
|
12549
|
-
"unknown",
|
|
12550
|
-
"unknown_tool"
|
|
12551
|
-
]),
|
|
12552
|
-
statusCode: z.number().optional(),
|
|
12553
|
-
message: z.string()
|
|
12554
|
-
})])))
|
|
12618
|
+
}), gatewayToolErrorSchema$1()])))
|
|
12555
12619
|
});
|
|
12556
12620
|
var parallelSearch$1 = (config = {}) => parallelSearchToolFactory$1(config);
|
|
12557
12621
|
var perplexitySearchToolFactory$1 = createProviderToolFactoryWithOutputSchema({
|
|
@@ -12782,19 +12846,7 @@ var takoSearchToolFactory$1 = createProviderToolFactoryWithOutputSchema({
|
|
|
12782
12846
|
}).nullish()
|
|
12783
12847
|
}).nullish(),
|
|
12784
12848
|
related: z.array(z.object({}).passthrough()).nullish()
|
|
12785
|
-
}).passthrough(),
|
|
12786
|
-
error: z.enum([
|
|
12787
|
-
"api_error",
|
|
12788
|
-
"configuration_error",
|
|
12789
|
-
"execution_error",
|
|
12790
|
-
"invalid_input",
|
|
12791
|
-
"rate_limit",
|
|
12792
|
-
"timeout",
|
|
12793
|
-
"unknown_tool"
|
|
12794
|
-
]),
|
|
12795
|
-
statusCode: z.number().optional(),
|
|
12796
|
-
message: z.string()
|
|
12797
|
-
})])))
|
|
12849
|
+
}).passthrough(), gatewayToolErrorSchema$1()])))
|
|
12798
12850
|
});
|
|
12799
12851
|
var takoSearch$1 = (config = {}) => takoSearchToolFactory$1(config);
|
|
12800
12852
|
var gatewayTools$1 = {
|
|
@@ -12813,6 +12865,16 @@ var gatewayTools$1 = {
|
|
|
12813
12865
|
*/
|
|
12814
12866
|
browserbaseSearch: browserbaseSearch$1,
|
|
12815
12867
|
/**
|
|
12868
|
+
* Fetch a page as Markdown through DeepSeek's standalone Fetch API.
|
|
12869
|
+
* Executed by AI Gateway for any model, separate from native model web search.
|
|
12870
|
+
*/
|
|
12871
|
+
deepseekFetch: deepseekFetch$1,
|
|
12872
|
+
/**
|
|
12873
|
+
* Search the web through DeepSeek's standalone Search API.
|
|
12874
|
+
* Executed by AI Gateway for any model, separate from native model web search.
|
|
12875
|
+
*/
|
|
12876
|
+
deepseekSearch: deepseekSearch$1,
|
|
12877
|
+
/**
|
|
12816
12878
|
* Search the web using Exa for current information and token-efficient
|
|
12817
12879
|
* excerpts optimized for agent workflows.
|
|
12818
12880
|
*
|
|
@@ -12851,7 +12913,7 @@ async function getVercelRequestId$1() {
|
|
|
12851
12913
|
var _a11;
|
|
12852
12914
|
return (_a11 = getContext$1().headers) == null ? void 0 : _a11["x-vercel-id"];
|
|
12853
12915
|
}
|
|
12854
|
-
var VERSION$4 = "3.0.
|
|
12916
|
+
var VERSION$4 = "3.0.228";
|
|
12855
12917
|
var AI_GATEWAY_PROTOCOL_VERSION$1 = "0.0.1";
|
|
12856
12918
|
function createGatewayProvider(options = {}) {
|
|
12857
12919
|
var _a11, _b11;
|
|
@@ -14027,11 +14089,11 @@ function getTotalTimeoutMs(timeout) {
|
|
|
14027
14089
|
if (typeof timeout === "number") return timeout;
|
|
14028
14090
|
return timeout.totalMs;
|
|
14029
14091
|
}
|
|
14030
|
-
var VERSION$3 = "6.0.
|
|
14092
|
+
var VERSION$3 = "6.0.322";
|
|
14031
14093
|
var dataContentSchema = z$1.union([
|
|
14032
14094
|
z$1.string(),
|
|
14033
|
-
z$1.
|
|
14034
|
-
z$1.
|
|
14095
|
+
z$1.custom(isUint8Array$1, { message: "Must be a Uint8Array" }),
|
|
14096
|
+
z$1.custom(isArrayBuffer$1, { message: "Must be an ArrayBuffer" }),
|
|
14035
14097
|
z$1.custom((value) => {
|
|
14036
14098
|
var _a23, _b;
|
|
14037
14099
|
return (_b = (_a23 = globalThis.Buffer) == null ? void 0 : _a23.isBuffer(value)) != null ? _b : false;
|
|
@@ -15223,7 +15285,7 @@ createIdGenerator$1({
|
|
|
15223
15285
|
prefix: "aiobj",
|
|
15224
15286
|
size: 24
|
|
15225
15287
|
});
|
|
15226
|
-
// ../_vendored/ai_v7/dist/dist-
|
|
15288
|
+
// ../_vendored/ai_v7/dist/dist-CwN1TMYk.js
|
|
15227
15289
|
/**
|
|
15228
15290
|
* Symbol used for identifying AI SDK Error instances.
|
|
15229
15291
|
* Enables checking if an error is an instance of AISDKError across package versions.
|
|
@@ -15822,7 +15884,9 @@ const { btoa: btoa$1, atob: atob$2 } = globalThis;
|
|
|
15822
15884
|
function convertBase64ToUint8Array(base64String) {
|
|
15823
15885
|
const base64Url = base64String.replace(/-/g, "+").replace(/_/g, "/");
|
|
15824
15886
|
const latin1string = atob$2(base64Url);
|
|
15825
|
-
|
|
15887
|
+
const bytes = new Uint8Array(latin1string.length);
|
|
15888
|
+
for (let i = 0; i < latin1string.length; i++) bytes[i] = latin1string.charCodeAt(i);
|
|
15889
|
+
return bytes;
|
|
15826
15890
|
}
|
|
15827
15891
|
function convertUint8ArrayToBase64(array) {
|
|
15828
15892
|
if (typeof globalThis.Buffer?.from === "function") return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString("base64");
|
|
@@ -15831,6 +15895,20 @@ function convertUint8ArrayToBase64(array) {
|
|
|
15831
15895
|
for (let i = 0; i < array.length; i += chunkSize) chunks.push(String.fromCodePoint(...array.subarray(i, i + chunkSize)));
|
|
15832
15896
|
return btoa$1(chunks.join(""));
|
|
15833
15897
|
}
|
|
15898
|
+
const typedArrayTag = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get;
|
|
15899
|
+
const arrayBufferByteLength = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get;
|
|
15900
|
+
function isUint8Array(value) {
|
|
15901
|
+
return ArrayBuffer.isView(value) && typedArrayTag.call(value) === "Uint8Array";
|
|
15902
|
+
}
|
|
15903
|
+
function isArrayBuffer(value) {
|
|
15904
|
+
if (typeof value !== "object" || value === null || !("byteLength" in value)) return false;
|
|
15905
|
+
try {
|
|
15906
|
+
arrayBufferByteLength.call(value);
|
|
15907
|
+
return true;
|
|
15908
|
+
} catch {
|
|
15909
|
+
return false;
|
|
15910
|
+
}
|
|
15911
|
+
}
|
|
15834
15912
|
/**
|
|
15835
15913
|
* Extracts the headers from a response object and returns them as a key-value object.
|
|
15836
15914
|
*
|
|
@@ -15908,7 +15986,7 @@ function handleFetchError({ error, url, requestBodyValues }) {
|
|
|
15908
15986
|
}
|
|
15909
15987
|
return error;
|
|
15910
15988
|
}
|
|
15911
|
-
const VERSION$2 = "5.0.
|
|
15989
|
+
const VERSION$2 = "5.0.74";
|
|
15912
15990
|
/**
|
|
15913
15991
|
* Normalizes different header inputs into a plain record with lower-case keys.
|
|
15914
15992
|
* Entries with `undefined` or `null` values are removed.
|
|
@@ -18399,7 +18477,7 @@ function isSegment(value) {
|
|
|
18399
18477
|
function withoutTrailingSlash(url) {
|
|
18400
18478
|
return url?.replace(/\/$/, "");
|
|
18401
18479
|
}
|
|
18402
|
-
// ../_vendored/ai_v7/dist/dist-
|
|
18480
|
+
// ../_vendored/ai_v7/dist/dist-D6YcYEgU.js
|
|
18403
18481
|
/**
|
|
18404
18482
|
* Symbol used to define custom serialization for user-defined class instances.
|
|
18405
18483
|
* The static method should accept an instance and return serializable data.
|
|
@@ -21104,6 +21182,54 @@ const browserbaseSearchToolFactory = createProviderExecutedToolFactory({
|
|
|
21104
21182
|
})])))
|
|
21105
21183
|
});
|
|
21106
21184
|
const browserbaseSearch = (config = {}) => browserbaseSearchToolFactory(config);
|
|
21185
|
+
const gatewayToolErrorSchema = () => z$3.object({
|
|
21186
|
+
error: z$3.enum([
|
|
21187
|
+
"api_error",
|
|
21188
|
+
"configuration_error",
|
|
21189
|
+
"execution_error",
|
|
21190
|
+
"gateway_rate_limit",
|
|
21191
|
+
"invalid_input",
|
|
21192
|
+
"rate_limit",
|
|
21193
|
+
"timeout",
|
|
21194
|
+
"unknown",
|
|
21195
|
+
"unknown_tool"
|
|
21196
|
+
]),
|
|
21197
|
+
message: z$3.string(),
|
|
21198
|
+
statusCode: z$3.number().optional(),
|
|
21199
|
+
retryAfter: z$3.string().optional(),
|
|
21200
|
+
statusText: z$3.string().optional()
|
|
21201
|
+
}).passthrough();
|
|
21202
|
+
const deepseekFetchToolFactory = createProviderExecutedToolFactory({
|
|
21203
|
+
id: "gateway.deepseek_fetch",
|
|
21204
|
+
inputSchema: lazySchema(() => zodSchema(z$3.object({ url: z$3.string().describe("URL to fetch, at most 8192 characters; HTTP(S) only, without a username or password.") }))),
|
|
21205
|
+
outputSchema: lazySchema(() => zodSchema(z$3.union([z$3.object({
|
|
21206
|
+
title: z$3.string().nullish(),
|
|
21207
|
+
content: z$3.string()
|
|
21208
|
+
}).passthrough(), gatewayToolErrorSchema()])))
|
|
21209
|
+
});
|
|
21210
|
+
const deepseekFetch = (config = {}) => deepseekFetchToolFactory(config);
|
|
21211
|
+
const deepseekSearchToolFactory = createProviderExecutedToolFactory({
|
|
21212
|
+
id: "gateway.deepseek_search",
|
|
21213
|
+
inputSchema: lazySchema(() => zodSchema(z$3.object({
|
|
21214
|
+
query: z$3.string().describe("Web search query, 1 to 128 Unicode characters. Supports site:, -site:, lang:, after:, before:, and quoted phrases."),
|
|
21215
|
+
count: z$3.number().int().optional().describe("Number of results, 1 to 50 (default: 10)."),
|
|
21216
|
+
need_content: z$3.boolean().optional().describe("Include available page content (default: false)."),
|
|
21217
|
+
ori_question: z$3.string().nullable().optional().describe("Original user question, 1 to 128 Unicode characters.")
|
|
21218
|
+
}))),
|
|
21219
|
+
outputSchema: lazySchema(() => zodSchema(z$3.union([z$3.object({ results: z$3.array(z$3.object({
|
|
21220
|
+
authority: z$3.number().nullish(),
|
|
21221
|
+
content: z$3.string().nullish(),
|
|
21222
|
+
date: z$3.string().nullish(),
|
|
21223
|
+
rerank_score: z$3.number().nullish(),
|
|
21224
|
+
site_icon: z$3.string().nullish(),
|
|
21225
|
+
site_name: z$3.string().nullish(),
|
|
21226
|
+
snippet: z$3.string().nullish(),
|
|
21227
|
+
summary: z$3.string().nullish(),
|
|
21228
|
+
title: z$3.string().nullish(),
|
|
21229
|
+
url: z$3.string().nullish()
|
|
21230
|
+
}).passthrough()) }).passthrough(), gatewayToolErrorSchema()])))
|
|
21231
|
+
});
|
|
21232
|
+
const deepseekSearch = (config = {}) => deepseekSearchToolFactory(config);
|
|
21107
21233
|
const exaSearchToolFactory = createProviderExecutedToolFactory({
|
|
21108
21234
|
id: "gateway.exa_search",
|
|
21109
21235
|
inputSchema: lazySchema(() => zodSchema(z$3.object({
|
|
@@ -21260,21 +21386,7 @@ const parallelSearchToolFactory = createProviderExecutedToolFactory({
|
|
|
21260
21386
|
count: z$3.number().optional()
|
|
21261
21387
|
})).nullable().optional(),
|
|
21262
21388
|
session_id: z$3.string().optional()
|
|
21263
|
-
}),
|
|
21264
|
-
error: z$3.enum([
|
|
21265
|
-
"api_error",
|
|
21266
|
-
"configuration_error",
|
|
21267
|
-
"execution_error",
|
|
21268
|
-
"gateway_rate_limit",
|
|
21269
|
-
"invalid_input",
|
|
21270
|
-
"rate_limit",
|
|
21271
|
-
"timeout",
|
|
21272
|
-
"unknown",
|
|
21273
|
-
"unknown_tool"
|
|
21274
|
-
]),
|
|
21275
|
-
statusCode: z$3.number().optional(),
|
|
21276
|
-
message: z$3.string()
|
|
21277
|
-
})])))
|
|
21389
|
+
}), gatewayToolErrorSchema()])))
|
|
21278
21390
|
});
|
|
21279
21391
|
const parallelSearch = (config = {}) => parallelSearchToolFactory(config);
|
|
21280
21392
|
const perplexitySearchToolFactory = createProviderExecutedToolFactory({
|
|
@@ -21505,19 +21617,7 @@ const takoSearchToolFactory = createProviderExecutedToolFactory({
|
|
|
21505
21617
|
}).nullish()
|
|
21506
21618
|
}).nullish(),
|
|
21507
21619
|
related: z$3.array(z$3.object({}).passthrough()).nullish()
|
|
21508
|
-
}).passthrough(),
|
|
21509
|
-
error: z$3.enum([
|
|
21510
|
-
"api_error",
|
|
21511
|
-
"configuration_error",
|
|
21512
|
-
"execution_error",
|
|
21513
|
-
"invalid_input",
|
|
21514
|
-
"rate_limit",
|
|
21515
|
-
"timeout",
|
|
21516
|
-
"unknown_tool"
|
|
21517
|
-
]),
|
|
21518
|
-
statusCode: z$3.number().optional(),
|
|
21519
|
-
message: z$3.string()
|
|
21520
|
-
})])))
|
|
21620
|
+
}).passthrough(), gatewayToolErrorSchema()])))
|
|
21521
21621
|
});
|
|
21522
21622
|
const takoSearch = (config = {}) => takoSearchToolFactory(config);
|
|
21523
21623
|
/**
|
|
@@ -21539,6 +21639,16 @@ const gatewayTools = {
|
|
|
21539
21639
|
*/
|
|
21540
21640
|
browserbaseSearch,
|
|
21541
21641
|
/**
|
|
21642
|
+
* Fetch a page as Markdown through DeepSeek's standalone Fetch API.
|
|
21643
|
+
* Executed by AI Gateway for any model, separate from native model web search.
|
|
21644
|
+
*/
|
|
21645
|
+
deepseekFetch,
|
|
21646
|
+
/**
|
|
21647
|
+
* Search the web through DeepSeek's standalone Search API.
|
|
21648
|
+
* Executed by AI Gateway for any model, separate from native model web search.
|
|
21649
|
+
*/
|
|
21650
|
+
deepseekSearch,
|
|
21651
|
+
/**
|
|
21542
21652
|
* Search the web using Exa for current information and token-efficient
|
|
21543
21653
|
* excerpts optimized for agent workflows.
|
|
21544
21654
|
*
|
|
@@ -21576,7 +21686,7 @@ const gatewayTools = {
|
|
|
21576
21686
|
async function getVercelRequestId() {
|
|
21577
21687
|
return getContext().headers?.["x-vercel-id"];
|
|
21578
21688
|
}
|
|
21579
|
-
const VERSION$1 = "4.0.
|
|
21689
|
+
const VERSION$1 = "4.0.135";
|
|
21580
21690
|
const AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
|
|
21581
21691
|
/** Response shape of `POST /v1/realtime/client-secrets`. `expiresAt` is epoch seconds. */
|
|
21582
21692
|
const gatewayClientSecretResponseSchema = lazySchema(() => zodSchema(z$3.object({
|
|
@@ -22384,7 +22494,7 @@ function resolveEmbeddingModel(model) {
|
|
|
22384
22494
|
function getGlobalProvider() {
|
|
22385
22495
|
return asProviderV4(globalThis.AI_SDK_DEFAULT_PROVIDER ?? gateway);
|
|
22386
22496
|
}
|
|
22387
|
-
const VERSION = "7.0.
|
|
22497
|
+
const VERSION = "7.0.162";
|
|
22388
22498
|
/**
|
|
22389
22499
|
* Reads a property by an untrusted key, ignoring inherited prototype members.
|
|
22390
22500
|
*
|
|
@@ -23254,8 +23364,8 @@ createIdGenerator({
|
|
|
23254
23364
|
});
|
|
23255
23365
|
const fileInlineDataSchema = z$2.union([
|
|
23256
23366
|
z$2.string(),
|
|
23257
|
-
z$2.
|
|
23258
|
-
z$2.
|
|
23367
|
+
z$2.custom(isUint8Array, { message: "Must be a Uint8Array" }),
|
|
23368
|
+
z$2.custom(isArrayBuffer, { message: "Must be an ArrayBuffer" }),
|
|
23259
23369
|
z$2.custom(isBuffer, { message: "Must be a Buffer" })
|
|
23260
23370
|
]);
|
|
23261
23371
|
const providerReferenceSchema = z$2.record(z$2.string(), z$2.string());
|
|
@@ -23558,15 +23668,7 @@ createIdGenerator({
|
|
|
23558
23668
|
size: 24
|
|
23559
23669
|
});
|
|
23560
23670
|
// src/processors/observational-memory/constants.ts
|
|
23561
|
-
var constants_exports = /* @__PURE__ */ __exportAll({
|
|
23562
|
-
OBSERVATIONAL_MEMORY_DEFAULTS: () => OBSERVATIONAL_MEMORY_DEFAULTS,
|
|
23563
|
-
OBSERVATION_CONTEXT_INSTRUCTIONS: () => OBSERVATION_CONTEXT_INSTRUCTIONS,
|
|
23564
|
-
OBSERVATION_CONTEXT_PROMPT: () => OBSERVATION_CONTEXT_PROMPT,
|
|
23565
|
-
OBSERVATION_CONTEXT_PROMPT_THREAD: () => OBSERVATION_CONTEXT_PROMPT_THREAD,
|
|
23566
|
-
OBSERVATION_CONTINUATION_HINT: () => OBSERVATION_CONTINUATION_HINT,
|
|
23567
|
-
getObservationContextPrompt: () => getObservationContextPrompt,
|
|
23568
|
-
getRetrievalInstructions: () => getRetrievalInstructions
|
|
23569
|
-
});
|
|
23671
|
+
var constants_exports = /* @__PURE__ */ __exportAll({ OBSERVATION_CONTINUATION_HINT: () => OBSERVATION_CONTINUATION_HINT });
|
|
23570
23672
|
/**
|
|
23571
23673
|
* Default configuration values matching the spec
|
|
23572
23674
|
*/
|
|
@@ -39898,44 +40000,11 @@ function getObservationsAsOf(activeObservations, asOf) {
|
|
|
39898
40000
|
}
|
|
39899
40001
|
// src/processors/observational-memory/index.ts
|
|
39900
40002
|
var observational_memory_exports = /* @__PURE__ */ __exportAll({
|
|
39901
|
-
AUTO_MODEL_BY_PROVIDER: () => AUTO_MODEL_BY_PROVIDER,
|
|
39902
|
-
Extractor: () => Extractor,
|
|
39903
|
-
ModelByInputTokens: () => ModelByInputTokens,
|
|
39904
|
-
OBSERVATIONAL_MEMORY_DEFAULTS: () => OBSERVATIONAL_MEMORY_DEFAULTS,
|
|
39905
|
-
OBSERVATION_CONTEXT_INSTRUCTIONS: () => OBSERVATION_CONTEXT_INSTRUCTIONS,
|
|
39906
|
-
OBSERVATION_CONTEXT_PROMPT: () => OBSERVATION_CONTEXT_PROMPT,
|
|
39907
|
-
OBSERVATION_CONTEXT_PROMPT_THREAD: () => OBSERVATION_CONTEXT_PROMPT_THREAD,
|
|
39908
|
-
OBSERVATION_CONTINUATION_HINT: () => OBSERVATION_CONTINUATION_HINT,
|
|
39909
|
-
OBSERVER_SYSTEM_PROMPT: () => OBSERVER_SYSTEM_PROMPT,
|
|
39910
40003
|
ObservationalMemory: () => ObservationalMemory,
|
|
39911
|
-
ObservationalMemoryProcessor: () => ObservationalMemoryProcessor
|
|
39912
|
-
TokenCounter: () => TokenCounter,
|
|
39913
|
-
WorkingMemoryExtractor: () => WorkingMemoryExtractor,
|
|
39914
|
-
buildObserverPrompt: () => buildObserverPrompt,
|
|
39915
|
-
buildObserverSystemPrompt: () => buildObserverSystemPrompt,
|
|
39916
|
-
combineObservationGroupRanges: () => combineObservationGroupRanges,
|
|
39917
|
-
deriveObservationGroupProvenance: () => deriveObservationGroupProvenance,
|
|
39918
|
-
extractCurrentTask: () => extractCurrentTask,
|
|
39919
|
-
formatMessagesForObserver: () => formatMessagesForObserver,
|
|
39920
|
-
getObservationContextPrompt: () => getObservationContextPrompt,
|
|
39921
|
-
getObservationsAsOf: () => getObservationsAsOf,
|
|
39922
|
-
hasCurrentTaskSection: () => hasCurrentTaskSection,
|
|
39923
|
-
injectAnchorIds: () => injectAnchorIds,
|
|
39924
|
-
optimizeObservationsForContext: () => optimizeObservationsForContext,
|
|
39925
|
-
parseAnchorId: () => parseAnchorId,
|
|
39926
|
-
parseObservationGroups: () => parseObservationGroups,
|
|
39927
|
-
parseObserverOutput: () => parseObserverOutput,
|
|
39928
|
-
reconcileObservationGroupsFromReflection: () => reconcileObservationGroupsFromReflection,
|
|
39929
|
-
renderObservationGroupsForReflection: () => renderObservationGroupsForReflection,
|
|
39930
|
-
resolveAutoModelId: () => resolveAutoModelId,
|
|
39931
|
-
stripEphemeralAnchorIds: () => stripEphemeralAnchorIds,
|
|
39932
|
-
stripObservationGroups: () => stripObservationGroups,
|
|
39933
|
-
summarizeConversation: () => summarizeConversation,
|
|
39934
|
-
wrapInObservationGroup: () => wrapInObservationGroup
|
|
40004
|
+
ObservationalMemoryProcessor: () => ObservationalMemoryProcessor
|
|
39935
40005
|
});
|
|
39936
40006
|
// src/processors/working-memory-state/index.ts
|
|
39937
40007
|
var working_memory_state_exports = /* @__PURE__ */ __exportAll({
|
|
39938
|
-
WORKING_MEMORY_STATE_ID: () => WORKING_MEMORY_STATE_ID,
|
|
39939
40008
|
WORKING_MEMORY_STATE_PROCESSOR_ID: () => WORKING_MEMORY_STATE_PROCESSOR_ID,
|
|
39940
40009
|
WorkingMemoryStateProcessor: () => WorkingMemoryStateProcessor
|
|
39941
40010
|
});
|
|
@@ -42527,4 +42596,4 @@ Notes:
|
|
|
42527
42596
|
};
|
|
42528
42597
|
export { summarizeConversation as A, injectAnchorIds as B, wrapInObservationGroup as C, WorkingMemoryExtractor as D, Subconscious as E, extractCurrentTask as F, OBSERVATION_CONTEXT_INSTRUCTIONS as G, stripEphemeralAnchorIds as H, formatMessagesForObserver as I, OBSERVATION_CONTINUATION_HINT as J, OBSERVATION_CONTEXT_PROMPT as K, hasCurrentTaskSection as L, OBSERVER_SYSTEM_PROMPT as M, buildObserverPrompt as N, deepMergeWorkingMemory as O, buildObserverSystemPrompt as P, optimizeObservationsForContext as R, stripObservationGroups as S, StaleKnowledgeSemanticIndexError as T, Extractor as U, parseAnchorId as V, OBSERVATIONAL_MEMORY_DEFAULTS as W, getObservationContextPrompt as Y, combineObservationGroupRanges as _, extractWorkingMemoryContent as a, reconcileObservationGroupsFromReflection as b, getObservationsAsOf as c, AUTO_MODEL_BY_PROVIDER as d, resolveAutoModelId as f, ModelByInputTokens as g, WorkingMemoryStateProcessor as h, WorkingMemory as i, TokenCounter as j, SUMMARIZE_THREAD_DEFAULTS as k, ObservationalMemoryProcessor as l, WORKING_MEMORY_STATE_PROCESSOR_ID as m, MessageHistory$1 as n, extractWorkingMemoryTags as o, WORKING_MEMORY_STATE_ID as p, OBSERVATION_CONTEXT_PROMPT_THREAD as q, SemanticRecall as r, removeWorkingMemoryTags as s, Memory as t, ObservationalMemory as u, deriveObservationGroupProvenance as v, KnowledgeSemanticIndexCoordinator as w, renderObservationGroupsForReflection as x, parseObservationGroups as y, parseObserverOutput as z };
|
|
42529
42598
|
|
|
42530
|
-
//# sourceMappingURL=src-
|
|
42599
|
+
//# sourceMappingURL=src-BIae5T_v.js.map
|