@mastra/memory 1.0.0-beta.0 → 1.0.0-beta.10
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/CHANGELOG.md +277 -0
- package/dist/_types/@internal_ai-sdk-v4/dist/index.d.ts +7549 -0
- package/dist/chunk-DGUM43GV.js +10 -0
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/chunk-JEQ2X3Z6.cjs +12 -0
- package/dist/chunk-JEQ2X3Z6.cjs.map +1 -0
- package/dist/chunk-KMQS2YEC.js +79 -0
- package/dist/chunk-KMQS2YEC.js.map +1 -0
- package/dist/chunk-MMUHFOCG.js +79 -0
- package/dist/chunk-MMUHFOCG.js.map +1 -0
- package/dist/chunk-QY6BZOPJ.js +250 -0
- package/dist/chunk-QY6BZOPJ.js.map +1 -0
- package/dist/chunk-SG3GRV3O.cjs +84 -0
- package/dist/chunk-SG3GRV3O.cjs.map +1 -0
- package/dist/chunk-W72AYUIF.cjs +252 -0
- package/dist/chunk-W72AYUIF.cjs.map +1 -0
- package/dist/chunk-WC4XBMZT.js +250 -0
- package/dist/chunk-WC4XBMZT.js.map +1 -0
- package/dist/chunk-YMNW6DEN.cjs +252 -0
- package/dist/chunk-YMNW6DEN.cjs.map +1 -0
- package/dist/chunk-ZUQPUTTO.cjs +84 -0
- package/dist/chunk-ZUQPUTTO.cjs.map +1 -0
- package/dist/index.cjs +14612 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14574 -119
- package/dist/index.js.map +1 -1
- package/dist/token-6GSAFR2W-JV3TZR4M.cjs +63 -0
- package/dist/token-6GSAFR2W-JV3TZR4M.cjs.map +1 -0
- package/dist/token-6GSAFR2W-K2BTU23I.js +61 -0
- package/dist/token-6GSAFR2W-K2BTU23I.js.map +1 -0
- package/dist/token-6GSAFR2W-VLY2XUPA.js +61 -0
- package/dist/token-6GSAFR2W-VLY2XUPA.js.map +1 -0
- package/dist/token-6GSAFR2W-YCB5SK2Z.cjs +63 -0
- package/dist/token-6GSAFR2W-YCB5SK2Z.cjs.map +1 -0
- package/dist/token-util-NEHG7TUY-7IL6JUVY.cjs +10 -0
- package/dist/token-util-NEHG7TUY-7IL6JUVY.cjs.map +1 -0
- package/dist/token-util-NEHG7TUY-HF7KBP2H.cjs +10 -0
- package/dist/token-util-NEHG7TUY-HF7KBP2H.cjs.map +1 -0
- package/dist/token-util-NEHG7TUY-KSXDO2NO.js +8 -0
- package/dist/token-util-NEHG7TUY-KSXDO2NO.js.map +1 -0
- package/dist/token-util-NEHG7TUY-TIJ3LMSH.js +8 -0
- package/dist/token-util-NEHG7TUY-TIJ3LMSH.js.map +1 -0
- package/dist/tools/working-memory.d.ts +10 -2
- package/dist/tools/working-memory.d.ts.map +1 -1
- package/package.json +15 -27
- package/dist/processors/index.cjs +0 -165
- package/dist/processors/index.cjs.map +0 -1
- package/dist/processors/index.d.ts +0 -3
- package/dist/processors/index.d.ts.map +0 -1
- package/dist/processors/index.js +0 -158
- package/dist/processors/index.js.map +0 -1
- package/dist/processors/token-limiter.d.ts +0 -32
- package/dist/processors/token-limiter.d.ts.map +0 -1
- package/dist/processors/tool-call-filter.d.ts +0 -20
- package/dist/processors/tool-call-filter.d.ts.map +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkW72AYUIF_cjs = require('./chunk-W72AYUIF.cjs');
|
|
4
|
+
var chunkZUQPUTTO_cjs = require('./chunk-ZUQPUTTO.cjs');
|
|
5
|
+
|
|
6
|
+
// ../_vendored/ai_v6/dist/token-6GSAFR2W.js
|
|
7
|
+
var require_token = chunkZUQPUTTO_cjs.__commonJS({
|
|
8
|
+
"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
|
+
var token_exports = {};
|
|
27
|
+
__export(token_exports, {
|
|
28
|
+
refreshToken: () => refreshToken
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(token_exports);
|
|
31
|
+
var import_token_error = chunkZUQPUTTO_cjs.require_token_error();
|
|
32
|
+
var import_token_util = chunkW72AYUIF_cjs.require_token_util();
|
|
33
|
+
async function refreshToken() {
|
|
34
|
+
const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
|
|
35
|
+
let maybeToken = (0, import_token_util.loadToken)(projectId);
|
|
36
|
+
if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
|
|
37
|
+
const authToken = (0, import_token_util.getVercelCliToken)();
|
|
38
|
+
if (!authToken) {
|
|
39
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
40
|
+
"Failed to refresh OIDC token: login to vercel cli"
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
if (!projectId) {
|
|
44
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
45
|
+
"Failed to refresh OIDC token: project id not found"
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
|
|
49
|
+
if (!maybeToken) {
|
|
50
|
+
throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
|
|
51
|
+
}
|
|
52
|
+
(0, import_token_util.saveToken)(maybeToken, projectId);
|
|
53
|
+
}
|
|
54
|
+
process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
var token6GSAFR2W = require_token();
|
|
60
|
+
|
|
61
|
+
module.exports = token6GSAFR2W;
|
|
62
|
+
//# sourceMappingURL=token-6GSAFR2W-JV3TZR4M.cjs.map
|
|
63
|
+
//# sourceMappingURL=token-6GSAFR2W-JV3TZR4M.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"],"names":["__commonJS","require_token_error","require_token_util"],"mappings":";;;;;;AAAA,IAAA,gBAAAA,4BAAA,CAAA;AAAA,EAAA,wFAAA,CAAA,SAAA,MAAA,EAAA;AACA,IAAA,IAAI,YAAY,MAAA,CAAO,cAAA;AACvB,IAAA,IAAI,mBAAmB,MAAA,CAAO,wBAAA;AAC9B,IAAA,IAAI,oBAAoB,MAAA,CAAO,mBAAA;AAC/B,IAAA,IAAI,YAAA,GAAe,OAAO,SAAA,CAAU,cAAA;AACpC,IAAA,IAAI,QAAA,GAAW,CAAC,MAAA,EAAQ,GAAA,KAAQ;AAC9B,MAAA,KAAA,IAAS,IAAA,IAAQ,GAAA;AACf,QAAA,SAAA,CAAU,MAAA,EAAQ,MAAM,EAAE,GAAA,EAAK,IAAI,IAAI,CAAA,EAAG,UAAA,EAAY,IAAA,EAAM,CAAA;AAChE,IAAA,CAAA;AACA,IAAA,IAAI,WAAA,GAAc,CAAC,EAAA,EA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AAA,MAAM,SAAA,GAAA,IAAgB,iBAAA,CAAkB,iBAAA,GAAA;AACxC,QAAA,IAAI,CAAC,SAAA,EAAW;AACd,UAAA,MAAM,IAAI,kBAAA,CAAmB,oBAAA;AAC3B,YAAA;AAAA,WAAA;AAEJ,QAAA;AACA,QAAA,IAAI,CAAC,SAAA,EAAW;AACd,UAAA,MAAM,IAAI,kBAAA,CAAmB,oBAAA;AAC3B,YAAA;AAAA,WAAA;AAEJ,QAAA;AACA,QAAA,UAAA,GAAa,UAAU,iBAAA,CAAkB,kBAAA,EAAoB,SAAA,EAAW,WAAW,MAAM,CAAA;AACzF,QAAA,IAAI,CAAC,UAAA,EAAY;AACf,UAAA,MAAM,IAAI,kBAAA,CAAmB,oBAAA,CAAqB,8BAA8B,CAAA;AAClF,QAAA;AACA,QAAA,IAAI,iBAAA,CAAkB,SAAA,EAAW,UAAA,EAAY,SAAS,CAAA;AACxD,MAAA;AACA,MAAA,OAAA,CAAQ,GAAA,CAAI,oBAAoB,UAAA,CAAW,KAAA;AAC3C,MAAA;AACF,IAAA;AAAA,EAAA;AAAA,CAAA,CAAA","file":"token-6GSAFR2W-JV3TZR4M.cjs","sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: login to vercel cli\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: project id not found\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { require_token_util } from './chunk-QY6BZOPJ.js';
|
|
2
|
+
import { __commonJS, require_token_error } from './chunk-MMUHFOCG.js';
|
|
3
|
+
|
|
4
|
+
// ../_vendored/ai_v6/dist/token-6GSAFR2W.js
|
|
5
|
+
var require_token = __commonJS({
|
|
6
|
+
"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all)
|
|
13
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from))
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var token_exports = {};
|
|
25
|
+
__export(token_exports, {
|
|
26
|
+
refreshToken: () => refreshToken
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(token_exports);
|
|
29
|
+
var import_token_error = require_token_error();
|
|
30
|
+
var import_token_util = require_token_util();
|
|
31
|
+
async function refreshToken() {
|
|
32
|
+
const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
|
|
33
|
+
let maybeToken = (0, import_token_util.loadToken)(projectId);
|
|
34
|
+
if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
|
|
35
|
+
const authToken = (0, import_token_util.getVercelCliToken)();
|
|
36
|
+
if (!authToken) {
|
|
37
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
38
|
+
"Failed to refresh OIDC token: login to vercel cli"
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
if (!projectId) {
|
|
42
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
43
|
+
"Failed to refresh OIDC token: project id not found"
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
|
|
47
|
+
if (!maybeToken) {
|
|
48
|
+
throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
|
|
49
|
+
}
|
|
50
|
+
(0, import_token_util.saveToken)(maybeToken, projectId);
|
|
51
|
+
}
|
|
52
|
+
process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
var token6GSAFR2W = require_token();
|
|
58
|
+
|
|
59
|
+
export { token6GSAFR2W as default };
|
|
60
|
+
//# sourceMappingURL=token-6GSAFR2W-K2BTU23I.js.map
|
|
61
|
+
//# sourceMappingURL=token-6GSAFR2W-K2BTU23I.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"],"names":[],"mappings":";;;;AAAA,IAAA,gBAAA,UAAA,CAAA;AAAA,EAAA,wFAAA,CAAA,SAAA,MAAA,EAAA;AACA,IAAA,IAAI,YAAY,MAAA,CAAO,cAAA;AACvB,IAAA,IAAI,mBAAmB,MAAA,CAAO,wBAAA;AAC9B,IAAA,IAAI,oBAAoB,MAAA,CAAO,mBAAA;AAC/B,IAAA,IAAI,YAAA,GAAe,OAAO,SAAA,CAAU,cAAA;AACpC,IAAA,IAAI,QAAA,GAAW,CAAC,MAAA,EAAQ,GAAA,KAAQ;AAC9B,MAAA,KAAA,IAAS,IAAA,IAAQ,GAAA;AACf,QAAA,SAAA,CAAU,MAAA,EAAQ,MAAM,EAAE,GAAA,EAAK,IAAI,IAAI,CAAA,EAAG,UAAA,EAAY,IAAA,EAAM,CAAA;AAChE,IAAA,CAAA;AACA,IAAA,IAAI,WAAA,GAAc,CAAC,EAAA,EAAI,IAAA,EAAM,QAAQ,IAAA,KAAS;AAC5C,MAAA,IAAI,QAAQ,OAAO,IAAA,KAAS,QAAA,IAAY,OAAO,SAAS,UAAA,EAAY;AAClE,QAAA,KAAA,IAAS,GAAA,IAAO,kBAAkB,IAAI,CAAA;AACpC,UAAA,IAAI,CAAC,YAAA,CAAa,IAAA,CAAK,EAAA,EAAI,GAAG,KAAK,GAAA,KAAQ,MAAA;AACzC,YAAA,SAAA,CAAU,IAAI,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ACA,QAAA,UAAA,GAAa,UAAU,iBAAA,CAAkB,kBAAA,EAAoB,SAAA,EAAW,WAAW,MAAM,CAAA;AACzF,QAAA,IAAI,CAAC,UAAA,EAAY;AACf,UAAA,MAAM,IAAI,kBAAA,CAAmB,oBAAA,CAAqB,8BAA8B,CAAA;AAClF,QAAA;AACA,QAAA,IAAI,iBAAA,CAAkB,SAAA,EAAW,UAAA,EAAY,SAAS,CAAA;AACxD,MAAA;AACA,MAAA,OAAA,CAAQ,GAAA,CAAI,oBAAoB,UAAA,CAAW,KAAA;AAC3C,MAAA;AACF,IAAA;AAAA,EAAA;AAAA,CAAA,CAAA","file":"token-6GSAFR2W-K2BTU23I.js","sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: login to vercel cli\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: project id not found\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { require_token_util } from './chunk-WC4XBMZT.js';
|
|
2
|
+
import { __commonJS, require_token_error } from './chunk-KMQS2YEC.js';
|
|
3
|
+
|
|
4
|
+
// ../_vendored/ai_v5/dist/token-6GSAFR2W.js
|
|
5
|
+
var require_token = __commonJS({
|
|
6
|
+
"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all)
|
|
13
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from))
|
|
18
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var token_exports = {};
|
|
25
|
+
__export(token_exports, {
|
|
26
|
+
refreshToken: () => refreshToken
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(token_exports);
|
|
29
|
+
var import_token_error = require_token_error();
|
|
30
|
+
var import_token_util = require_token_util();
|
|
31
|
+
async function refreshToken() {
|
|
32
|
+
const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
|
|
33
|
+
let maybeToken = (0, import_token_util.loadToken)(projectId);
|
|
34
|
+
if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
|
|
35
|
+
const authToken = (0, import_token_util.getVercelCliToken)();
|
|
36
|
+
if (!authToken) {
|
|
37
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
38
|
+
"Failed to refresh OIDC token: login to vercel cli"
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
if (!projectId) {
|
|
42
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
43
|
+
"Failed to refresh OIDC token: project id not found"
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
|
|
47
|
+
if (!maybeToken) {
|
|
48
|
+
throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
|
|
49
|
+
}
|
|
50
|
+
(0, import_token_util.saveToken)(maybeToken, projectId);
|
|
51
|
+
}
|
|
52
|
+
process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
var token6GSAFR2W = require_token();
|
|
58
|
+
|
|
59
|
+
export { token6GSAFR2W as default };
|
|
60
|
+
//# sourceMappingURL=token-6GSAFR2W-VLY2XUPA.js.map
|
|
61
|
+
//# sourceMappingURL=token-6GSAFR2W-VLY2XUPA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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AAQ,GAAA,CAAI,oBAAoB,UAAA,CAAW,KAAA;AAC3C,MAAA;AACF,IAAA;AAAA,EAAA;AAAA,CAAA,CAAA","file":"token-6GSAFR2W-VLY2XUPA.js","sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: login to vercel cli\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: project id not found\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYMNW6DEN_cjs = require('./chunk-YMNW6DEN.cjs');
|
|
4
|
+
var chunkSG3GRV3O_cjs = require('./chunk-SG3GRV3O.cjs');
|
|
5
|
+
|
|
6
|
+
// ../_vendored/ai_v5/dist/token-6GSAFR2W.js
|
|
7
|
+
var require_token = chunkSG3GRV3O_cjs.__commonJS({
|
|
8
|
+
"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
11
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
|
+
var token_exports = {};
|
|
27
|
+
__export(token_exports, {
|
|
28
|
+
refreshToken: () => refreshToken
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(token_exports);
|
|
31
|
+
var import_token_error = chunkSG3GRV3O_cjs.require_token_error();
|
|
32
|
+
var import_token_util = chunkYMNW6DEN_cjs.require_token_util();
|
|
33
|
+
async function refreshToken() {
|
|
34
|
+
const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
|
|
35
|
+
let maybeToken = (0, import_token_util.loadToken)(projectId);
|
|
36
|
+
if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
|
|
37
|
+
const authToken = (0, import_token_util.getVercelCliToken)();
|
|
38
|
+
if (!authToken) {
|
|
39
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
40
|
+
"Failed to refresh OIDC token: login to vercel cli"
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
if (!projectId) {
|
|
44
|
+
throw new import_token_error.VercelOidcTokenError(
|
|
45
|
+
"Failed to refresh OIDC token: project id not found"
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
|
|
49
|
+
if (!maybeToken) {
|
|
50
|
+
throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
|
|
51
|
+
}
|
|
52
|
+
(0, import_token_util.saveToken)(maybeToken, projectId);
|
|
53
|
+
}
|
|
54
|
+
process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
var token6GSAFR2W = require_token();
|
|
60
|
+
|
|
61
|
+
module.exports = token6GSAFR2W;
|
|
62
|
+
//# sourceMappingURL=token-6GSAFR2W-YCB5SK2Z.cjs.map
|
|
63
|
+
//# sourceMappingURL=token-6GSAFR2W-YCB5SK2Z.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"],"names":["__commonJS","require_token_error","require_token_util"],"mappings":";;;;;;AAAA,IAAA,gBAAAA,4BAAA,CAAA;AAAA,EAAA,wFAAA,CAAA,S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";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: login to vercel cli\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: project id not found\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYMNW6DEN_cjs = require('./chunk-YMNW6DEN.cjs');
|
|
4
|
+
|
|
5
|
+
// ../_vendored/ai_v5/dist/token-util-NEHG7TUY.js
|
|
6
|
+
var tokenUtilNEHG7TUY = chunkYMNW6DEN_cjs.require_token_util();
|
|
7
|
+
|
|
8
|
+
module.exports = tokenUtilNEHG7TUY;
|
|
9
|
+
//# sourceMappingURL=token-util-NEHG7TUY-7IL6JUVY.cjs.map
|
|
10
|
+
//# sourceMappingURL=token-util-NEHG7TUY-7IL6JUVY.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../_vendored/ai_v5/dist/token-util-NEHG7TUY.js"],"names":["require_token_util"],"mappings":";;;;;AAEA,IAAI,oBAAoBA,oCAAA","file":"token-util-NEHG7TUY-7IL6JUVY.cjs","sourcesContent":["import { require_token_util } from './chunk-OL3SSKUZ.js';\n\nvar tokenUtilNEHG7TUY = require_token_util();\n\nexport { tokenUtilNEHG7TUY as default };\n//# sourceMappingURL=token-util-NEHG7TUY.js.map\n//# sourceMappingURL=token-util-NEHG7TUY.js.map"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkW72AYUIF_cjs = require('./chunk-W72AYUIF.cjs');
|
|
4
|
+
|
|
5
|
+
// ../_vendored/ai_v6/dist/token-util-NEHG7TUY.js
|
|
6
|
+
var tokenUtilNEHG7TUY = chunkW72AYUIF_cjs.require_token_util();
|
|
7
|
+
|
|
8
|
+
module.exports = tokenUtilNEHG7TUY;
|
|
9
|
+
//# sourceMappingURL=token-util-NEHG7TUY-HF7KBP2H.cjs.map
|
|
10
|
+
//# sourceMappingURL=token-util-NEHG7TUY-HF7KBP2H.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../_vendored/ai_v6/dist/token-util-NEHG7TUY.js"],"names":["require_token_util"],"mappings":";;;;;AAEA,IAAI,oBAAoBA,oCAAA","file":"token-util-NEHG7TUY-HF7KBP2H.cjs","sourcesContent":["import { require_token_util } from './chunk-OL3SSKUZ.js';\n\nvar tokenUtilNEHG7TUY = require_token_util();\n\nexport { tokenUtilNEHG7TUY as default };\n//# sourceMappingURL=token-util-NEHG7TUY.js.map\n//# sourceMappingURL=token-util-NEHG7TUY.js.map"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { require_token_util } from './chunk-QY6BZOPJ.js';
|
|
2
|
+
|
|
3
|
+
// ../_vendored/ai_v6/dist/token-util-NEHG7TUY.js
|
|
4
|
+
var tokenUtilNEHG7TUY = require_token_util();
|
|
5
|
+
|
|
6
|
+
export { tokenUtilNEHG7TUY as default };
|
|
7
|
+
//# sourceMappingURL=token-util-NEHG7TUY-KSXDO2NO.js.map
|
|
8
|
+
//# sourceMappingURL=token-util-NEHG7TUY-KSXDO2NO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../_vendored/ai_v6/dist/token-util-NEHG7TUY.js"],"names":[],"mappings":";;;AAEA,IAAI,oBAAoB,kBAAA","file":"token-util-NEHG7TUY-KSXDO2NO.js","sourcesContent":["import { require_token_util } from './chunk-OL3SSKUZ.js';\n\nvar tokenUtilNEHG7TUY = require_token_util();\n\nexport { tokenUtilNEHG7TUY as default };\n//# sourceMappingURL=token-util-NEHG7TUY.js.map\n//# sourceMappingURL=token-util-NEHG7TUY.js.map"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { require_token_util } from './chunk-WC4XBMZT.js';
|
|
2
|
+
|
|
3
|
+
// ../_vendored/ai_v5/dist/token-util-NEHG7TUY.js
|
|
4
|
+
var tokenUtilNEHG7TUY = require_token_util();
|
|
5
|
+
|
|
6
|
+
export { tokenUtilNEHG7TUY as default };
|
|
7
|
+
//# sourceMappingURL=token-util-NEHG7TUY-TIJ3LMSH.js.map
|
|
8
|
+
//# sourceMappingURL=token-util-NEHG7TUY-TIJ3LMSH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../_vendored/ai_v5/dist/token-util-NEHG7TUY.js"],"names":[],"mappings":";;;AAEA,IAAI,oBAAoB,kBAAA","file":"token-util-NEHG7TUY-TIJ3LMSH.js","sourcesContent":["import { require_token_util } from './chunk-OL3SSKUZ.js';\n\nvar tokenUtilNEHG7TUY = require_token_util();\n\nexport { tokenUtilNEHG7TUY as default };\n//# sourceMappingURL=token-util-NEHG7TUY.js.map\n//# sourceMappingURL=token-util-NEHG7TUY.js.map"]}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { MemoryConfig } from '@mastra/core/memory';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Deep merges two objects, with special handling for null values (delete) and arrays (replace).
|
|
5
|
+
* - Object properties are recursively merged
|
|
6
|
+
* - null values in the update will delete the corresponding property
|
|
7
|
+
* - Arrays are replaced entirely (not merged element-by-element)
|
|
8
|
+
* - Primitive values are overwritten
|
|
9
|
+
*/
|
|
10
|
+
export declare function deepMergeWorkingMemory(existing: Record<string, unknown> | null | undefined, update: Record<string, unknown>): Record<string, unknown>;
|
|
11
|
+
export declare const updateWorkingMemoryTool: (memoryConfig?: MemoryConfig) => import("@mastra/core/tools").Tool<z.ZodType<any, z.ZodTypeDef, any>, undefined, any, any, import("@mastra/core/tools").ToolExecutionContext<any, any>, "update-working-memory">;
|
|
4
12
|
export declare const __experimental_updateWorkingMemoryToolVNext: (config: MemoryConfig) => import("@mastra/core/tools").Tool<z.ZodObject<{
|
|
5
13
|
newMemory: z.ZodOptional<z.ZodString>;
|
|
6
14
|
searchString: z.ZodOptional<z.ZodString>;
|
|
@@ -13,5 +21,5 @@ export declare const __experimental_updateWorkingMemoryToolVNext: (config: Memor
|
|
|
13
21
|
newMemory?: string | undefined;
|
|
14
22
|
searchString?: string | undefined;
|
|
15
23
|
updateReason?: "append-new-memory" | "clarify-existing-memory" | "replace-irrelevant-memory" | undefined;
|
|
16
|
-
}>, undefined, any, any, import("@mastra/core/tools").ToolExecutionContext<any, any
|
|
24
|
+
}>, undefined, any, any, import("@mastra/core/tools").ToolExecutionContext<any, any>, "update-working-memory">;
|
|
17
25
|
//# sourceMappingURL=working-memory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"working-memory.d.ts","sourceRoot":"","sources":["../../src/tools/working-memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,EAAE,CAAC,EAAa,MAAM,KAAK,CAAC;AAGnC,eAAO,MAAM,uBAAuB,GAAI,eAAe,YAAY,
|
|
1
|
+
{"version":3,"file":"working-memory.d.ts","sourceRoot":"","sources":["../../src/tools/working-memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,EAAE,CAAC,EAAa,MAAM,KAAK,CAAC;AAGnC;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EACpD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuCzB;AAED,eAAO,MAAM,uBAAuB,GAAI,eAAe,YAAY,oLA+GlE,CAAC;AAEF,eAAO,MAAM,2CAA2C,GAAI,QAAQ,YAAY;;;;;;;;;;;;8GA6F/E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/memory",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,50 +20,38 @@
|
|
|
20
20
|
"default": "./dist/index.cjs"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
-
"./processors": {
|
|
24
|
-
"import": {
|
|
25
|
-
"types": "./dist/processors/index.d.ts",
|
|
26
|
-
"default": "./dist/processors/index.js"
|
|
27
|
-
},
|
|
28
|
-
"require": {
|
|
29
|
-
"types": "./dist/processors/index.d.ts",
|
|
30
|
-
"default": "./dist/processors/index.cjs"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
23
|
"./package.json": "./package.json"
|
|
34
24
|
},
|
|
35
25
|
"keywords": [],
|
|
36
26
|
"author": "",
|
|
37
27
|
"license": "Apache-2.0",
|
|
38
28
|
"dependencies": {
|
|
39
|
-
"
|
|
40
|
-
"ai": "^4.3.19",
|
|
41
|
-
"ai-v5": "npm:ai@5.0.60",
|
|
29
|
+
"async-mutex": "^0.5.0",
|
|
42
30
|
"js-tiktoken": "^1.0.20",
|
|
43
31
|
"json-schema": "^0.4.0",
|
|
44
|
-
"
|
|
45
|
-
"pg-pool": "^3.10.1",
|
|
46
|
-
"postgres": "^3.4.7",
|
|
47
|
-
"redis": "^5.8.3",
|
|
48
|
-
"async-mutex": "^0.5.0",
|
|
32
|
+
"lru-cache": "^11.2.2",
|
|
49
33
|
"xxhash-wasm": "^1.1.0",
|
|
50
|
-
"
|
|
51
|
-
"@mastra/schema-compat": "1.0.0-beta.0"
|
|
34
|
+
"@mastra/schema-compat": "1.0.0-beta.5"
|
|
52
35
|
},
|
|
53
36
|
"devDependencies": {
|
|
54
37
|
"@ai-sdk/openai": "^1.3.24",
|
|
55
|
-
"@
|
|
38
|
+
"@ai-sdk/openai-v5": "npm:@ai-sdk/openai@2.0.53",
|
|
56
39
|
"@types/json-schema": "^7.0.15",
|
|
57
|
-
"@types/
|
|
58
|
-
"@types/
|
|
40
|
+
"@types/lru-cache": "^7.10.10",
|
|
41
|
+
"@types/node": "22.13.17",
|
|
42
|
+
"@vitest/coverage-v8": "4.0.12",
|
|
43
|
+
"@vitest/ui": "4.0.12",
|
|
59
44
|
"eslint": "^9.37.0",
|
|
60
45
|
"tsup": "^8.5.0",
|
|
61
46
|
"typescript": "^5.8.3",
|
|
62
47
|
"typescript-eslint": "^8.38.0",
|
|
63
|
-
"vitest": "
|
|
48
|
+
"vitest": "4.0.12",
|
|
49
|
+
"@internal/ai-sdk-v4": "0.0.0",
|
|
50
|
+
"@internal/ai-sdk-v5": "0.0.0",
|
|
51
|
+
"@internal/ai-v6": "0.0.0",
|
|
64
52
|
"@internal/lint": "0.0.53",
|
|
65
53
|
"@internal/types-builder": "0.0.28",
|
|
66
|
-
"@mastra/core": "1.0.0-beta.
|
|
54
|
+
"@mastra/core": "1.0.0-beta.19"
|
|
67
55
|
},
|
|
68
56
|
"peerDependencies": {
|
|
69
57
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0",
|
|
@@ -83,7 +71,7 @@
|
|
|
83
71
|
},
|
|
84
72
|
"scripts": {
|
|
85
73
|
"check": "tsc --noEmit",
|
|
86
|
-
"build": "
|
|
74
|
+
"build": "tsup --silent --config tsup.config.ts",
|
|
87
75
|
"build:watch": "pnpm build --watch",
|
|
88
76
|
"test:integration": "cd integration-tests && pnpm run test",
|
|
89
77
|
"test:unit": "pnpm vitest run ./src/*",
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var memory = require('@mastra/core/memory');
|
|
4
|
-
var lite = require('js-tiktoken/lite');
|
|
5
|
-
var o200k_base = require('js-tiktoken/ranks/o200k_base');
|
|
6
|
-
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var o200k_base__default = /*#__PURE__*/_interopDefault(o200k_base);
|
|
10
|
-
|
|
11
|
-
// src/processors/token-limiter.ts
|
|
12
|
-
var TokenLimiter = class extends memory.MemoryProcessor {
|
|
13
|
-
encoder;
|
|
14
|
-
maxTokens;
|
|
15
|
-
// Token overheads per OpenAI's documentation
|
|
16
|
-
// See: https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken#6-counting-tokens-for-chat-completions-api-calls
|
|
17
|
-
// Every message follows <|start|>{role/name}\n{content}<|end|>
|
|
18
|
-
TOKENS_PER_MESSAGE = 3.8;
|
|
19
|
-
// tokens added for each message (start & end tokens)
|
|
20
|
-
TOKENS_PER_CONVERSATION = 24;
|
|
21
|
-
// fixed overhead for the conversation
|
|
22
|
-
/**
|
|
23
|
-
* Create a token limiter for messages.
|
|
24
|
-
* @param options Either a number (token limit) or a configuration object
|
|
25
|
-
*/
|
|
26
|
-
constructor(options) {
|
|
27
|
-
super({
|
|
28
|
-
name: "TokenLimiter"
|
|
29
|
-
});
|
|
30
|
-
if (typeof options === "number") {
|
|
31
|
-
this.maxTokens = options;
|
|
32
|
-
this.encoder = new lite.Tiktoken(o200k_base__default.default);
|
|
33
|
-
} else {
|
|
34
|
-
this.maxTokens = options.limit;
|
|
35
|
-
this.encoder = new lite.Tiktoken(options.encoding || o200k_base__default.default);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
process(messages, { systemMessage, memorySystemMessage, newMessages } = {}) {
|
|
39
|
-
let totalTokens = 0;
|
|
40
|
-
totalTokens += this.TOKENS_PER_CONVERSATION;
|
|
41
|
-
if (systemMessage) {
|
|
42
|
-
totalTokens += this.countTokens(systemMessage);
|
|
43
|
-
totalTokens += this.TOKENS_PER_MESSAGE;
|
|
44
|
-
}
|
|
45
|
-
if (memorySystemMessage) {
|
|
46
|
-
totalTokens += this.countTokens(memorySystemMessage);
|
|
47
|
-
totalTokens += this.TOKENS_PER_MESSAGE;
|
|
48
|
-
}
|
|
49
|
-
const allMessages = [...messages, ...newMessages || []];
|
|
50
|
-
const result = [];
|
|
51
|
-
for (let i = allMessages.length - 1; i >= 0; i--) {
|
|
52
|
-
const message = allMessages[i];
|
|
53
|
-
if (!message) continue;
|
|
54
|
-
const messageTokens = this.countTokens(message);
|
|
55
|
-
if (totalTokens + messageTokens <= this.maxTokens) {
|
|
56
|
-
if (i < messages.length) {
|
|
57
|
-
result.unshift(message);
|
|
58
|
-
}
|
|
59
|
-
totalTokens += messageTokens;
|
|
60
|
-
} else {
|
|
61
|
-
this.logger.info(
|
|
62
|
-
`filtering ${allMessages.length - result.length}/${allMessages.length} messages, token limit of ${this.maxTokens} exceeded`
|
|
63
|
-
);
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return result;
|
|
68
|
-
}
|
|
69
|
-
countTokens(message) {
|
|
70
|
-
if (typeof message === `string`) {
|
|
71
|
-
return this.encoder.encode(message).length;
|
|
72
|
-
}
|
|
73
|
-
let tokenString = message.role;
|
|
74
|
-
let overhead = 0;
|
|
75
|
-
if (typeof message.content === "string" && message.content) {
|
|
76
|
-
tokenString += message.content;
|
|
77
|
-
} else if (Array.isArray(message.content)) {
|
|
78
|
-
for (const part of message.content) {
|
|
79
|
-
if (part.type === "text") {
|
|
80
|
-
tokenString += part.text;
|
|
81
|
-
} else if (part.type === "tool-call" || part.type === `tool-result`) {
|
|
82
|
-
if (`args` in part && part.args && part.type === `tool-call`) {
|
|
83
|
-
tokenString += part.toolName;
|
|
84
|
-
if (typeof part.args === "string") {
|
|
85
|
-
tokenString += part.args;
|
|
86
|
-
} else {
|
|
87
|
-
tokenString += JSON.stringify(part.args);
|
|
88
|
-
overhead -= 12;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (`result` in part && part.result !== void 0 && part.type === `tool-result`) {
|
|
92
|
-
if (typeof part.result === "string") {
|
|
93
|
-
tokenString += part.result;
|
|
94
|
-
} else {
|
|
95
|
-
tokenString += JSON.stringify(part.result);
|
|
96
|
-
overhead -= 12;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
} else {
|
|
100
|
-
tokenString += JSON.stringify(part);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (typeof message.content === `string` || // if the message included non-tool parts, add our message overhead
|
|
105
|
-
message.content.some((p) => p.type !== `tool-call` && p.type !== `tool-result`)) {
|
|
106
|
-
overhead += this.TOKENS_PER_MESSAGE;
|
|
107
|
-
}
|
|
108
|
-
return this.encoder.encode(tokenString).length + overhead;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
var ToolCallFilter = class extends memory.MemoryProcessor {
|
|
112
|
-
exclude;
|
|
113
|
-
/**
|
|
114
|
-
* Create a filter for tool calls and results.
|
|
115
|
-
* @param options Configuration options
|
|
116
|
-
* @param options.exclude List of specific tool names to exclude. If not provided, all tool calls are excluded.
|
|
117
|
-
*/
|
|
118
|
-
constructor(options = {}) {
|
|
119
|
-
super({ name: "ToolCallFilter" });
|
|
120
|
-
if (!options || !options.exclude) {
|
|
121
|
-
this.exclude = "all";
|
|
122
|
-
} else {
|
|
123
|
-
this.exclude = Array.isArray(options.exclude) ? options.exclude : [];
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
process(messages) {
|
|
127
|
-
if (this.exclude === "all") {
|
|
128
|
-
return messages.filter((message) => {
|
|
129
|
-
if (Array.isArray(message.content)) {
|
|
130
|
-
return !message.content.some((part) => part.type === "tool-call" || part.type === "tool-result");
|
|
131
|
-
}
|
|
132
|
-
return true;
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
if (this.exclude.length > 0) {
|
|
136
|
-
const excludedToolCallIds = /* @__PURE__ */ new Set();
|
|
137
|
-
return messages.filter((message) => {
|
|
138
|
-
if (!Array.isArray(message.content)) return true;
|
|
139
|
-
if (message.role === "assistant") {
|
|
140
|
-
let shouldExclude = false;
|
|
141
|
-
for (const part of message.content) {
|
|
142
|
-
if (part.type === "tool-call" && this.exclude.includes(part.toolName)) {
|
|
143
|
-
excludedToolCallIds.add(part.toolCallId);
|
|
144
|
-
shouldExclude = true;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return !shouldExclude;
|
|
148
|
-
}
|
|
149
|
-
if (message.role === "tool") {
|
|
150
|
-
const shouldExclude = message.content.some(
|
|
151
|
-
(part) => part.type === "tool-result" && excludedToolCallIds.has(part.toolCallId)
|
|
152
|
-
);
|
|
153
|
-
return !shouldExclude;
|
|
154
|
-
}
|
|
155
|
-
return true;
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
return messages;
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
exports.TokenLimiter = TokenLimiter;
|
|
163
|
-
exports.ToolCallFilter = ToolCallFilter;
|
|
164
|
-
//# sourceMappingURL=index.cjs.map
|
|
165
|
-
//# sourceMappingURL=index.cjs.map
|