@mastra/server 1.26.0-alpha.8 → 1.26.0-alpha.9
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 +7 -0
- package/dist/{chunk-6F4GEWBN.cjs → chunk-6NM5GLTZ.cjs} +20 -20
- package/dist/{chunk-6F4GEWBN.cjs.map → chunk-6NM5GLTZ.cjs.map} +1 -1
- package/dist/{chunk-EOIQWP5O.cjs → chunk-BSW2G3CB.cjs} +3 -3
- package/dist/{chunk-EOIQWP5O.cjs.map → chunk-BSW2G3CB.cjs.map} +1 -1
- package/dist/{chunk-SKDQ4JE7.js → chunk-MY6TVQ24.js} +5 -5
- package/dist/{chunk-SKDQ4JE7.js.map → chunk-MY6TVQ24.js.map} +1 -1
- package/dist/{chunk-7ITX6ABS.js → chunk-WBPWUNCX.js} +3 -3
- package/dist/{chunk-7ITX6ABS.js.map → chunk-WBPWUNCX.js.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/{observational-memory-WJ4BDRUP-GWOXZLOP.js → observational-memory-WJ4BDRUP-5X5ZOEK3.js} +3 -3
- package/dist/{observational-memory-WJ4BDRUP-GWOXZLOP.js.map → observational-memory-WJ4BDRUP-5X5ZOEK3.js.map} +1 -1
- package/dist/{observational-memory-WJ4BDRUP-N5A5UQWB.cjs → observational-memory-WJ4BDRUP-HNAWHGDZ.cjs} +26 -26
- package/dist/{observational-memory-WJ4BDRUP-N5A5UQWB.cjs.map → observational-memory-WJ4BDRUP-HNAWHGDZ.cjs.map} +1 -1
- package/dist/{probe-image-size-7HF7Q24F.cjs → probe-image-size-H2PYJKCK.cjs} +113 -12
- package/dist/probe-image-size-H2PYJKCK.cjs.map +1 -0
- package/dist/{probe-image-size-M5NYSF5D.js → probe-image-size-QWKVSEOF.js} +113 -12
- package/dist/probe-image-size-QWKVSEOF.js.map +1 -0
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers.cjs +2 -2
- package/dist/server/handlers.js +1 -1
- package/dist/server/server-adapter/index.cjs +16 -16
- package/dist/server/server-adapter/index.js +1 -1
- package/package.json +6 -6
- package/dist/probe-image-size-7HF7Q24F.cjs.map +0 -1
- package/dist/probe-image-size-M5NYSF5D.js.map +0 -1
|
@@ -2732,9 +2732,9 @@ var require_cookies = __commonJS({
|
|
|
2732
2732
|
}
|
|
2733
2733
|
});
|
|
2734
2734
|
|
|
2735
|
-
// ../../node_modules/.pnpm/sax@1.
|
|
2735
|
+
// ../../node_modules/.pnpm/sax@1.6.0/node_modules/sax/lib/sax.js
|
|
2736
2736
|
var require_sax = __commonJS({
|
|
2737
|
-
"../../node_modules/.pnpm/sax@1.
|
|
2737
|
+
"../../node_modules/.pnpm/sax@1.6.0/node_modules/sax/lib/sax.js"(exports$1) {
|
|
2738
2738
|
(function(sax) {
|
|
2739
2739
|
sax.parser = function(strict, opt) {
|
|
2740
2740
|
return new SAXParser(strict, opt);
|
|
@@ -2785,9 +2785,13 @@ var require_sax = __commonJS({
|
|
|
2785
2785
|
clearBuffers(parser);
|
|
2786
2786
|
parser.q = parser.c = "";
|
|
2787
2787
|
parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH;
|
|
2788
|
+
parser.encoding = null;
|
|
2788
2789
|
parser.opt = opt || {};
|
|
2789
2790
|
parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags;
|
|
2790
2791
|
parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase";
|
|
2792
|
+
parser.opt.maxEntityCount = parser.opt.maxEntityCount || 512;
|
|
2793
|
+
parser.opt.maxEntityDepth = parser.opt.maxEntityDepth || 4;
|
|
2794
|
+
parser.entityCount = parser.entityDepth = 0;
|
|
2791
2795
|
parser.tags = [];
|
|
2792
2796
|
parser.closed = parser.closedRoot = parser.sawRoot = false;
|
|
2793
2797
|
parser.tag = parser.error = null;
|
|
@@ -2899,6 +2903,29 @@ var require_sax = __commonJS({
|
|
|
2899
2903
|
function createStream(strict, opt) {
|
|
2900
2904
|
return new SAXStream(strict, opt);
|
|
2901
2905
|
}
|
|
2906
|
+
function determineBufferEncoding(data, isEnd) {
|
|
2907
|
+
if (data.length >= 2) {
|
|
2908
|
+
if (data[0] === 255 && data[1] === 254) {
|
|
2909
|
+
return "utf-16le";
|
|
2910
|
+
}
|
|
2911
|
+
if (data[0] === 254 && data[1] === 255) {
|
|
2912
|
+
return "utf-16be";
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
if (data.length >= 3 && data[0] === 239 && data[1] === 187 && data[2] === 191) {
|
|
2916
|
+
return "utf8";
|
|
2917
|
+
}
|
|
2918
|
+
if (data.length >= 4) {
|
|
2919
|
+
if (data[0] === 60 && data[1] === 0 && data[2] === 63 && data[3] === 0) {
|
|
2920
|
+
return "utf-16le";
|
|
2921
|
+
}
|
|
2922
|
+
if (data[0] === 0 && data[1] === 60 && data[2] === 0 && data[3] === 63) {
|
|
2923
|
+
return "utf-16be";
|
|
2924
|
+
}
|
|
2925
|
+
return "utf8";
|
|
2926
|
+
}
|
|
2927
|
+
return isEnd ? "utf8" : null;
|
|
2928
|
+
}
|
|
2902
2929
|
function SAXStream(strict, opt) {
|
|
2903
2930
|
if (!(this instanceof SAXStream)) {
|
|
2904
2931
|
return new SAXStream(strict, opt);
|
|
@@ -2916,6 +2943,7 @@ var require_sax = __commonJS({
|
|
|
2916
2943
|
me._parser.error = null;
|
|
2917
2944
|
};
|
|
2918
2945
|
this._decoder = null;
|
|
2946
|
+
this._decoderBuffer = null;
|
|
2919
2947
|
streamWraps.forEach(function(ev) {
|
|
2920
2948
|
Object.defineProperty(me, "on" + ev, {
|
|
2921
2949
|
get: function() {
|
|
@@ -2939,12 +2967,31 @@ var require_sax = __commonJS({
|
|
|
2939
2967
|
value: SAXStream
|
|
2940
2968
|
}
|
|
2941
2969
|
});
|
|
2970
|
+
SAXStream.prototype._decodeBuffer = function(data, isEnd) {
|
|
2971
|
+
if (this._decoderBuffer) {
|
|
2972
|
+
data = Buffer.concat([this._decoderBuffer, data]);
|
|
2973
|
+
this._decoderBuffer = null;
|
|
2974
|
+
}
|
|
2975
|
+
if (!this._decoder) {
|
|
2976
|
+
var encoding = determineBufferEncoding(data, isEnd);
|
|
2977
|
+
if (!encoding) {
|
|
2978
|
+
this._decoderBuffer = data;
|
|
2979
|
+
return "";
|
|
2980
|
+
}
|
|
2981
|
+
this._parser.encoding = encoding;
|
|
2982
|
+
this._decoder = new TextDecoder(encoding);
|
|
2983
|
+
}
|
|
2984
|
+
return this._decoder.decode(data, { stream: !isEnd });
|
|
2985
|
+
};
|
|
2942
2986
|
SAXStream.prototype.write = function(data) {
|
|
2943
2987
|
if (typeof Buffer === "function" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(data)) {
|
|
2944
|
-
|
|
2945
|
-
|
|
2988
|
+
data = this._decodeBuffer(data, false);
|
|
2989
|
+
} else if (this._decoderBuffer) {
|
|
2990
|
+
var remaining = this._decodeBuffer(Buffer.alloc(0), true);
|
|
2991
|
+
if (remaining) {
|
|
2992
|
+
this._parser.write(remaining);
|
|
2993
|
+
this.emit("data", remaining);
|
|
2946
2994
|
}
|
|
2947
|
-
data = this._decoder.decode(data, { stream: true });
|
|
2948
2995
|
}
|
|
2949
2996
|
this._parser.write(data.toString());
|
|
2950
2997
|
this.emit("data", data);
|
|
@@ -2954,7 +3001,13 @@ var require_sax = __commonJS({
|
|
|
2954
3001
|
if (chunk && chunk.length) {
|
|
2955
3002
|
this.write(chunk);
|
|
2956
3003
|
}
|
|
2957
|
-
if (this.
|
|
3004
|
+
if (this._decoderBuffer) {
|
|
3005
|
+
var finalChunk = this._decodeBuffer(Buffer.alloc(0), true);
|
|
3006
|
+
if (finalChunk) {
|
|
3007
|
+
this._parser.write(finalChunk);
|
|
3008
|
+
this.emit("data", finalChunk);
|
|
3009
|
+
}
|
|
3010
|
+
} else if (this._decoder) {
|
|
2958
3011
|
var remaining = this._decoder.decode();
|
|
2959
3012
|
if (remaining) {
|
|
2960
3013
|
this._parser.write(remaining);
|
|
@@ -3348,6 +3401,39 @@ var require_sax = __commonJS({
|
|
|
3348
3401
|
function emit(parser, event, data) {
|
|
3349
3402
|
parser[event] && parser[event](data);
|
|
3350
3403
|
}
|
|
3404
|
+
function getDeclaredEncoding(body) {
|
|
3405
|
+
var match = body && body.match(/(?:^|\s)encoding\s*=\s*(['"])([^'"]+)\1/i);
|
|
3406
|
+
return match ? match[2] : null;
|
|
3407
|
+
}
|
|
3408
|
+
function normalizeEncodingName(encoding) {
|
|
3409
|
+
if (!encoding) {
|
|
3410
|
+
return null;
|
|
3411
|
+
}
|
|
3412
|
+
return encoding.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
3413
|
+
}
|
|
3414
|
+
function encodingsMatch(detectedEncoding, declaredEncoding) {
|
|
3415
|
+
const detected = normalizeEncodingName(detectedEncoding);
|
|
3416
|
+
const declared = normalizeEncodingName(declaredEncoding);
|
|
3417
|
+
if (!detected || !declared) {
|
|
3418
|
+
return true;
|
|
3419
|
+
}
|
|
3420
|
+
if (declared === "utf16") {
|
|
3421
|
+
return detected === "utf16le" || detected === "utf16be";
|
|
3422
|
+
}
|
|
3423
|
+
return detected === declared;
|
|
3424
|
+
}
|
|
3425
|
+
function validateXmlDeclarationEncoding(parser, data) {
|
|
3426
|
+
if (!parser.strict || !parser.encoding || !data || data.name !== "xml") {
|
|
3427
|
+
return;
|
|
3428
|
+
}
|
|
3429
|
+
var declaredEncoding = getDeclaredEncoding(data.body);
|
|
3430
|
+
if (declaredEncoding && !encodingsMatch(parser.encoding, declaredEncoding)) {
|
|
3431
|
+
strictFail(
|
|
3432
|
+
parser,
|
|
3433
|
+
"XML declaration encoding " + declaredEncoding + " does not match detected stream encoding " + parser.encoding.toUpperCase()
|
|
3434
|
+
);
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3351
3437
|
function emitNode(parser, nodeType, data) {
|
|
3352
3438
|
if (parser.textNode) closeText(parser);
|
|
3353
3439
|
emit(parser, nodeType, data);
|
|
@@ -3924,10 +4010,12 @@ var require_sax = __commonJS({
|
|
|
3924
4010
|
continue;
|
|
3925
4011
|
case S.PROC_INST_ENDING:
|
|
3926
4012
|
if (c === ">") {
|
|
3927
|
-
|
|
4013
|
+
const procInstEndData = {
|
|
3928
4014
|
name: parser.procInstName,
|
|
3929
4015
|
body: parser.procInstBody
|
|
3930
|
-
}
|
|
4016
|
+
};
|
|
4017
|
+
validateXmlDeclarationEncoding(parser, procInstEndData);
|
|
4018
|
+
emitNode(parser, "onprocessinginstruction", procInstEndData);
|
|
3931
4019
|
parser.procInstName = parser.procInstBody = "";
|
|
3932
4020
|
parser.state = S.TEXT;
|
|
3933
4021
|
} else {
|
|
@@ -4140,9 +4228,22 @@ var require_sax = __commonJS({
|
|
|
4140
4228
|
if (c === ";") {
|
|
4141
4229
|
var parsedEntity = parseEntity(parser);
|
|
4142
4230
|
if (parser.opt.unparsedEntities && !Object.values(sax.XML_ENTITIES).includes(parsedEntity)) {
|
|
4231
|
+
if ((parser.entityCount += 1) > parser.opt.maxEntityCount) {
|
|
4232
|
+
error(
|
|
4233
|
+
parser,
|
|
4234
|
+
"Parsed entity count exceeds max entity count"
|
|
4235
|
+
);
|
|
4236
|
+
}
|
|
4237
|
+
if ((parser.entityDepth += 1) > parser.opt.maxEntityDepth) {
|
|
4238
|
+
error(
|
|
4239
|
+
parser,
|
|
4240
|
+
"Parsed entity depth exceeds max entity depth"
|
|
4241
|
+
);
|
|
4242
|
+
}
|
|
4143
4243
|
parser.entity = "";
|
|
4144
4244
|
parser.state = returnState;
|
|
4145
4245
|
parser.write(parsedEntity);
|
|
4246
|
+
parser.entityDepth -= 1;
|
|
4146
4247
|
} else {
|
|
4147
4248
|
parser[buffer] += parsedEntity;
|
|
4148
4249
|
parser.entity = "";
|
|
@@ -9804,13 +9905,13 @@ var require_probe_image_size = __commonJS({
|
|
|
9804
9905
|
module.exports.Error = require_common().ProbeError;
|
|
9805
9906
|
}
|
|
9806
9907
|
});
|
|
9807
|
-
var
|
|
9908
|
+
var probeImageSizeQWKVSEOF = require_probe_image_size();
|
|
9808
9909
|
/*! Bundled license information:
|
|
9809
9910
|
|
|
9810
9911
|
sax/lib/sax.js:
|
|
9811
9912
|
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
|
|
9812
9913
|
*/
|
|
9813
9914
|
|
|
9814
|
-
export {
|
|
9815
|
-
//# sourceMappingURL=probe-image-size-
|
|
9816
|
-
//# sourceMappingURL=probe-image-size-
|
|
9915
|
+
export { probeImageSizeQWKVSEOF as default };
|
|
9916
|
+
//# sourceMappingURL=probe-image-size-QWKVSEOF.js.map
|
|
9917
|
+
//# sourceMappingURL=probe-image-size-QWKVSEOF.js.map
|